Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Inconsistent algorithm execution in Quantopian

I tend to use lots of fundamental factors, set up elaborate pipelines, when writing my algorithms. I've been experiencing inconsistent behavior when I run a full backtest lately with my algorithms: Quantopian sometimes fails execution complaining about excessive memory usage or excessive time, sometimes not. With time especially, I've found that if I leave the browser window where I had started the full backtest, the backtest execution slows down. I don't have any hard evidence for this unfortunately, but I've found that when start a backtest, close the window, and then reopen the backtest, it seems to be running more slowly. Sometimes I find that the backtest appears to have stopped running altogether.

Does quantopian reduce the execution priority of a backtest that's not being directly observed? Is that taken into account with the timeouts that are set for the various function calls? In other words, does Quantopian measure wall clock time, or CPU clock time?

Sunil

1 response

There should be no difference in your full backtest execution with your browser open or closed. The various timeouts on your algorithm are driven by the wall clock, not the CPU clock. That means that it is possible that competition for a shared resource might make your algorithm timeout intermittently. We've built the system to make that happen infrequently, but it does happen sometimes.

If you're having regular timeouts completing your algorithm it would be good for us to understand why. There may be inefficiencies in your code; there may be limitations in our platform. If you have a backtest that you can share it would be good to see.

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.