2
$\begingroup$

I intend to set up a fully automated system for trading equities and futures. As preparation for this project, I worked through a couple of books on the topic, e.g., "Trading Evolved" by Andreas F. Clenow. In said book, Andreas uses the Python library Zipline for backtesting trading strategies whereas data for both equities and futures is sourced from Quandl. While working through the book, I made a couple of observations which might influence my choice of the backtesting engine as well as the source of financial data and I am hoping to obtain some hints here.

First of all, I found out that the algorithmic trading library Zipline is not maintained anymore (though it worked perfectly for me to run all the sample code regarding equities). Therefore, I would like to know if there exist alternatives to Zipline, which are advisable and have the same (or even superior) functionality as compared to Zipline?

Moreover, when working through the sample code of said book, I was not able to run trading strategies regarding futures. The reason is that I could not source historic futures data from Quandl (which, however, worked perfectly fine for historic equities data). Therefore, I am wondering if someone has hints how to source historic futures data from Quandl (since it should work according to the book) and/or which alternative data sources for historic futures data exist and are recommendable.

Thanks a lot in advance.

$\endgroup$
1
  • $\begingroup$ A very warm welcome, to Quant.SE - please see my answer below! $\endgroup$ – vonjd Apr 5 at 19:59
2
$\begingroup$

Concerning the backtesting engine I would recommend R, especially with the packages quantmod and PerformanceAnalytics.

I wrote a blog post which gets you started by providing a simple step-by-step template:

  1. Load libraries and data
  2. Create your indicator
  3. Use indicator to create equity curve
  4. Evaluate strategy performance

You can find the post here: Backtest Trading Strategies Like a Real Quant

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for your answer. Your blog looks very interesting. I am not familiar with the R packages quantmod and PerformanceAnalytics. After having a quick look, I am of the impression that the combination of Python packages numpy, pandas, pyfolio, zipline should provide the same functionality (I could be wrong). Notwithstanding it's always good to have alternative options available. In case I will run into problems regarding certain topics, e.g., future rolling, I might consider switching to R. All the best $\endgroup$ – Tobson Apr 6 at 22:21
1
$\begingroup$

QuantRocket supports backtesting and live trading with Zipline:

https://www.quantrocket.com/zipline/

QuantRocket maintains its own fork of Zipline and thus is unaffected by the shutdown of Quantopian, Zipline's original maintainer. End-of-day and 1-minute historical equities data are included, and you can backtest and trade futures strategies by connecting to an Interactive Brokers account for futures data.

Disclaimer: I'm affiliated with QuantRocket.

$\endgroup$
1
  • $\begingroup$ Thanks a lot, Brian. I have watched parts of the introductory video. What would be the added benefit of using quantrocket over just implementing trading strategies using the Python packages zipline, pandas, numpy and pyfolio in combination with sourcing data from quandl? $\endgroup$ – Tobson Apr 6 at 22:45
0
$\begingroup$

For backtesters, id recommend quantconnect or backtrader

https://www.quantconnect.com/ https://www.backtrader.com/

For data sources...

https://iexcloud.io/ https://polygon.io/

All the best, Brett

$\endgroup$
1
  • $\begingroup$ Thanks a lot, Brett. I will further investigate these options. $\endgroup$ – Tobson Apr 6 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.