Backtest engine for algorithmic trading
Project description
Backtest
A backtest engine for developing algorithmic trading strategy.
Table of Contents
Installation
$ pip install backtest
Preparation
Fetching symbols of KOSPI and KOSDAQ exchanges:
$ python -m backtest.utils.symbols_krx symbols.json
Fetched 2,820 symbols
Saved in symbols.json
Usage
The following will execute the backtest after loading configuration file, config.json
in same directory.
python -m backtest
Sample content of config.json
{
"cash": 1000000,
"ticks_dir": "ticks",
"ledger_dir": "ledger",
"symbols_file": "symbols.json",
"strategy": "strategy",
"exchanges": [
"backtest.exchanges.kospi",
"backtest.exchanges.kosdaq"
]
}
Support
Please open an issue for support.
Contributing
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.
Testing
Test codes are prepared in tests/ based on PyTest framework.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
backtest-0.7.8.tar.gz
(17.3 kB
view hashes)
Built Distribution
backtest-0.7.8-py3-none-any.whl
(38.5 kB
view hashes)