Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Anyone else experiencing really poor app performance with Q2?

Backtests with long time periods are consistently crashing my browser for my long-short algos... just incredibly frustrating. I've been using Q for a research project for my MBA, and this week have been trying to run multiple backtests for a final piece of output. I've not been able to get the work done because of the frequent, persistent crashes since Q2 (not to mention the massively slower backtests because of enforced minute-level testing, which is faster than previous minute-level, but slower than daily tests).

Apologies for the level of rant here, but my frustration is through the roof, and I'm keen to understand whether other people are experiencing this poor performance.

22 responses

Hey Steve,
Sorry to hear about your frustration. Quantopian 2 has the potential to be much faster, but some considerations need to be taken in how you write your algos. We've listed these here, but if you want to post your algo, I am happy to review it and make some suggestions. The key factor is doing things in handle_data that you don't really need to do every minute (like recording different metrics) and not leveraging schedule_function.

KR

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 quick response, Karen. I've tried to re-write my algos to fit the new guidelines (another relatively frustrating thing to have to do in the week before I submit my project, but obviously not y'all's fault). I believe the attached backtest is the one that has been crashing my browser the most. The bt runs, completes, and then crashes my browser before I can go to the results section and copy the monthly returns. It doesn't crash if I run it over 5 years, but 10 years crashes (currently running 9 years to see if that works).

The architecture for the algo is the same as another one that I've run over 10 years without crashes. The only difference is the sorting logic for the fundamentals data (this one is actually more simple!).

Although, bizarrely, I can copy for the results from the snippet posted above...

Steve,

Regarding the problems with your browser crashing, a work-around would be to let the backtests complete in the background, and then pull the results into the research platform, using get_backtest.

I have had the experience that my browser seems to be negatively affected by running Quantopian (crashing, errors running scripts, locking out of Quantopian), although I haven't been able to put my finger on it. I can't say it is related to Q2, although it does seem that longer backtests are more problematic.

Grant

Grant that's a great idea - it certainly seems that the backtests are being run server-side, my issue is just getting them to load browser-side. So yes using get_backtests (or just posting them here, haha) seems a good solution.

Good. Note that the pyfolio tool is there, too. I think you can just feed it your backtest ID, and get a full-blown analysis of the results.

I've used that quite a bit. Though I would prefer to get some its charts in table form (especially the benchmark volatility-matched plot), and am too inept to write my own pyfolio queries to get them, though I assume it's possible.

Workaround...

Sorry to everyone watching this thread... I'm going to keep posting backtests here so I can get the results :)

So you can get the results if you post to the forum? Clever.

And again...

...

...

...

...

adv5

30d

sector 30d

GP sector

R&D sector

GP sector

GP311