Expected Behavior
Non-zero IV and Greeks for 0DTE SPXW in live mode.
Actual Behavior
Zero IV and Greeks for 0DTE SPXW in live mode
QuantLib models have non-zero values and 1DTE with GreeksIndicators too
Potential Solution
Review implementation. It might be due to expiration since 1DTE works well.
Reproducing the Problem
class IndexOptionAlgorithm(QCAlgorithm):
def initialize(self):
Log.debugging_enabled = self.live_mode
self.set_start_date(2024, 9, 1)
self.set_end_date(2024, 12, 31)
self.set_cash(100000)
# Subscribe to the option chain.
self._option = self.add_index_option("SPX", "SPXW")
# Filter the option universe to only select 0DTE options.
self._option.set_filter(-5, 5, 0, 0)
#self._option.set_price_model(OptionPriceModels.QuantLib.black_scholes())
self._dividend_yield_model = GreeksIndicators.get_dividend_yield_model("SPX")
self._interestRateProvider = InterestRateProvider()
def on_data(self, slice):
if self.portfolio.invested:
return
dividend_yield = self._dividend_yield_model.get_dividend_yield(self.time)
interest_rate = self._interestRateProvider.get_interest_rate(self.time)
self.log(f'{dividend_yield=}, {interest_rate=}')
# Get the option chain data.
chain = slice.option_chains.get(self._option.symbol)
if not chain:
return
for c in chain:
self.log(f'{c.symbol} {c.implied_volatility} {c.greeks.delta}')
Deployed to QC Paper using Schwab data.
Checklist
Expected Behavior
Non-zero IV and Greeks for 0DTE SPXW in live mode.
Actual Behavior
Zero IV and Greeks for 0DTE SPXW in live mode
QuantLib models have non-zero values and 1DTE with GreeksIndicators too
Potential Solution
Review implementation. It might be due to expiration since 1DTE works well.
Reproducing the Problem
Deployed to QC Paper using Schwab data.
Checklist
masterbranch