bbstrader 0.2.93__tar.gz → 0.2.94__tar.gz

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.

Files changed (51) hide show
  1. {bbstrader-0.2.93 → bbstrader-0.2.94}/LICENSE +21 -21
  2. {bbstrader-0.2.93/bbstrader.egg-info → bbstrader-0.2.94}/PKG-INFO +188 -187
  3. {bbstrader-0.2.93 → bbstrader-0.2.94}/README.md +111 -111
  4. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/__ini__.py +20 -20
  5. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/__main__.py +50 -50
  6. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/btengine/__init__.py +54 -54
  7. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/btengine/scripts.py +157 -157
  8. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/compat.py +19 -19
  9. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/config.py +137 -137
  10. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/core/data.py +22 -22
  11. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/core/utils.py +146 -146
  12. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/metatrader/__init__.py +6 -6
  13. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/metatrader/account.py +1516 -1516
  14. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/metatrader/copier.py +750 -745
  15. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/metatrader/rates.py +584 -584
  16. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/metatrader/risk.py +749 -748
  17. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/metatrader/scripts.py +81 -81
  18. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/metatrader/trade.py +1836 -1836
  19. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/metatrader/utils.py +645 -645
  20. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/models/__init__.py +10 -10
  21. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/models/factors.py +312 -312
  22. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/models/ml.py +1272 -1272
  23. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/models/optimization.py +182 -182
  24. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/models/portfolio.py +223 -223
  25. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/models/risk.py +398 -398
  26. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/trading/__init__.py +11 -11
  27. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/trading/execution.py +846 -846
  28. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/trading/script.py +155 -155
  29. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/trading/scripts.py +69 -69
  30. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/trading/strategies.py +860 -860
  31. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/tseries.py +1842 -1842
  32. {bbstrader-0.2.93 → bbstrader-0.2.94/bbstrader.egg-info}/PKG-INFO +188 -187
  33. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader.egg-info/requires.txt +1 -0
  34. {bbstrader-0.2.93 → bbstrader-0.2.94}/requirements.txt +1 -0
  35. {bbstrader-0.2.93 → bbstrader-0.2.94}/setup.cfg +4 -4
  36. {bbstrader-0.2.93 → bbstrader-0.2.94}/setup.py +104 -104
  37. {bbstrader-0.2.93 → bbstrader-0.2.94}/MANIFEST.in +0 -0
  38. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/btengine/backtest.py +0 -0
  39. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/btengine/data.py +0 -0
  40. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/btengine/event.py +0 -0
  41. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/btengine/execution.py +0 -0
  42. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/btengine/performance.py +0 -0
  43. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/btengine/portfolio.py +0 -0
  44. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/btengine/strategy.py +0 -0
  45. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/core/__init__.py +0 -0
  46. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/ibkr/__init__.py +0 -0
  47. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader/ibkr/utils.py +0 -0
  48. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader.egg-info/SOURCES.txt +0 -0
  49. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader.egg-info/dependency_links.txt +0 -0
  50. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader.egg-info/entry_points.txt +0 -0
  51. {bbstrader-0.2.93 → bbstrader-0.2.94}/bbstrader.egg-info/top_level.txt +0 -0
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2023-2025 Bertin Balouki SIMYELI
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023-2025 Bertin Balouki SIMYELI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,187 +1,188 @@
1
- Metadata-Version: 2.2
2
- Name: bbstrader
3
- Version: 0.2.93
4
- Summary: Simplified Investment & Trading Toolkit
5
- Home-page: https://github.com/bbalouki/bbstrader
6
- Download-URL: https://pypi.org/project/bbstrader/
7
- Author: Bertin Balouki SIMYELI
8
- Author-email: <bertin@bbstrader.com>
9
- Maintainer: Bertin Balouki SIMYELI
10
- License: The MIT License (MIT)
11
- Project-URL: Documentation, https://bbstrader.readthedocs.io/en/latest/
12
- Project-URL: Source Code, https://github.com/bbalouki/bbstrader
13
- Keywords: Finance,Toolkit,Financial,Analysis,Fundamental,Quantitative,Database,Equities,Currencies,Economics,ETFs,Funds,Indices,Moneymarkets,Commodities,Futures,CFDs,Derivatives,Trading,Investing,Portfolio,Optimization,Performance
14
- Classifier: Development Status :: 5 - Production/Stable
15
- Classifier: Intended Audience :: Developers
16
- Classifier: Intended Audience :: Financial and Insurance Industry
17
- Classifier: Topic :: Office/Business :: Financial :: Investment
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
21
- Classifier: Operating System :: Microsoft :: Windows
22
- Classifier: Operating System :: POSIX :: Linux
23
- Classifier: Operating System :: MacOS
24
- Classifier: License :: OSI Approved :: MIT License
25
- Description-Content-Type: text/markdown
26
- License-File: LICENSE
27
- Requires-Dist: pandas
28
- Requires-Dist: pandas_ta
29
- Requires-Dist: numpy<2.0.0
30
- Requires-Dist: yfinance
31
- Requires-Dist: scipy
32
- Requires-Dist: hmmlearn
33
- Requires-Dist: pmdarima
34
- Requires-Dist: arch
35
- Requires-Dist: hurst
36
- Requires-Dist: seaborn
37
- Requires-Dist: statsmodels
38
- Requires-Dist: matplotlib
39
- Requires-Dist: filterpy
40
- Requires-Dist: pykalman
41
- Requires-Dist: pytest
42
- Requires-Dist: CurrencyConverter
43
- Requires-Dist: tabulate
44
- Requires-Dist: python-dotenv
45
- Requires-Dist: ipython
46
- Requires-Dist: QuantStats
47
- Requires-Dist: exchange-calendars
48
- Requires-Dist: tqdm
49
- Requires-Dist: scikit-learn
50
- Requires-Dist: notify-py
51
- Requires-Dist: python-telegram-bot
52
- Requires-Dist: pyportfolioopt
53
- Requires-Dist: eodhd
54
- Requires-Dist: financetoolkit
55
- Requires-Dist: tables
56
- Requires-Dist: lightgbm
57
- Requires-Dist: alphalens-reloaded
58
- Requires-Dist: pyfiglet
59
- Requires-Dist: colorama
60
- Provides-Extra: mt5
61
- Requires-Dist: MetaTrader5; extra == "mt5"
62
- Dynamic: author
63
- Dynamic: author-email
64
- Dynamic: classifier
65
- Dynamic: description
66
- Dynamic: description-content-type
67
- Dynamic: download-url
68
- Dynamic: home-page
69
- Dynamic: keywords
70
- Dynamic: license
71
- Dynamic: maintainer
72
- Dynamic: project-url
73
- Dynamic: provides-extra
74
- Dynamic: requires-dist
75
- Dynamic: summary
76
-
77
- # Simplified Investment & Trading Toolkit
78
- ![bbstrader](https://github.com/bbalouki/bbstrader/blob/main/assets/bbstrader_logo.png?raw=true)
79
-
80
- [![Documentation Status](https://readthedocs.org/projects/bbstrader/badge/?version=latest)](https://bbstrader.readthedocs.io/en/latest/?badge=latest)
81
- [![PYPI Version](https://img.shields.io/pypi/v/bbstrader)](https://pypi.org/project/bbstrader/)
82
- [![PyPi status](https://img.shields.io/pypi/status/bbstrader.svg?maxAge=60)](https://pypi.python.org/pypi/bbstrader)
83
- [![Supported Python Versions](https://img.shields.io/pypi/pyversions/bbstrader)](https://pypi.org/project/bbstrader/)
84
- [![PyPI Downloads](https://static.pepy.tech/badge/bbstrader)](https://pepy.tech/projects/bbstrader)
85
- [![CodeFactor](https://www.codefactor.io/repository/github/bbalouki/bbstrader/badge)](https://www.codefactor.io/repository/github/bbalouki/bbstrader)
86
- [![LinkedIn](https://img.shields.io/badge/LinkedIn-grey?logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/bertin-balouki-simyeli-15b17a1a6/)
87
- [![PayPal Me](https://img.shields.io/badge/PayPal%20Me-blue?logo=paypal)](https://paypal.me/bertinbalouki?country.x=SN&locale.x=en_US)
88
-
89
- [Dcoumentation](https://bbstrader.readthedocs.io/en/latest/index.html)
90
-
91
- ## Overview
92
-
93
- BBSTrader is a trading system suite developed for MetaTrader 5 (MT5) and IBKR platforms (comming soon), designed to offer a comprehensive set of tools for developping, backtesting, executing, and managing a wide array of trading strategies. With an emphasis on algorithmic and quantitative trading to provide traders with a robust platform for exploring and deploying sophisticated trading strategies.
94
-
95
- `bbstrader` is comprised of several key modules, each focus on specific aspects of trading strategy development and execution:
96
-
97
- - **Backtesting Module (btengine)** : Enables traders to rigorously test their trading strategies using historical data to evaluate performance before live deployment.
98
- - **Trading Strategies Module**: A collection of predefined trading strategies, including ARIMA+GARCH models, Kalman Filters, and Simple Moving Averages, equipped with risk management through Hidden Markov Models.
99
- - **MetaTrader5 Module (metatrader)**: Facilitates the direct execution of trading strategies on the MetaTrader 5 platform, supporting real-time trading across multiple financial instruments.
100
- - **Models Module**: Serves as a framework for implementing various types of financial models (risk managment models, Machine learing models etc).
101
- - **Time serie Module (tseries)** designed for conducting advanced time series analysis in financial markets.
102
- It leverages statistical models and algorithms to perform tasks such as cointegration testing, volatility modeling, and filter-based estimation to assist in trading strategy development, market analysis, and financial data exploration.
103
-
104
- ## Features
105
-
106
- - **Comprehensive Backtesting**: Assess the performance of trading strategies with historical market data to optimize parameters and strategies for live trading environments.
107
- - **Integrated Risk Management**: Leverage advanced risk management techniques to adapt to changing market conditions and maintain control over risk exposure.
108
- - **Automated Trading**: Execute trades automatically on the MT5 platform, with support for managing orders, positions, and risk in real-time.
109
- - **Trade Copier**: Copy trades from one account to another or multiple accounts.
110
- - **Flexible Framework**: Customize existing strategies or develop new ones with the flexible, modular architecture designed to accommodate traders' evolving needs.
111
- - **Advanced Time Series Analysis**: Conduct in-depth analysis of financial time series data to identify patterns, trends, and relationships that can inform trading strategies.
112
- You can read the full documentation [here](https://bbstrader.readthedocs.io/en/latest/index.html)
113
-
114
- ## Getting Started
115
-
116
- Before you can use the bbstrader and the metratrader, you need to have MetaTrader 5 (MT5) installed on your computer and an active MT5 trading account.
117
- This Module currenlty support three brokers, [Admirals Group AS](https://cabinet.a-partnership.com/visit/?bta=35537&brand=admiralmarkets), [Just Global Markets Ltd.](https://one.justmarkets.link/a/tufvj0xugm/registration/trader), and [FTMO](https://trader.ftmo.com/?affiliates=JGmeuQqepAZLMcdOEQRp), so you need to create a demo or live account with one of them.
118
- * If you want to trade `Stocks`, `ETFs`, `Indices`, `Commodities`, `Futures`, and `Forex`, [click here](https://cabinet.a-partnership.com/visit/?bta=35537&brand=admiralmarkets)
119
- * If you want to trade `Stocks`, `Crypto`, `indices`, `Commodities`, and `Forex`, [click here](https://one.justmarkets.link/a/tufvj0xugm/registration/trader)
120
- * If you are looking for a prop firm, [click here](https://trader.ftmo.com/?affiliates=JGmeuQqepAZLMcdOEQRp)
121
-
122
- Then, you can install `bbstrader` using pip:
123
- ```bash
124
- pip install bbstrader # Mac and Linux
125
- pip install bbstrader[MT5] # Windows
126
- ```
127
-
128
- ## Examples
129
- ### Backtesting Module
130
- ```python
131
- from bbstrader.trading.strategies import test_strategy
132
-
133
- if __name__ == '__main__':
134
- # Run backtesting for Stock Index Short Term Buy Only Strategy
135
- test_strategy(strategy='sistbo')
136
-
137
- ```
138
- ### Backtesting Results
139
- ![Backtesting Results 1](https://github.com/bbalouki/bbstrader/blob/main/assets/bbs_.png?raw=true)
140
- ![Backtesting Results 2](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_metrics_1.png?raw=true)
141
- ![Backtesting Results 3](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_metrics_2.png?raw=true)
142
- ![Backtesting Results 4](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_plots_1_.png?raw=true)
143
- ![Backtesting Results 5](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_plots_2_.png?raw=true)
144
-
145
- ## Customization and Contribution
146
-
147
- `bbstrader`'s modular design allows for easy customization and extension. Traders and developers are encouraged to modify existing strategies, add new ones, or enhance the system's capabilities. Contributions to the `bbstrader` project are welcome.
148
-
149
- ## Contributing to BBSTrader
150
-
151
- We warmly welcome contributions from the trading and development community! Whether you're interested in fixing bugs, adding new features, or improving documentation, your help is invaluable to making `bbstrader` more robust and versatile. Here's how you can contribute:
152
-
153
- ### Ways to Contribute
154
-
155
- - **Develop New Strategies**: Implement and share your unique trading strategies or models.
156
- - **Enhance Existing Modules**: Optimize the performance, extend the functionality, or improve the usability of existing modules.
157
- - **Report Bugs**: Identify and report bugs to help us improve the system's stability and performance.
158
- - **Improve Documentation**: Contribute to the project's documentation for clearer guidance and better usability.
159
- - **Share Insights and Best Practices**: Provide examples, tutorials, or best practices on utilizing `bbstrader` effectively.
160
-
161
- ### How to Get Started
162
-
163
- 1. **Fork the Repository**: Start by forking the `bbstrader` repository to your GitHub account.
164
- 2. **Clone Your Fork**: Clone your forked repository to your local machine to start making changes.
165
- 3. **Set Up Your Development Environment**: Ensure you have the necessary development environment set up, including Python, MetaTrader 5, and any dependencies.
166
- 4. **Create a New Branch**: Make your changes in a new git branch, branching off from the main branch.
167
- 5. **Implement Your Changes**: Work on bug fixes, features, or documentation improvements.
168
- 6. **Test Your Changes**: Ensure your changes do not introduce new issues and that they work as intended.
169
- 7. **Submit a Pull Request**: Once you're ready, submit a pull request (PR) against the main `bbstrader` repository. Include a clear description of the changes and any other relevant information.
170
-
171
- ### Contribution Guidelines
172
-
173
- Please adhere to the following guidelines to ensure a smooth contribution process:
174
-
175
- - **Follow the Coding Standards**: Write clean, readable code and follow the coding conventions used throughout the project.
176
- - **Document Your Changes**: Add comments and update the README.md files as necessary to explain your changes or additions.
177
- - **Respect the License**: All contributions are subject to the MIT License under which `bbstrader` is distributed.
178
-
179
- We're excited to see your contributions and to welcome you to the `bbstrader` community. Together, we can build a powerful tool that serves the needs of traders around the world.
180
-
181
-
182
- ## Disclaimer
183
-
184
- Trading financial instruments involves a high level of risk and may not be suitable for all investors. The developers of `bbstrader` are not responsible for any financial losses incurred from the use of this software. Trade responsibly and at your own risk.
185
-
186
- ## License
187
- `bbstrader` is open source and available under the MIT License.
1
+ Metadata-Version: 2.2
2
+ Name: bbstrader
3
+ Version: 0.2.94
4
+ Summary: Simplified Investment & Trading Toolkit
5
+ Home-page: https://github.com/bbalouki/bbstrader
6
+ Download-URL: https://pypi.org/project/bbstrader/
7
+ Author: Bertin Balouki SIMYELI
8
+ Author-email: <bertin@bbstrader.com>
9
+ Maintainer: Bertin Balouki SIMYELI
10
+ License: The MIT License (MIT)
11
+ Project-URL: Documentation, https://bbstrader.readthedocs.io/en/latest/
12
+ Project-URL: Source Code, https://github.com/bbalouki/bbstrader
13
+ Keywords: Finance,Toolkit,Financial,Analysis,Fundamental,Quantitative,Database,Equities,Currencies,Economics,ETFs,Funds,Indices,Moneymarkets,Commodities,Futures,CFDs,Derivatives,Trading,Investing,Portfolio,Optimization,Performance
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Financial and Insurance Industry
17
+ Classifier: Topic :: Office/Business :: Financial :: Investment
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Operating System :: Microsoft :: Windows
22
+ Classifier: Operating System :: POSIX :: Linux
23
+ Classifier: Operating System :: MacOS
24
+ Classifier: License :: OSI Approved :: MIT License
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: pandas
28
+ Requires-Dist: pandas_ta
29
+ Requires-Dist: numpy<2.0.0
30
+ Requires-Dist: yfinance
31
+ Requires-Dist: scipy
32
+ Requires-Dist: hmmlearn
33
+ Requires-Dist: pmdarima
34
+ Requires-Dist: arch
35
+ Requires-Dist: hurst
36
+ Requires-Dist: seaborn
37
+ Requires-Dist: statsmodels
38
+ Requires-Dist: matplotlib
39
+ Requires-Dist: filterpy
40
+ Requires-Dist: pykalman
41
+ Requires-Dist: pytest
42
+ Requires-Dist: CurrencyConverter
43
+ Requires-Dist: tabulate
44
+ Requires-Dist: python-dotenv
45
+ Requires-Dist: ipython
46
+ Requires-Dist: QuantStats
47
+ Requires-Dist: exchange-calendars
48
+ Requires-Dist: tqdm
49
+ Requires-Dist: scikit-learn
50
+ Requires-Dist: notify-py
51
+ Requires-Dist: python-telegram-bot
52
+ Requires-Dist: pyportfolioopt
53
+ Requires-Dist: eodhd
54
+ Requires-Dist: financetoolkit
55
+ Requires-Dist: PyYAML
56
+ Requires-Dist: tables
57
+ Requires-Dist: lightgbm
58
+ Requires-Dist: alphalens-reloaded
59
+ Requires-Dist: pyfiglet
60
+ Requires-Dist: colorama
61
+ Provides-Extra: mt5
62
+ Requires-Dist: MetaTrader5; extra == "mt5"
63
+ Dynamic: author
64
+ Dynamic: author-email
65
+ Dynamic: classifier
66
+ Dynamic: description
67
+ Dynamic: description-content-type
68
+ Dynamic: download-url
69
+ Dynamic: home-page
70
+ Dynamic: keywords
71
+ Dynamic: license
72
+ Dynamic: maintainer
73
+ Dynamic: project-url
74
+ Dynamic: provides-extra
75
+ Dynamic: requires-dist
76
+ Dynamic: summary
77
+
78
+ # Simplified Investment & Trading Toolkit
79
+ ![bbstrader](https://github.com/bbalouki/bbstrader/blob/main/assets/bbstrader_logo.png?raw=true)
80
+
81
+ [![Documentation Status](https://readthedocs.org/projects/bbstrader/badge/?version=latest)](https://bbstrader.readthedocs.io/en/latest/?badge=latest)
82
+ [![PYPI Version](https://img.shields.io/pypi/v/bbstrader)](https://pypi.org/project/bbstrader/)
83
+ [![PyPi status](https://img.shields.io/pypi/status/bbstrader.svg?maxAge=60)](https://pypi.python.org/pypi/bbstrader)
84
+ [![Supported Python Versions](https://img.shields.io/pypi/pyversions/bbstrader)](https://pypi.org/project/bbstrader/)
85
+ [![PyPI Downloads](https://static.pepy.tech/badge/bbstrader)](https://pepy.tech/projects/bbstrader)
86
+ [![CodeFactor](https://www.codefactor.io/repository/github/bbalouki/bbstrader/badge)](https://www.codefactor.io/repository/github/bbalouki/bbstrader)
87
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-grey?logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/bertin-balouki-simyeli-15b17a1a6/)
88
+ [![PayPal Me](https://img.shields.io/badge/PayPal%20Me-blue?logo=paypal)](https://paypal.me/bertinbalouki?country.x=SN&locale.x=en_US)
89
+
90
+ [Dcoumentation](https://bbstrader.readthedocs.io/en/latest/index.html)
91
+
92
+ ## Overview
93
+
94
+ BBSTrader is a trading system suite developed for MetaTrader 5 (MT5) and IBKR platforms (comming soon), designed to offer a comprehensive set of tools for developping, backtesting, executing, and managing a wide array of trading strategies. With an emphasis on algorithmic and quantitative trading to provide traders with a robust platform for exploring and deploying sophisticated trading strategies.
95
+
96
+ `bbstrader` is comprised of several key modules, each focus on specific aspects of trading strategy development and execution:
97
+
98
+ - **Backtesting Module (btengine)** : Enables traders to rigorously test their trading strategies using historical data to evaluate performance before live deployment.
99
+ - **Trading Strategies Module**: A collection of predefined trading strategies, including ARIMA+GARCH models, Kalman Filters, and Simple Moving Averages, equipped with risk management through Hidden Markov Models.
100
+ - **MetaTrader5 Module (metatrader)**: Facilitates the direct execution of trading strategies on the MetaTrader 5 platform, supporting real-time trading across multiple financial instruments.
101
+ - **Models Module**: Serves as a framework for implementing various types of financial models (risk managment models, Machine learing models etc).
102
+ - **Time serie Module (tseries)** designed for conducting advanced time series analysis in financial markets.
103
+ It leverages statistical models and algorithms to perform tasks such as cointegration testing, volatility modeling, and filter-based estimation to assist in trading strategy development, market analysis, and financial data exploration.
104
+
105
+ ## Features
106
+
107
+ - **Comprehensive Backtesting**: Assess the performance of trading strategies with historical market data to optimize parameters and strategies for live trading environments.
108
+ - **Integrated Risk Management**: Leverage advanced risk management techniques to adapt to changing market conditions and maintain control over risk exposure.
109
+ - **Automated Trading**: Execute trades automatically on the MT5 platform, with support for managing orders, positions, and risk in real-time.
110
+ - **Trade Copier**: Copy trades from one account to another or multiple accounts.
111
+ - **Flexible Framework**: Customize existing strategies or develop new ones with the flexible, modular architecture designed to accommodate traders' evolving needs.
112
+ - **Advanced Time Series Analysis**: Conduct in-depth analysis of financial time series data to identify patterns, trends, and relationships that can inform trading strategies.
113
+ You can read the full documentation [here](https://bbstrader.readthedocs.io/en/latest/index.html)
114
+
115
+ ## Getting Started
116
+
117
+ Before you can use the bbstrader and the metratrader, you need to have MetaTrader 5 (MT5) installed on your computer and an active MT5 trading account.
118
+ This Module currenlty support three brokers, [Admirals Group AS](https://cabinet.a-partnership.com/visit/?bta=35537&brand=admiralmarkets), [Just Global Markets Ltd.](https://one.justmarkets.link/a/tufvj0xugm/registration/trader), and [FTMO](https://trader.ftmo.com/?affiliates=JGmeuQqepAZLMcdOEQRp), so you need to create a demo or live account with one of them.
119
+ * If you want to trade `Stocks`, `ETFs`, `Indices`, `Commodities`, `Futures`, and `Forex`, [click here](https://cabinet.a-partnership.com/visit/?bta=35537&brand=admiralmarkets)
120
+ * If you want to trade `Stocks`, `Crypto`, `indices`, `Commodities`, and `Forex`, [click here](https://one.justmarkets.link/a/tufvj0xugm/registration/trader)
121
+ * If you are looking for a prop firm, [click here](https://trader.ftmo.com/?affiliates=JGmeuQqepAZLMcdOEQRp)
122
+
123
+ Then, you can install `bbstrader` using pip:
124
+ ```bash
125
+ pip install bbstrader # Mac and Linux
126
+ pip install bbstrader[MT5] # Windows
127
+ ```
128
+
129
+ ## Examples
130
+ ### Backtesting Module
131
+ ```python
132
+ from bbstrader.trading.strategies import test_strategy
133
+
134
+ if __name__ == '__main__':
135
+ # Run backtesting for Stock Index Short Term Buy Only Strategy
136
+ test_strategy(strategy='sistbo')
137
+
138
+ ```
139
+ ### Backtesting Results
140
+ ![Backtesting Results 1](https://github.com/bbalouki/bbstrader/blob/main/assets/bbs_.png?raw=true)
141
+ ![Backtesting Results 2](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_metrics_1.png?raw=true)
142
+ ![Backtesting Results 3](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_metrics_2.png?raw=true)
143
+ ![Backtesting Results 4](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_plots_1_.png?raw=true)
144
+ ![Backtesting Results 5](https://github.com/bbalouki/bbstrader/blob/main/assets/qs_plots_2_.png?raw=true)
145
+
146
+ ## Customization and Contribution
147
+
148
+ `bbstrader`'s modular design allows for easy customization and extension. Traders and developers are encouraged to modify existing strategies, add new ones, or enhance the system's capabilities. Contributions to the `bbstrader` project are welcome.
149
+
150
+ ## Contributing to BBSTrader
151
+
152
+ We warmly welcome contributions from the trading and development community! Whether you're interested in fixing bugs, adding new features, or improving documentation, your help is invaluable to making `bbstrader` more robust and versatile. Here's how you can contribute:
153
+
154
+ ### Ways to Contribute
155
+
156
+ - **Develop New Strategies**: Implement and share your unique trading strategies or models.
157
+ - **Enhance Existing Modules**: Optimize the performance, extend the functionality, or improve the usability of existing modules.
158
+ - **Report Bugs**: Identify and report bugs to help us improve the system's stability and performance.
159
+ - **Improve Documentation**: Contribute to the project's documentation for clearer guidance and better usability.
160
+ - **Share Insights and Best Practices**: Provide examples, tutorials, or best practices on utilizing `bbstrader` effectively.
161
+
162
+ ### How to Get Started
163
+
164
+ 1. **Fork the Repository**: Start by forking the `bbstrader` repository to your GitHub account.
165
+ 2. **Clone Your Fork**: Clone your forked repository to your local machine to start making changes.
166
+ 3. **Set Up Your Development Environment**: Ensure you have the necessary development environment set up, including Python, MetaTrader 5, and any dependencies.
167
+ 4. **Create a New Branch**: Make your changes in a new git branch, branching off from the main branch.
168
+ 5. **Implement Your Changes**: Work on bug fixes, features, or documentation improvements.
169
+ 6. **Test Your Changes**: Ensure your changes do not introduce new issues and that they work as intended.
170
+ 7. **Submit a Pull Request**: Once you're ready, submit a pull request (PR) against the main `bbstrader` repository. Include a clear description of the changes and any other relevant information.
171
+
172
+ ### Contribution Guidelines
173
+
174
+ Please adhere to the following guidelines to ensure a smooth contribution process:
175
+
176
+ - **Follow the Coding Standards**: Write clean, readable code and follow the coding conventions used throughout the project.
177
+ - **Document Your Changes**: Add comments and update the README.md files as necessary to explain your changes or additions.
178
+ - **Respect the License**: All contributions are subject to the MIT License under which `bbstrader` is distributed.
179
+
180
+ We're excited to see your contributions and to welcome you to the `bbstrader` community. Together, we can build a powerful tool that serves the needs of traders around the world.
181
+
182
+
183
+ ## Disclaimer
184
+
185
+ Trading financial instruments involves a high level of risk and may not be suitable for all investors. The developers of `bbstrader` are not responsible for any financial losses incurred from the use of this software. Trade responsibly and at your own risk.
186
+
187
+ ## License
188
+ `bbstrader` is open source and available under the MIT License.