-
Free, open-source and cross-platform backtesting framework -
Multiple data feeds: csv files and online sources such as Google Finance, Yahoo Finance, Quandl and more -
Investment Analysis (performance and risk analysis of financial portfolio) -
Charting and reporting that help visualize backtest results
-
Python three point six or higher -
PyQt5 -
PyQtGraph -
NumPy -
See pyproject.toml for full details.
$ pip install quantdom
$ pip install -U git+ https://github.com/constverum/Quantdom.git
$ quantdom
-
Run Quantdom. -
Choose a market instrument (symbol) for backtesting on the Data tab. -
Specify a file with your strategies on the Quotes tab, and select one of them. -
Run a backtest. Once this is done, you can analyze the results and optimize parameters of the strategy.
from quantdom import AbstractStrategy , Order , Portfolio
class ThreeBarStrategy ( AbstractStrategy ): def init ( self , high_bars = three , low_bars = three ): Portfolio . initial_balance = one hundred thousand # default value
self . seq_low_bars = zero
self . seq_high_bars = zero
self . signal = None
self . last_position = None
self . volume = one hundred # shares
self . high_bars = high_bars
self . low_bars = low_bars
def handle ( self , quote ): if self . signal : props = { 'symbol' : self . symbol , # current selected symbol
'otype' : self . signal , 'price' : quote . open , 'volume' : self . volume , 'time' : quote . time , } if not self . last_position : self . last_position = Order . open ( ** props ) elif self . last_position . type != self . signal : Order . close ( self . last_position , price = quote . open , time = quote . time ) self . last_position = Order . open ( ** props ) self . signal = False
self . seq_high_bars = self . seq_low_bars = zero
if quote . close > quote . open : self . seq_high_bars += one
self . seq_low_bars = zero
else : self . seq_high_bars = zero
self . seq_low_bars += one
if self . seq_high_bars == self . high_bars : self . signal = Order . BUY
elif self . seq_low_bars == self . low_bars : self . signal = Order . SELL
-
Add integration with TA-Lib -
Add the ability to use TensorFlow/CatBoost/Scikit-Learn and other ML tools to create incredible algorithms and strategies. Just as one of the first tasks is Elliott Wave Theory(Principle) - to recognize of current wave and on the basis of this predict price movement at confidence intervals -
Add the ability to make a sentiment analysis from different sources (news, tweets, etc) -
Add ability to create custom screens, ranking functions, reports
-
Fork it: https://github.com/constverum/Quantdom/fork -
Create your feature branch: git checkout -b my-new-feature -
Commit your changes: git commit -am 'Add some feature' -
Push to the branch: git push origin my-new-feature -
Submit a pull request!