Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Python-based Open Source Backtesting Frameworks

Hi,

I am thinking about to use an open source backtesting framework (python) and I am undecided which one fits best to my needs.....

It should meet the following requirements:

  • python based
  • event-driven and object-oriented design
  • easy to use, steep learning curve, lean
  • adaptable (easy to adapt for my own needs, for example extension for live trading or data visualisation or performance metrics)
  • live trading (nice to have, but not very important, I'd like to split backtesting framework from live trading anyway)
  • support of any data source
  • advanced visualization for analytics (i.e. trade plotter and interactive visualisation of past trades)
  • well and detailed documented

I am undecided and swaying between the following Python Backtesting Frameworks I've found so far:

Which tool would you recommend for a newbie doing the first steps with python and backtesting? Or do you think it's worth to start immediately with the development of my own backtester?

I'd be very grateful for your help. Thanks.

3 responses

I use both my own back testing code and also http://pmorissette.github.io/bt/ and its stats functions contained in FFN. If you want to learn python why not start from scratch?

I started from scratch and designed my own backtesting code for options. I have just finished some code to concatenate futures contracts.

But then Im a non believer in the gospel of quantopian so dont take too much notice of me.

Im more of a buy and hold type guy using strategies such as inverse volatility weighting and risk parity.

Hi Zeno,

bt looks interesting - portfolio optimisation tools like class bt.algos.WeighERC for equal risk contribution in the bt API, inverse volatility, mean-variance optimization, target weight, and more that builds on ffn.

One could use the bt API to build/extend on own algorithms that already curate own data and trade to market, like yours, via broker API like IB - definitely of interests worth exploring further.

Thanks for sharing this.

Yes exactly. I have supplemented BT with a lot of my own code such as multicurrency portolios and trading on different days of the month/quarter.

Its an excellent place to start and excellent software.