Dear all,
I have done some search on existing posts in the Forum and try to leverage those to build pre-market volume filter to get stocks that has RVOL > certain threshold before market opens.
I have tried attempted the attached backtest based on these reference links below:
- Volume filter for first 30 min of data:
- Pre Market settings
My questions:
- According to the log, Data did get pumped into OnData in Extended hours, but volume traded for SPY does not change (say from 2020-01-22 05:00 - 2020-01-22 08:00, every print statement printed the same volume after each hour, indicating that there is no incremental volume traded. It is not the expected result)
- I have set the time for scheduled event to 9:30am market open, and based on the SelectUniverse method, sort through stocks that has volume > 10 now to further narrow down the universe from coarse filter. The volume before 9:30am for these stocks are zero based on the log. While I expect the volume to be non-zero (the pre-market volume traded). How could I fix the code to achieve the expected result?
- I am trying to filter the universe based on RVOL instead of volume > 10. Is there a way that I can incorporate a simple moving average for daily volume for the past 10 days and then compute the RVOL in SelectUniverse? I have tried to look into various posts and still struggling to do that.
Many thanks in advance for any pointers.
Louis Szeto
Hi Brian
You might consider using a SymbolData class implementation to hold the informataion. We recommend minute resolution since market opening hours might not be in complete hour (e.g. 9:30am). You might pass the slice data to update the SymbolData class if the slice is not in market opening hour, and read/reset the volume counter when market open.
Best
Louis
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.
Brian tong
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!