Don't Miss
Home » Articles » Backtesting – Is Zipline Dead? Or does it just need a reload?

Backtesting – Is Zipline Dead? Or does it just need a reload?

In the past year, that is by far the most common question I get. Now that Quantopian went the way of the Dodo, is Zipline dead? Should we switch to a different backtesting engine? The short answer is that the rumors of Zipline’s demise are exaggerated, but let’s take it from the start.

My 2019 book Trading Evolved focuses on teaching you how to use Python to backtest trading strategies. In that book, I use the Zipline library and provide plenty of source code and examples of how to use this. Zipline was made by a company called Quantopian, a company I had the privilege to get to know up close.

Quantopian built this backtesting library and made it available for free, including the source code. They also made a website where you could use a hosted version of this backtester, complete with free minute level data. They gave you the tools, the data and the computing power. It was hard not to love that idea. They also had one of the very best quant finance conferences, with a large event in New York every year and a few times in Singapore as well. I should know, I was a speaker at their events in both locations quite a few times.

They did ultimately fail, as a company. That is a crying shame and they will be sorely missed. The problem, in my view, is that they did not want to monetize the part that was their real strength. They had no interest in charging for online backtesting, or starting a quant focused brokerage arm, or other more obvious ways of seeing profit. They wanted to be a hedge fund.

The plan was to have competitions on their website, where anyone can submit their trading algos. These would have to adhere to very strict criteria in terms of risk, correlations, and a whole bunch of limitations. The winners would have a shot of being included in an actual, live portfolio and the general idea would be that a crowd sourced hedge fund would rise from this. With Cohen money to burn, this experiment went on for some years, but with no prospect of reaching meaningful returns, they lost their backing and folded the shop. The few people left standing were offered jobs with Robin Hood.

This was sad to watch, but what really painful was how they simply took down their site, their excellent discussion forum and just dropped everything. Years of online resources were just deleted overnight as someone didn’t feel like paying a hundred bucks to maintain the domains.

So far, it didn’t look great.

Open Source Community to the Rescue

The good news is this. When Zipline was abandoned, it didn’t die. It was reborn, stronger and better.

When Quantopian was running the show, development was rather slow. Their primary focus was on their online environment, rather than providing the best possible backtester for local usage. Among other somewhat annoying things were the focus on backwards compatibility, which lead to very outdated dependencies.

As the open source community took over, development started moving far quicker. There have been a few interesting forks spawned, but my own choice would be Zipline-Reloaded.

Updated to the latest versions of Python, Pandas etc., bugs fixed, actively maintained. What’s not to like?

Zipline-Reloaded is a huge leap forward. It has fixed issues that Quantopian would have taken years do get around to.

Zipline is dead, long live Zipline-Reloaded!

I have updated Trading Evolved to reflect the shift to this library and the minor syntax changes needed. If you have the Kindle version, that update should be automatically available. Anyone who bought the paperback in the past few months should also have gotten the updated code. The changes are rather minor though, and you can easily pick it up by reading the Reloaded documentation.

The syntax changes are minor, but now you work with Python 3.9, Pandas 1.2.4 and be in a modern world again! This library, Zipline-Reloaded, is built and maintained by Stefan Jansen, and he’s going a great job at it. He has also updated Pyfolio, Empyrical and Alphalens. Vielen Dank, Stefan!

So to answer that most common of questions, whether Zipline is dead. No. It’s reloaded and reborn stronger and better.


Leave a Reply

Your email address will not be published. Required fields are marked *