bbstrader 0.2.96__py3-none-any.whl → 0.2.98__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bbstrader might be problematic. Click here for more details.

@@ -7,7 +7,7 @@ import sys
7
7
  from bbstrader.btengine import MT5Strategy, Strategy
8
8
  from bbstrader.core.utils import load_class, load_module
9
9
  from bbstrader.metatrader.trade import create_trade_instance
10
- from bbstrader.trading.execution import mt5_engine
10
+ from bbstrader.trading.execution import RunMt5Engine
11
11
 
12
12
  EXECUTION_PATH = os.path.expanduser("~/.bbstrader/execution/execution.py")
13
13
  CONFIG_PATH = os.path.expanduser("~/.bbstrader/execution/execution.json")
@@ -52,10 +52,10 @@ def worker_function(account, args):
52
52
  "account": account,
53
53
  **config,
54
54
  }
55
- mt5_engine(account, **kwargs)
55
+ RunMt5Engine(account, **kwargs)
56
56
 
57
57
 
58
- def mt5_terminal(args):
58
+ def RunMt5Terminal(args):
59
59
  if args.parallel:
60
60
  if len(args.account) == 0:
61
61
  raise ValueError(
@@ -82,12 +82,11 @@ def mt5_terminal(args):
82
82
  p.join()
83
83
  print("Execution terminated")
84
84
  else:
85
- worker_function(None, args)
85
+ worker_function(args.account[0], args)
86
86
 
87
87
 
88
- def tws_terminal(args):
89
- raise NotImplementedError("TWS terminal is not implemented yet")
90
-
88
+ def RunTWSTerminal(args):
89
+ raise NotImplementedError("RunTWSTerminal is not implemented yet")
91
90
 
92
91
  def execute_strategy(unknown):
93
92
  HELP_MSG = """
@@ -128,11 +127,11 @@ def execute_strategy(unknown):
128
127
  }
129
128
  }
130
129
  See bbstrader.metatrader.trade.create_trade_instance for more details on the trades_kwargs.
131
- See bbstrader.trading.execution.MT5ExecutionEngine for more details on the other parameters.
130
+ See bbstrader.trading.execution.Mt5ExecutionEngine for more details on the other parameters.
132
131
 
133
132
  All other paramaters must be python built-in types.
134
133
  If you have custom type you must set them in your strategy class
135
- or run the MT5ExecutionEngine directly, don't run on CLI.
134
+ or run the Mt5ExecutionEngine directly, don't run on CLI.
136
135
  """
137
136
  if "-h" in unknown or "--help" in unknown:
138
137
  print(HELP_MSG)
@@ -150,6 +149,6 @@ def execute_strategy(unknown):
150
149
  args = parser.parse_args(unknown)
151
150
 
152
151
  if args.terminal == "MT5":
153
- mt5_terminal(args)
152
+ RunMt5Terminal(args)
154
153
  elif args.terminal == "TWS":
155
- tws_terminal(args)
154
+ RunTWSTerminal(args)
@@ -1,5 +1,11 @@
1
1
  """
2
2
  Strategies module for trading strategies backtesting and execution.
3
+
4
+ DISCLAIMER:
5
+ This module is for educational purposes only and should not be
6
+ considered as financial advice. Always consult with a qualified financial advisor before making any investment decisions.
7
+ The authors and contributors of this module are not responsible for any financial losses or damages incurred as a result of using
8
+ this module or the information contained herein.
3
9
  """
4
10
 
5
11
  from datetime import datetime
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bbstrader
3
- Version: 0.2.96
3
+ Version: 0.2.98
4
4
  Summary: Simplified Investment & Trading Toolkit
5
5
  Home-page: https://github.com/bbalouki/bbstrader
6
6
  Download-URL: https://pypi.org/project/bbstrader/
@@ -24,21 +24,24 @@ Classifier: Operating System :: MacOS
24
24
  Classifier: License :: OSI Approved :: MIT License
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
- Requires-Dist: pandas
27
+ Requires-Dist: numpy<2.0.0,>=1.26.0
28
+ Requires-Dist: scikit-learn
29
+ Requires-Dist: statsmodels
30
+ Requires-Dist: seaborn
31
+ Requires-Dist: lightgbm
32
+ Requires-Dist: dash
33
+ Requires-Dist: nltk
34
+ Requires-Dist: spacy
35
+ Requires-Dist: pmdarima
36
+ Requires-Dist: pyportfolioopt
37
+ Requires-Dist: alphalens-reloaded
28
38
  Requires-Dist: pandas_ta
29
- Requires-Dist: numpy<2.0.0
30
39
  Requires-Dist: yfinance
31
- Requires-Dist: scipy
32
40
  Requires-Dist: hmmlearn
33
- Requires-Dist: pmdarima
34
41
  Requires-Dist: arch
35
42
  Requires-Dist: hurst
36
- Requires-Dist: seaborn
37
- Requires-Dist: statsmodels
38
- Requires-Dist: matplotlib
39
43
  Requires-Dist: filterpy
40
44
  Requires-Dist: pykalman
41
- Requires-Dist: pytest
42
45
  Requires-Dist: CurrencyConverter
43
46
  Requires-Dist: tabulate
44
47
  Requires-Dist: python-dotenv
@@ -46,23 +49,17 @@ Requires-Dist: ipython
46
49
  Requires-Dist: QuantStats
47
50
  Requires-Dist: exchange-calendars
48
51
  Requires-Dist: tqdm
49
- Requires-Dist: scikit-learn
50
52
  Requires-Dist: notify-py
51
53
  Requires-Dist: python-telegram-bot
52
- Requires-Dist: pyportfolioopt
53
54
  Requires-Dist: eodhd
54
55
  Requires-Dist: financetoolkit
55
56
  Requires-Dist: PyYAML
56
57
  Requires-Dist: tables
57
- Requires-Dist: lightgbm
58
- Requires-Dist: alphalens-reloaded
59
58
  Requires-Dist: pyfiglet
60
59
  Requires-Dist: colorama
61
60
  Requires-Dist: praw
62
61
  Requires-Dist: tweepy
63
62
  Requires-Dist: beautifulsoup4
64
- Requires-Dist: dash
65
- Requires-Dist: nltk
66
63
  Requires-Dist: textblob
67
64
  Requires-Dist: vaderSentiment
68
65
  Provides-Extra: mt5
@@ -1,45 +1,45 @@
1
1
  bbstrader/__ini__.py,sha256=v6zyJHj5FMRL-_P7AwnTGbCF-riMqhqlTvDgfulj7go,621
2
- bbstrader/__main__.py,sha256=9KDkv2eXb01wuGW5AB-K6bAecSTXG4eCAErmWxTUx1E,1498
2
+ bbstrader/__main__.py,sha256=sDdjoiaHSPrVqdjU_zOLajX3rD_3Ha6dHwIivYc_vp4,1525
3
3
  bbstrader/compat.py,sha256=djbHMvTvy0HYm1zyZ6Ttp_LMwP2PqTSVw1r7pqbz7So,487
4
4
  bbstrader/config.py,sha256=c2nCUw-bYWf5kkyFls5Nqld8HdMczexSilTni7rYUBw,3973
5
5
  bbstrader/tseries.py,sha256=H4D_A966HdN8YjBfuCcF8QBQdhjOrTcidR98wP2KN_I,68339
6
6
  bbstrader/btengine/__init__.py,sha256=y1btjaEfhWsH8vuE7mBRpP9Tu-Azt9REhuVYsPCAfBU,2955
7
7
  bbstrader/btengine/backtest.py,sha256=ZzGhoN-_g0cF-OCyk173imze2OXEhykHTUiJ9MowDO8,14582
8
- bbstrader/btengine/data.py,sha256=UpHW27o7cb9ibQJ6JYovfG_zyxA9SCwR0-Zv7zUQxSM,27296
8
+ bbstrader/btengine/data.py,sha256=Tuc6M8itbGpPjsfRpZBB8v0FJpPt7-hUkP6I5meP0Sg,26927
9
9
  bbstrader/btengine/event.py,sha256=38mhZH9d53C4x7bZER2B0O6M18txzS4u7zveKyxeP5Y,8603
10
- bbstrader/btengine/execution.py,sha256=Ij5dLc9mGgtWp2dKAH5oURplA3RS_ZtwTwSrp9IYfpk,10644
10
+ bbstrader/btengine/execution.py,sha256=mXY0tyFv6G1XF48R5Kx2-pDnwu1mUyOc0ZeeysQG62A,10587
11
11
  bbstrader/btengine/performance.py,sha256=1ecWrTzHBQbk4ORvbTEKxwCzlL1brcXOEUwgbnjAwx4,12470
12
12
  bbstrader/btengine/portfolio.py,sha256=mh2_zNJDmKzb0lo55PXhbXYxXMmXRA4YLkgzwxRMuZE,16110
13
13
  bbstrader/btengine/scripts.py,sha256=8o66dq4Ex4DsH4s8xvJqUOFjLzZJSnbBvvNBzohtzoE,4837
14
- bbstrader/btengine/strategy.py,sha256=c-wvotJdhHu5FWAlPkv33LfjoW-7ID2G0Di_hc7CYMM,33217
14
+ bbstrader/btengine/strategy.py,sha256=147_i9mnYo1RUMpF6QqxXRhE6cuHh6eY9WbnZ5nqSso,31373
15
15
  bbstrader/core/__init__.py,sha256=GIFzFSStPfE0XM2j7mDeZZQeMTh_AwPsDOQXwMVJLgw,97
16
16
  bbstrader/core/data.py,sha256=VPuynoT0uFYduh7la8gZSnEv_Gq8Xu2vJZJ7TfQMll8,18797
17
- bbstrader/core/utils.py,sha256=lmL-hpaVHxuhX-V5wgBslnA4Ob89iY1omoSvL3FFOro,4120
17
+ bbstrader/core/utils.py,sha256=WjuabzBjhY65ku2KL-f7CMalE2x-wrX-6mCA_qhhFPE,2728
18
18
  bbstrader/ibkr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  bbstrader/ibkr/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  bbstrader/metatrader/__init__.py,sha256=A5Ye9tpc2sp9Xk5qjKw-EfYsoRcZtAt8nqvC3tCtZs8,333
21
- bbstrader/metatrader/account.py,sha256=qAFqCPmoUjiqjY5M9sjbSvh-STjQUGdFCHOEcB7uoDI,56493
22
- bbstrader/metatrader/copier.py,sha256=AOuoNWafNiQiZ4IIjWBG5b7UhdyYMXK6-myEPDl1O9g,31761
21
+ bbstrader/metatrader/account.py,sha256=Pwg8rVmxLLkUvcrUajfdA9Lx7u9kauJ5xXWdkPOpvTE,57374
22
+ bbstrader/metatrader/copier.py,sha256=4Rlq3V7jmMNPRb43f9AiZxdQkYOpze8lYdg3DoSxSfo,31532
23
23
  bbstrader/metatrader/rates.py,sha256=0bKyjGnafZ19DwC0-IxXUBJzOdAo-cNmhabwhKLxcos,20585
24
24
  bbstrader/metatrader/risk.py,sha256=pwG4q1_uPGgPlokDGVNtd04O6p28yIbgT-evvHuo-Qc,27029
25
25
  bbstrader/metatrader/scripts.py,sha256=Yjp7Un-wDTInptHS_rPFpXNKWbVM871VEkaHxsO2MPQ,2115
26
- bbstrader/metatrader/trade.py,sha256=6FbFywRPu0_TlB31lTMb3VjACw1GPQsi7RjQNtJnh6w,76780
27
- bbstrader/metatrader/utils.py,sha256=lYIvAeiL_ceACmkVNo4-QRopias08KyBUI7THfdj3c0,17103
26
+ bbstrader/metatrader/trade.py,sha256=R3PR1bJhBw9osCuAuoERucAJ0kUWGlXyG27wy3yXw9w,80137
27
+ bbstrader/metatrader/utils.py,sha256=szORxKJW9OG-H6nof_ovOhToSx_n8EtVwe0mkLt3eFg,17424
28
28
  bbstrader/models/__init__.py,sha256=s2mJrtKePXQaw_PvcrtPCD2mPCdVXP4Myzg0MlLVipo,547
29
29
  bbstrader/models/factors.py,sha256=5kSAOS1MHvTZ-Ti03TtjOxl_EvC-V_9e389xeR_82ak,13020
30
30
  bbstrader/models/ml.py,sha256=tCr7YyODl0CDoOUpYqJ1q12ls86Sc-_Fu3b2Y0Z7TJ8,47551
31
31
  bbstrader/models/nlp.py,sha256=P7SYaTIqEBldjwYfS6IrO66Y6-ioDXUrCSf3bZxQrDE,28073
32
32
  bbstrader/models/optimization.py,sha256=vnks6uxFZdqXgxaZJNxq8z0IH45KZ8yaXo38JhIVKGc,6399
33
33
  bbstrader/models/portfolio.py,sha256=r-47Zrn2r7iKCHm5YVtwkbBJXAZGM3QYy-rXCWY9-Bg,8079
34
- bbstrader/models/risk.py,sha256=Efr7dKcr37n75TXv5rcgSYNDPu2Plzcn65AOOIh9x_8,15007
34
+ bbstrader/models/risk.py,sha256=JQOXPshMOru6Eb0AMU6oKCNzg6mlGfL6_tN90lWcVBE,14878
35
35
  bbstrader/trading/__init__.py,sha256=ycLyuuxN5SujqtzR9X0Q74UQfK93q2va-GGAXdr-KS8,457
36
- bbstrader/trading/execution.py,sha256=cZ--FDEUaFVyLXG3Iym39nwW42xAs5XZIh8BbhdLwhE,34760
37
- bbstrader/trading/scripts.py,sha256=wR5TUrHn-Cd2kzfURXn14VTCEZ-QA8ydwYHayMPK0oI,5720
38
- bbstrader/trading/strategies.py,sha256=yibrXPa8yw8KCNkJEmNaygjfleCNgA_T58vizGS584I,36159
36
+ bbstrader/trading/execution.py,sha256=IQCPd-MAColYw3H_2WqbBzLIOAhVqNWvZ-bZIaml-ro,38160
37
+ bbstrader/trading/scripts.py,sha256=Tf5q33WqqygjpIv43_8nA82VZ3GM0qgb4Ggo3fHJ_wg,5744
38
+ bbstrader/trading/strategies.py,sha256=D_M91UwRiFwZKvKFKmz427TPd-dNyWWbhehaP8RI17c,36539
39
39
  bbstrader/trading/utils.py,sha256=57dKF9dcRu04oU2VRqydRrzW39dCW2wlDWhVt-sZdRw,1857
40
- bbstrader-0.2.96.dist-info/licenses/LICENSE,sha256=ZwC_RqqGmOPBUiMDKqLyJZ5HBeHq53LpL7TMRzrJY8c,1094
41
- bbstrader-0.2.96.dist-info/METADATA,sha256=4R54TJMj-pORXTs5xbcH4BvmAkwnacbqatjhJExwZzc,11569
42
- bbstrader-0.2.96.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
43
- bbstrader-0.2.96.dist-info/entry_points.txt,sha256=0yDCbhbgHswOzJnY5wRSM_FjjyMHGvY7lJpSSVh0xtI,54
44
- bbstrader-0.2.96.dist-info/top_level.txt,sha256=Wwj322jZmxGZ6gD_TdaPiPLjED5ReObm5omerwlmZIg,10
45
- bbstrader-0.2.96.dist-info/RECORD,,
40
+ bbstrader-0.2.98.dist-info/licenses/LICENSE,sha256=ZwC_RqqGmOPBUiMDKqLyJZ5HBeHq53LpL7TMRzrJY8c,1094
41
+ bbstrader-0.2.98.dist-info/METADATA,sha256=M9AZGC1rK4ygm9BEIZZJMYyfldWxb2Pu0zY9Q6ep7Ew,11508
42
+ bbstrader-0.2.98.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
43
+ bbstrader-0.2.98.dist-info/entry_points.txt,sha256=0yDCbhbgHswOzJnY5wRSM_FjjyMHGvY7lJpSSVh0xtI,54
44
+ bbstrader-0.2.98.dist-info/top_level.txt,sha256=Wwj322jZmxGZ6gD_TdaPiPLjED5ReObm5omerwlmZIg,10
45
+ bbstrader-0.2.98.dist-info/RECORD,,