Hi, 

For reference, I'm new to coding and Quantconnect, though have completed most of the bootcamp equities tutorials.

I'm trying to build an algo (as part of a more complicated strategy) which returns a dynamic universe of stocks with the following criteria:

  1. price between $2-$10; and
  2. average volume over the last 30 days greater than 100k shares

 

Once the daily universe of stocks has been selected, I want to log a list of each security in the universe for that day.

I have built the attached backtest (its mainly based on the algorithm built in the 200-50 EMA Momentum Universe tutorial here) to achieve the above, however I'm running into the following issues:

  1.  Whenever I try to use self.Log to log the list of securities currently in the universe (or anything other than “Hello”), I get the following error: 

 

“Runtime Error: Algorithm took longer than 10 minutes on a single time loop. CurrentTimeStepElapsed: 10.0 minutes in Isolator.cs:line 175”

For reference, I was trying to log a list of securities in the universe by using self.Log(selected). I understand this may be incorrect.

2. The algorithm is temperamental. Sometimes it will seemingly run fine (as per the attached backtest), other times it will spit out the above error at me, despite the fact I haven't changed the code in any way.

 

Does anyone have any idea why I might be running into the above issues? Is there an obvious error in my code that I'm missing? Is the only solutions to upgrade my backtest node?

I would be very grateful for any advice at all.

Kind regards,

Eoin