lballabio / QuantLib

The QuantLib C++ library
http://quantlib.org
Other
5.38k stars 1.79k forks source link

Call and Put option type in HestonModelHelper #1156

Closed yinshurman closed 3 years ago

yinshurman commented 3 years ago

After many failed struggles for calibrating a Heston model to real market data , I found the main reason causes the large absolute error percent is the "wrong" determination of option type in HestonModelHelper. In the file HestonModelHelper.cpp ,I found following codes : type_ = strikePrice_ * riskFreeRate_->discount(tau_) >= s0_->value() * dividendYield_->discount(tau_) ? Option::Call : Option::Put; which simply determines the type of an option by the size of the discounted price of strike and underlying spot . But both Call and Put options are available for the given strike and spot ,no matter the size of their discounted price . Even the HestonModelHelper uses the volatility to represent their price , the call and put option on the same strike usually have significant different implied volatility.

Is this a deliberate decision ? what's the reason behind it ? Is it possible to afford an option type parameter to the constructor for people to determine it themself ?

boring-cyborg[bot] commented 3 years ago

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

klausspanderen commented 3 years ago

Puts and calls with the same strike and maturity have the same implied volatility in the Heston model. IMO the type is set here to ensure that the calibration uses OTM options instead of ITM options because the vanishing intrinsic value increases the numerical stability of the calibration when calibrating to implied volatility error.

github-actions[bot] commented 3 years ago

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] commented 3 years ago

This issue was automatically closed because it has been stalled for two weeks with no further activity.