I have cloned the OptionChainConsistencyRegressionAlgorithm and was trying to log IV on options data and i am getting zero.
public override void OnData(Slice slice)
{
if (!Portfolio.Invested)
{
OptionChain chain;
if (slice.OptionChains.TryGetValue(OptionSymbol, out chain))
{
// check if data is consistent
foreach (var o in chain)
{
Log(string.Format("chain:{0} Bid:{1} Ask:{2} IV:{3}", o.Symbol, o.BidPrice, o.AskPrice, o.ImpliedVolatility));
if (!Securities.ContainsKey(o.Symbol))
{
// inconsistency found: option chains contains contract information that is not available in securities manager and not available for trading
throw new Exception(string.Format("inconsistency found: option chains contains contract {0} that is not available in securities manager and not available for trading", o.Symbol.Value));
}
}
}
}
Jared Broad
Thanks @Venugopal! Options is in beta - please join the slack conversation here to hear about the updates: http://qnt.co/slack
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.
Venugopal talapallikotturi
Thank you Jared.
KILLC
In case anyone else is having this issue, you need to set a pricing model as in this algo:
Matt M
Hi, I'm also getting 0 for implied volatility. Â I started w/ the basic algo from githubÂ
Â
for future options and added a pricing model. Â I'd attach a backtest, but it's not showing in the list.
The following never triggers -Â
Â
Venugopal talapallikotturi
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!