Awesome Open Source
Awesome Open Source


Quantdom is a simple but powerful backtesting framework written in python, that strives to let you focus on modeling financial strategies, portfolio management, and analyzing backtests. It has been created as a useful and flexible tool to save the systematic trading community from re-inventing the wheel and let them evaluate their trading ideas easier with minimal effort. It's designed for people who are already comfortable with Python and who want to create, test and explore their own trading strategies.

Quantdom is in an early alpha state at the moment. So please be patient with possible errors and report them.


  • 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



Using the binaries

You can download binary packages for your system (see the Github Releases page for available downloads):

Running from source code

You can install last stable release from pypi:

$ pip install quantdom

And latest development version can be installed directly from GitHub:

$ pip install -U git+

After that, to run the application just execute one command:

$ quantdom


  1. Run Quantdom.
  2. Choose a market instrument (symbol) for backtesting on the Data tab.
  3. Specify a file with your strategies on the Quotes tab, and select one of them.
  4. Run a backtest. Once this is done, you can analyze the results and optimize parameters of the strategy.

Strategy Examples

Three-bar strategy

A simple trading strategy based on the assumption that after three consecutive bullish bars (bar closing occurred higher than its opening) bulls predominate in the market and therefore the price will continue to grow; after 3 consecutive bearish bars (the bar closes lower than its opening), the price will continue to down, since bears predominate in the market.

from quantdom import AbstractStrategy, Order, Portfolio

class ThreeBarStrategy(AbstractStrategy):

    def init(self, high_bars=3, low_bars=3):
        Portfolio.initial_balance = 100000  # default value
        self.seq_low_bars = 0
        self.seq_high_bars = 0
        self.signal = None
        self.last_position = None
        self.volume = 100  # 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,
                'volume': self.volume,
                'time': quote.time,
            if not self.last_position:
                self.last_position =**props)
            elif self.last_position.type != self.signal:
                Order.close(self.last_position,, time=quote.time)
                self.last_position =**props)
            self.signal = False
            self.seq_high_bars = self.seq_low_bars = 0

        if quote.close >
            self.seq_high_bars += 1
            self.seq_low_bars = 0
            self.seq_high_bars = 0
            self.seq_low_bars += 1

        if self.seq_high_bars == self.high_bars:
            self.signal = Order.BUY
        elif self.seq_low_bars == self.low_bars:
            self.signal = Order.SELL


In progress ;)


  • 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:
  • 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!


This software should not be used as a financial advisor, it is for educational use only. Absolutely no warranty is implied with this product. By using this software you release the author(s) from any liability regarding the use of this software. You can lose money because this program probably has some errors in it, so use it at your own risk. And please don't take risks with money you can't afford to lose.


I'm very interested in your experience with Quantdom. Please feel free to send me any feedback, ideas, enhancement requests or anything else.


Licensed under the Apache License, Version 2.0

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (836,862
Finance (7,059
Trading (5,827
Investment (1,433
Stock Market (1,232
Algotrading (692
Algorithmic Trading (691
Fintech (676
Trading Strategies (575
Backtesting (544
Quant (534
Quantitative Finance (411
Backtest (372
Financial Analysis (287
Trading Platform (270