yQuant is an automatic trading system supporting backtest and trading engine with algorithmic trading strategy.
For detail on why I've been working on this project and what is the ultimate goal, take a look at the vision statement and features.
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt install python3.10 python3.10-venv
$ git clone git@github.com:yoonbae81/yquant
$ cd yquant
$ python3.10 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
Fetching symbols of KOSPI and KOSDAQ exchanges:
$ python -m backtest.symbols.korea_symbols.json
Fetched 2,820 symbols
Saved in symbols.json
The following will execute the backtest with the symbols file, symbols.json
in the same directory.
$ python backtest.py
Sample output as follows:
DEBUG monitor.bootstrap Initializing...
DEBUG monitor.adapters.file_fetcher Loading: 1.txt
DEBUG monitor.adapters.file_fetcher Parsing: 091990 1000 1 1234512340
DEBUG monitor.messages Created: TickFetched(chains=[], symbol='091990', price=1000.0, qty=1.0, timestamp=1234512340)
DEBUG monitor.facade Handler: <lambda> for TickFet hed(chains=[], symbol='091990', price=1000.0, qty=1.0, timestamp=1234512340)
DEBUG monitor.messages Created: MarketClosed(chains=[], total_ticks=2)
DEBUG monitor.facade Handler: market_closed for MarketClosed(chains=[], total_ticks=2)
Please open an issue for support.
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.
Test codes are prepared in tests/ based on PyTest framework.