Hi QC,
From the discussion forums and documentation, it is my understanding that Universe selection is carried out using raw, unadjusted data as this is the best snapshot of the universe at a given point in time. However, in the EmaCrossUniverseSelectionAlgorithm you have kindly shared with the community, it seems using raw data to calculate these exponential moving average indicators may result in erroneous jumps on split / reverse split dates. How does the EMACrossUniverseSelectionAlgorithm currently handle stock split / reverse split events in its indicator calculations used for universe selection?
Thanks for any help in advance.
Daniel Chen
Hi Bgrm1,
Thank you for your question. The code example EmaCrossUniverseSelectionAlgorithm will not have a problem on split/reverse split events since it uses the adjusted price of the security to get the exponential moving average indicators. The code snippet below shows how we use adjusted data to make sure to avoid any issues related to splits, dividends, etc.
// Update returns true when the indicators are ready, so don't accept until they are
where avg.Update(cf.EndTime, cf.AdjustedPrice)
Â
For details, you may have a look at this code. The information you need is at line 87 and 88.
Hope it helps!
Bgrm1
Hi QC,
as a follow up question. I modified the EmaCrossUniverseSelectionAlgorithm to find big movers using the ROC indicator:
where filter.UpdateROC(cf.EndTime, cf.AdjustedPrice)
where Math.Abs(filter.roc) >= 0.2m
Then I logged out the values returned by the CoarseSelectionFunction to sanity check. As example below:
2019-06-25 00:00:00 2019-06-22 00:00:00Z | AVGR | ROC: 7.92642 Volume(20): 294532.6This huge ROC value is because of a reverse split that occurred after market close on 21 June 2019. It seems even if I feed in cf.AdjustedPrice as input to the indicator method in universe selection, the indicator is still using raw data?Â
Link Liang
Hi Bgrm1,
That is a fairly recent split event. Our data vendor updates split factor data with a delay of up to two days. I believe our data is updated with the AVGR split event and its split factor. Please check and let us know if you still have issues with split adjustment handling. Thanks for your support!
Bgrm1
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!