There seems to be a puzzling behaviour with "Theoretical Price" of option contracts computed via QuantLib. Including an example backtest.

First, let's start with

option.PriceModel = OptionPriceModels.BlackScholes();

IV results seem reasonable given that interest and yield are apparently both set to flat 1% in QC. Zero values are consistently returned for the TheoreticalPrice.

Now, compare to binomial tree pricing, such as:

option.PriceModel = OptionPriceModels.BinomialJoshi(); option.PriceModel = OptionPriceModels.BinomialJarrowRudd();

In these cases, TheoreticalPrice values are non-zero but very different from the mid-spread. Those unusual values are reproducible between backtests. Take this contract for example:

TimeAndContract,Right,Expiry,Strike,Bid,Ask,Last,TheoreticalPrice,OI,Underlying,IV,HV (BS) 2017-08-14 16:00:00 SPY 190118P00245000,Put,1/18/2019 12:00:00 AM,245.00,16.270,16.760,16.500,0.000,0,246.520,0.0858,0.1604 (binomial) 2017-08-14 16:00:00 SPY 190118P00245000,Put,1/18/2019 12:00:00 AM,245.00,16.270,16.760,16.500,7.980,0,246.520,0.0858,0.1604

Specific questions:

  1. TheoreticalPrice in Black-Scholes case: Why all zeroes?
  2. TheoreticalPrice in binomial models: Do those values carry any meaning?
  3. Could interest rate and dividend yield be set by a user? E.g., force ConstantQLRiskFreeRateEstimator(0.03) in C# API?
  4. (Somewhat separate topic) Underlying volatility model (historical, for the spot price, as in this line , security.VolatilityModel): What is the default? Over what historical period? What happens if only a few days are given as a warm-up? Any intraday models here?