Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How do you develop your Quantopian algos

Hi guys,
How do you develop your algorithms? What tools do you use? I find the browser IDE to be quite annoying for more intricate code and you don't have a proper debugging environment.
I've tried to work around zipline source repo with ipython notebooks and pycharm but I'm hitting a lot of problems switching from the local environment to the Quantopian platform where the algorithms will actually run.
How do you do it?
Have you built your own framework?

12 responses

I've done pretty much all of my coding in the IDE. One approach would be to use the Quantopian research environment (IPython-based) to write your low-level functions, and then copy-and-paste them into the IDE. The advantage of the research environment is that you'll have access to the same libraries and data as the backtester. You can also do backtesting there (I've never tried it), although it is not quite 1:1 code compared with an algo that runs in the IDE.

So you do everything in browser? Debugging, logging and inspecting coding/logical errors in your algos? Woow. I didn't expect to hear that. I always felt that being always connected burns a lot of developer time by waiting for the server, fighting the rubbish autocomplete and code refactoring.

Thank you very much, it helps a lot !

I too only use the browser IDE for Quantopian code.

However, I take solace in being able to write my day-job code in a proper IDE, Visual Studio. I also used Visual Studio to write python for Balch's Coursera CompFin class. If I was forced to only use the Q's rudimentary IDE for every bit of code I write I'd have quit by now.

I would love to see a quantopian plugin for the eclipse IDE. Write, save, autocomplete, all in eclipse. And when you run, it runs it in an embedded browser in eclipse itself.

Part of the challenge with Quantopian is keeping the bar and other licensed data secure, so that users don't steal it. So, some of what we have in terms of a limited IDE is due to this security issue, and also the fact that they have users running Python on their server, which I guess presents a security risk, as well. It's not the same as a bunch of employee/consultant users on workstations on a corporate network (or working remotely via VPN). One would hope that as Q moves toward their $10B hedge fund, a more sophisticated IDE will emerge, emulating what one would have on a typical desktop environment.

The better IDE you have the better the algorithms and your ability to implement advanced strategies.
The advantage Q has is that the entry level for testing and trading on your own strategy is very low. Otherwise you can always choose Metatrader, Multicharts, NinjaTrader etc that for a 1-3K gives you the chance to run your own show.
The data comes from Yahoo for testing locally anyway. Quandl has even more, for free.

At the moment I'm struggling with the errors Q IDE is reporting and recording properly the trades and their signal triggers. Is quite a hassle at least until you get the process going. Also the inability to persist temp files or create a separate utils.py file with all the boiler plate code you use to make your code smoother is another pain.

What I am suggesting with an eclipse plugin will allow for securing data.
As the execution and debugging can still happen via a browser embedded in the eclipse IDE.
The editing/running/debugging/logging interface will happen through the eclipse.

This should be doable and help a lot with productivity

@Vic have you tried using the built-in debugger to work through the code errors? https://www.quantopian.com/help#debugger

If so, what tools/features would make it easier there to debug?

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

One feature that would be very useful would be to link the slide bar at the bottom of the performance graph to the log output/transaction/daily position/gains and returns

One thing I do very often is to look at a section of the graph that has underperformed or over performed, by narrowing the slider to a section of the graph. I then would like to look at the logs associated with that section of trading. To look at the logs during that period, to look at transactions during that period, trailing performance during that period, etc.

Is something like that in the works?

I've tried it and works reasonable well for simple stuff.

The annoying bit in browser is that you:
1. can by mistake navigate back/forward.
2. cannot hover the variables to get their value...you have to add them to watch.
3. auto completion doesn't always work
4. you cannot jump in function definition, back and forth I'm abusing search and scrolling
5. it would be awesome to visualize when you short/long trades on the graph. Right now is all time series and I had implemented my own way of marking order events on the graph.

I'll stop complaining and get developing some algos.

I have submitted an algorithm for June and I still cannot see the research platform. Why is this ? Do I need to pay or something ?

@Saravanan - thanks for the feature requests! Good points, I'll pass them along.

@Vic - the contest is completely free :) A handful of algos aren't showing up on the current leaderboard, and it looks like yours is one of them. Your entry is still active and we're working on getting everyone's to appear. I'll send you a private note once yours is on the board.

hi colleagues,
it`s very interesting question. as i understood, Quantopian performs computational environment for running of user code. May be it is a docker container. If so, Quantopian may give access to this environment throw SSH/SFTP . and Pycharm can handle with it. It will copy user code to environment and run. So, user will work in Pcharm and Quantopian will get his code. Win/win.