Back to Community
many intermittent crashes/errors when running backtests

Hi everyone,

i've ran many backtests and some of them complete, but most of them break part way through with an error:

Something went wrong. Sorry for the inconvenience. Try using the built-in debugger to analyze your code. If you would like help, send us an email. Need Help? Contact Support  

It seems that the errors occur stochastically. quick and lightweight scripts always finish, and scripts that are computationally intensive often crash at random/intermittent points. is anyone else experiencing this? and Quantopian, any knowledge of the cause?

10 responses

Hi folks, I'm still gettting crashes when running computationally intensive algorithms. Any ideas? Thanks.

Hard to tell what's going on without seeing the code. Every time I've gotten that message, I found a bug somewhere in the code.

so right now, i'm trying to write a crashing algo that is extremely simple.

my issue is that the same algo will run and crash at random times during the backtest, for example, at 22%, 50%, 91%, with no changes to the algo.

You might try sharing your code.

yeah, indeed. I'm trying to invoke an error first to be sure this one breaks.

I don't believe the problem is in toan tran code. In the last week I have been experiencing the same issue, even with algorithms that used to run properly. I believe they made some changes in the platform that resulted in this constant crash of many algorithms.

this one crashes.

Clone Algorithm
11
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 576f49fd6bb71b0f871c5dd3
There was a runtime error.

I have an algo which is running live fine (and has for months) but I can no longer start a backtest of it. I am not sure if that is the same problem.

I'm guessing they've added something that is causing memory fragmentation. when I ran toan's code it crashed when it was trying to create the big pandas dataframe.

Simon, I've had a similar problem in the past. I think that at some point i accidentally pasted some white space character. this may be the case, or you may have erased 1 character from your code by accident.

So actually, I've had this crashing problem for as long as i can remember. If your algorithms uses machine learning or other computationally intensive processes, there is a much greater chance that it will crash at some intermittent point. It could still be due to memory frag, but I don't think it was a result of recent updates.