Hello,
I'm wondering why this algorithm did not trade CBLI, INMB, PRCP, IMV, DARE, or CLBS on 7/14. I thought it might be because those symbols are not in the top 1,000 dollar volume from the previous day like the coarse universe selection is looking for? But when I raise the numberOfSymbols field above 1,000, I get a Runtime Error. Do you know why I'm seeing that error? And/or why the above symbols did not get traded?
Thanks!
Sean
Shile Wen
Hi S O’Keeffe,
You are right in that the algorithm changes the tickers it trades based on what is selected by the coarse filter.
The reason why the algorithm gives a Runtime Error with no extra details is most likely because the algorithm ran out of RAM due to the Second Resolution and high number of tickers. At 1000 tickers, the algorithm was on the edge of running out of RAM, so the extra tickers beyond 1000 triggered the RAM limit.
Best,
Shile Wen
S O'Keeffe
Hi Shile,
Thanks so much for your response! I'm wondering if there is a way to prevent running out of RAM?
- If I upgrade to a different account level, how much does that expand the capacity of RAM for my backtests?
- Is there another way to trim the universe or amount of RAM being used? I want to be looking at all stocks that are up over 10% on the day. And I need second resolution to make quick entries and exits. Maybe if I switched to refreshing the list of symbols that are 10%+ every minute instead of every second? Is the algorithm in its current state refreshing the list of symbols that are 10%+ every second?
- Maybe I could switch the universe selection to pick the stocks with the highest short ratio or short float? Is that a possibility with universe selection?
- Any other ideas would be great too!
Thank you,Sean
Shile Wen
Hi S O’Keeffe,
Best,
Shile Wen
S O'Keeffe
Hi Shile,
OK thank you so much for responding!
- I will definitely need to upgrade if this strategy proves worth trading live
- I just realized it won't be possible to scan for stocks that are 10%+ on the day in minute resolution, but make all trades in second resolution will it? Everything has to be in the same time resolution right?
- It looks like that example of using the Short Ratio/Interest isn't compatible for Algorithm Frameworks. There is no "OnData "section in my algorithm, so I'm not sure how to apply or copy what Jack has done there?
Thank you!Sean
Shile Wen
Hi S O’Keeffe,
One is to perform the preliminary filter in coarse, then in OnData, create an empty list, and add to that list symbols filtered for +10% and by Short Interest, then either emit insights for all of those symbols to keep it compatible with the Algorithm Framework. Switching between minute and second resolutions shouldn’t affect whether we can scan for symbols that are +10%.
Best,
Shile Wen
S O'Keeffe
Hi Shile,
Awesome I had not read that "Upgrading Classic Algorithms" section before! That should be a very helpful tool for potentially switching to Short Ratio/Interest or other factors. Thank you!
And just to confirm, it's not possible to have one part of the algorithm (scanning for 10%+) working in minute resolution and another part of the algorithm (trade execution) working in second resolution right? They both have to be in minute resolution or they both have to be in second resolution right?
Thank you!
Sean
Shile Wen
Hi S O’Keeffe,
It is possible to have Universe Selection (the scanning part) in a different resolution from the trading (presumably in OnData). So the following is valid:
self.AddEquity("W5000", Resolution.Second) self.UniverseSettings.Resolution = Resolution.Minute
Best,
Shile Wen
S O'Keeffe
Oh awesome! Thank you Shile. I didn't know that was possible. I'll see if that can allow me to run some longer backtests
Sean
S O'Keeffe
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!