Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Difference between zipline quantopian-quandl bundle and backtest bundle

Hello,

I have some issues with the following:
1.) My algorithm using zipline (version 1.1.0) and quantopian-quandl bundle: quantopian-quandl 2017-06-28 05:10:37.356780 gives the following results: https://anon1980.bitbucket.io/Result.png

2.) I ran the exact same algorithm in the IDE and the result is attached. The results are completely different -- all money lost! -- why? what bundle is the IDE using?

3.) I cannot use the research platform and the IDE due to the following reasons:
a.) Memory keeps on running out on the research notebook, by simply adding extra columns.
b.) Not allowed to install packages, for example genetic algorithms, convex optimizers, satisfiability modulo theory optimizers, etc.
c.) Cannot run anything in parallel.

I personally have access to 128 core 256GB shared memory machines, where running the algorithms takes seconds, and never runs out of memory, so I would prefer developing on my machines, rather than Quantopian IDE/research platform.

The only good thing about Quantopian currently is the access to fundamental data via morningstar. Other than that, the infrastructure setup is not meant for quantitative research, and instead for lucky people.

Can you please answer the simple question as to why the results that I get on running on my personal machine vs. the IDE backtest are so different? Can I download the bundle that you are using for backtests from somewhere?

Thanks,

4 responses

What are you using for a price/volume data source when you run it locally?

I'm going to guess that your local implementation is using a daily data source. In your local execution, handle_data() is being run once per day. Quantopian's data is minutely. context.day += 1 is incrementing every minute, not every day. Also, you set your commissions very high. Your algorithm is just incinerating money in broker fees by trading every few minutes.

I think you'll find a lot better performance on Quantopian if you take your business logic out of handle_data() and move it into appropriately-timed schedule_functions.

Also, have you looked at Quantopian's Optimize API?

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.

Thanks for the reply, yes I am doing daily instead of every minute. I will readjust algo now that I know this.

Hello again,

I got some time today to play around with the scheduling function, it works, but I am unsure about the history function from data object.

Right now my history function is looking up 900 days! behind, supposedly, because frequency='1d', and bar_count=30*30, see attached, which does not make any sense. Can someone please clarify the functionality of data.history function in the Quantopian IDE and if its functionality is exactly same as zipline's data.history function, because they give different results.

Again the Quantopian IDE result does not match up with the zipline result, which runs the algo every 30 days and looks back only 30 days that I am running locally -- results for local tests are here: https://anon1980.bitbucket.io/Result.png

Sorry, it was my own error......please ignore previous message.