Back

Runtime Error: System.Exception: Execution Security Error: Operation timed out - 19.6666666666667 minutes max

This is what I get in the logs. Am I doing something wrong?

 

Runtime Error: System.Exception: Execution Security Error: Operation timed out - 19.6666666666667 minutes max

 

Update Backtest








Sorry I should have added the stack trace. here it is:

 


842 | 14:30:28:
Runtime Error: System.Exception: Execution Security Error: Operation timed out - 19.6666666666667 minutes max. Check for recursive loops.
at QuantConnect.Isolator.ExecuteWithTimeLimit (System.TimeSpan timeSpan, System.Func`1[TResult] withinCustomLimits, System.Action codeBlock, System.Int64 memoryCap) [0x00290] in <2a4f50e5c9d54d7b86445ca48e409286>:0
at QuantConnect.Lean.Engine.Engine.Run (QuantConnect.Packets.AlgorithmNodePacket job, System.String assemblyPath) [0x00713] in <3feff023a6034110934d5d2c49a9e820>:0 (Open Stacktrace)

 

0

Another try caused the same exception with a different time out. This time 7.33333333333333 minutes:

 


394 | 01:00:26:
Runtime Error: System.Exception: Execution Security Error: Operation timed out - 7.33333333333333 minutes max. Check for recursive loops.
at QuantConnect.Isolator.ExecuteWithTimeLimit (System.TimeSpan timeSpan, System.Func`1[TResult] withinCustomLimits, System.Action codeBlock, System.Int64 memoryCap) [0x00290] in <2a4f50e5c9d54d7b86445ca48e409286>:0
at QuantConnect.Lean.Engine.Engine.Run (QuantConnect.Packets.AlgorithmNodePacket job, System.String assemblyPath) [0x00713] in <3feff023a6034110934d5d2c49a9e820>:0 (Open Stacktrace)

 

0

If you post code it you will get better help otherwise we have to guess.  Based on the error it is pointing to resource heave or infinite loops. Check on this first. 

1

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


The reason that I didn't post my code earlier was because this is not really a backtest. I am doing some data crunching in this code. I had emails with Jared and explained it to him. In one of his last emails he said the timeout seemed odd but this was on Friday. It's weekend right now and I didn't really expect an answer until everyone is back to work. So your reply is really appreciated.

I have nested loops but they are definitely not infinite. I used OnData to break down the loops and run smaller pieces of the calculations but still something is enforcing a timeout. I know that each loop takes only fractions of a second so the timeout must be on something else. I guess it's mostly a configuration somewhere and not related to the code.

I thought the timeout could be because that I'm not doing any trades in the loop. So then I added a buy on each loop to show some trades but still it's timing out.

 

0



Error is prett self explanatory, you're ouy of time.



Limits on backtests are calculated by looking at the number and type of

subscriptions and estimating a maximum which is a realistic non error case.



If you want more help share a backtest or code snippet.
0

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi Jared,

Thanks for the reply. I posted the code a little earlier (it doesn't have a chart though). I understand the problem but don't know how to overcome the timeout limitation.

 

Thanks!

0

Hi Patrick. You're spending 20 minutes backtesting a 10 minute window - I'm sure you can see the problem here :). You may want to investigate increasing the program speed. You can also try making a much longer time period as the time allocated is proportional to the backtest length.

0

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed