Back

Different results in backtesting(setfilter vs option chain provider)

Hi, while going through the <applied option> tutorial, I've found that the algortihms laid out different results when selecting option contracts by SetFilter method and OptionChainProvider. As far as I understand, they try to apply the same logic, thus I'm not getting hold of the difference in backtesting restuls. 

Does anyone have clear explanation on this issue? 

Any help would be greatly appreciated

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.


Hi Jayjay,

When using SetFilter, we specify the filtering process for selecting the option contracts. The algorithm will automatically add and remove data subscriptions for those securities.

option.SetFilter(-3, +3, timedelta(0), timedelta(30))

In contrast, when using the OptionChainProvider, data for the option contracts are not automatically (un)subscribed to. It simply returns all the option contracts symbols available for the given underlying. We need to add and remove the subscriptions manually.

contracts = self.OptionChainProvider.GetOptionContractList(self.equity.Symbol, slice.Time)

To get the same results in a backtest, we would need to filter the contracts returned from the OptionChainProvider before selecting a contract to trade. See the attached backtest log for reference. Note that the SetFilter method results in 12 contracts being provided while the OptionChainProvider returns 800 contracts.

I recommend reviewing our documentation on options for more information.

Best,
Derek Melchin

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