This project is intended to allow users to connect to a MySQL server, transferring backtesting data between the two. Historical data can be uploaded and stored for later use, meaning backtesting won't be limited by the trading API.
Key functions included in this package are:
- Connecting to the MySQL server.
- Uploading historical data.
- Use
pip install backtesting-server
andpip install ig-package
in the command prompt. Note: ig-package is not essential but will be extremely useful. - Import the BacktestingServer object into your script:
from backtesting-server import BacktestingServer
- Initialise the BacktestingServer object including your standard server details and your MySQL server details.
server = BacktestingServer(
standard_details = {
"server": "",
"username": "",
"password": ""
}, sql_details = {
"server": "",
"username": "",
"password": ""
})
This project is fairly specific to my own personal MySQL server and the way I wish to carry out backtesting. However if you do want to contribute to the package, make sure you have your own MySQL server running and have my other IG Package.
Please make sure to report any bugs found as issues on Github. If you then want to submit a pull request, make sure to reference the issue.
- Adding methods to upload backtesting strategy results.