Inconsistency between backtest historical data and and live historical data over stock split events for Raw DataNormalizationMode

Back

From the IB API spec: http://interactivebrokers.github.io/tws-api/historical_bars.html

this states "TRADES data is adjusted for splits, but not dividends".
For live algo history requests, as LEAN requests IB "TRADES" data from IB, then this will always return split-adjusted price data and not raw price data, even if the algo DataNormalizationMode is set to Raw, as is required by an algo using options, due to the greeks calculations.
Whereas for a backtest, a history request will always return raw price data if the DataNormalizationMode is set to Raw, regardless of any split events.
So for this scenario, this requires an algo to handle split adjustments itself but only when running a backtest that includes any split event.
I didn't look into the possible impact on option greeks calculations, but I suspect this is likely affected by this scenario.
I'd suggest that perhaps this is a further reason for supporting obtaining the live greeks from the broker feed.
Thanks,
ES.

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.


Thanks, Ernest good catch -- the IB Trades data normalization is indeed a bug in local users using IB as their data source and can be a Github issue for LEAN. We're looking into precalculating the greeks in conjunction with our data partners but no ETA at this time. 

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