lballabio / QuantLib

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

Issue with Heston model calibration #657

Closed davewong11 closed 5 years ago

davewong11 commented 5 years ago

Sucessfully produced parameters with the example in Quantlib Python Cookbook. But what are marketValue() and modelValue() for, which are under HestonModelHelper?

lballabio commented 5 years ago

marketValue returns the price of the instrument as implied by the quoted Black volatility given as input, and modelValue returns the price according to the model being calibrated.

They are mostly for internal use by the optimizer, which compares their values and tries to adjust the parameters of the model so that the two values are as close as possible.