Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Help! My backtests don't complete!

Whenever I run backtests on minute mode, they crash before finishing. The same algo runs fine on daily mode and on short periods on minute mode but anything longer than 2 months will give me a "Something went wrong, sorry for the inconvenience" error without further explanation. Does anyone know why this is happening? Thanks in advance.

4 responses

There are a lot of things that could be going wrong. It depends on what your algo does. Have you tried using logging to find the part of your code that doesn't work?

Anytime I've had these errors are when my algos are too computationally taxing.. I'm guessing there is some sort of processing limit set that throws an error when surpassed.This would make sense in your situation where going past the 2 months threshold uses up too much processing power.
The way I got around this is just by optimizing the code to be as efficient as possible. Avoid repeat calculations wherever possible.

Hi Aitor,

If your algorithm was taking too long to perform its calculations, you would have seen an error along the lines of "too much time spent in handle_data." The message you are describing sounds like a symptom of a bug on our end.

If you are open to it, I'd like to take a look at your algo so we can determine what is causing the problem. If you add [email protected] as a collaborator, I'd be happy to help you find a fix.

Andrew

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.

It doesn't say anything about handle data. Guess I'll try to simplify my calculations. As the programming newbie I am, my algorithms are anything but elegant.