Python back testing system for trading strategies, based on backtrader and AkShare, customized for China market.
This repository is tested on Python 3.10+, backtrader 1.9+ and AkShare 1.4+.
pip install cn-trader
$ git clone https://github.com/codfish-zz/cn-trader
$ cd cn-trader
$ pip install -r requirements.txt
Or
$ git clone https://gitee.com/huui/cn-trader.git
$ cd cn-trader
$ pip install -r requirements.txt
Run cn-trader with UI interface.
>>> from cn_trader import ui
>>> ui.main()
Run single test case.
$ cd tests
$ python -m unittest tests.test_stock_mainland.StockMainlandTestCase.test_strategy_check_sma_cross
Run all test cases.
$ cd tests
$ python -m unittest discover -v
Coming soon...