Value of Greeks.Delta is always 0.
See my backtest.
QUANTCONNECT COMMUNITY
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.
Valery T
Added
self.SetWarmUp(timedelta(10))
and
if(self.IsWarmingUp):
return
statements, still values of Greeeks.Delta is 0.
Jing Wu
Hi Valery, before getting the greeks and volatility, you need to add the pricing model.
from QuantConnect.Securities.Option import OptionPriceModels
def Initialize(self):
option = self.AddOption()
option.PriceModel = OptionPriceModels.CrankNicolsonFD()
Check this page for the available pricing models
You can also check this sample algorithm
GregasMaximus
I'm also having an issue with the greeks always being zero. I added the equity, added the options, added the pricing model and given 10 days of warmup. Still no greeks and I'm out of ideas.
Also, I don't understand why the greeks even need warmup. The greeks should not need historical data to calculate.
I've attached my backtest. At this point, it does not trade but it filters the options and gets the greeks.
Any help would be appreciated!
Â
Â
Rahul Chowdhury
HI GregasMaximus,
There are no options in your chain because your expiration filter does not allow any contracts into the chain. The expiration filter is set to
.Expiration(timedelta(0), timedelta(0)))
instead set it to something like
.Expiration(timedelta(0), timedelta(30)))
You will also need to warm up your algorithm for longer period. Right now you are warming up for 10 minutes, instead let's warm up for 30 days because the default underlying volatility model requires 30 data points to be warmed up
self.SetWarmUp(30, Resolution.Daily)
Check out the options template algorithm on the Lean repository as an example.
Best
Rahul
Valery T
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!