Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Frustrated about using zipline in own IDE

Hi,
I was so motivated about building my own algorithms using Quantopian's zipline. I started with Quantopian but hated it to code in my browser. So I switched to using zipline in my own IDE. Unfortunately, I cannot use Zipline due to some data errors (thanks to Google Finance). How do you build your algorithms. I cannot believe that people build ML algorithms in their browser. Any recommendations?

6 responses

I personally enjoy using the browser based IDE. Never had any problems and it just works. Don't need to worry about installing anything. Being in the cloud I can move from my laptop, to my desktop Mac, to a friends PC and always have access to my algorithms from anywhere. Moreover, using the Quantopian IDE gets access to all the Quantopian data. Can't easily do that on ones own. I'm just the opposite as @Niklas, I can't believe people would want to install a local copy of zipline and deal with all the headaches.

I’ve always used the browser IDE as well.

But don't you think it's a disadvantage to only have one file where you need to code everything (I prefer using different files)

Agreed. The notbook/IDE arrangement on Quantopian is not ideal. I gather that there are some fundamental reasons why we have the current set up, versus a more conventional one, akin to a desktop development environment. Security issues are near the top of the list, I would imagine. There is also an element of surveillance in the Quantopian business model, with the consent of its users (no different from all the other "free" web offerings). The idea is that you launch a full backtest and then Quantopian gets to assess it into the future. So, a snapshot of your code needs to be captured, so effectively, any files you pull in to your algo would need to be captured, as well, and "frozen" such that the backtest can't be changed by your changing one of the files (I'm not sure how Quantopian manages the modules that are imported...I gather that for any algos that are of critical importance, they may do a before/after comparison, to see the effect of changes). So, a simple solution is to just require users to copy and paste into the IDE, versus allowing import my_module for example. Supposing my_module import were supported, then for every backtest, users would need to be able to access the frozen copy of the my_module. It basically makes the idea of a user code library very cumbersome to implement. There's probably a solution, but copy-and-paste is simple and works for now, as ugly as it is.

Note that there are some current efforts to improve the IDE:

https://www.quantopian.com/posts/improved-backtest-list-interface-significant-changes-coming

One feature of the online IDE, which may go unnoticed, is the small triangle icon to the left of the code blocks. One can click these to expand and collapse various blocks. Not the same as having the ability to re-use and load multiple files, but it does make a long piece of code more manageable.

Thanks for mentioning that, it's going to make my life easier, collapsing large blocks of code I'm not working with. Can't believe I never tried it. Would also be nice if it can remember state when reopening file in the future.