|
From: Anders J. <and...@ti...> - 2022-02-04 08:11:43
|
Hi, Great, thanks, I'll give the FdHestonVanillaEngine a try. BR, //A On Thu, Feb 3, 2022 at 5:21 PM Luigi Ballabio <lui...@gm...> wrote: > Hello, > the calibration implemented in QuantLib (as in the > `HestonModel::calibrate` method) can only use European prices. However, > the engine pointed out by Jonathan can be used if you have some external > calibration machinery; you would write an objective function that takes the > Heston parameters as input, creates the model and the engine, prices the > quoted options, and returns the difference between calculated and quoted > price. You can read something like this in < > http://gouthamanbalaraman.com/blog/heston-calibration-scipy-optimize-quantlib-python.html> > (except you'd have to use VanillaOption and FdHestonVanillaEngine instead > of HestonModelHelper). > > Hope this helps, > Luigi > > > > On Thu, Feb 3, 2022 at 11:58 AM Jonathan Sweemer <sw...@gm...> > wrote: > >> Hi Anders, >> >> Looks like there is some code in the QuantLib test suite for >> American-style vanilla Heston pricing using FD [1]. You might be able to >> reuse some of this code for calibration purposes as well. >> >> [1] >> https://github.com/lballabio/QuantLib/blob/master/test-suite/hestonmodel.cpp#L665 >> >> On Wed, Feb 2, 2022 at 4:33 AM Anders Johansson < >> and...@ti...> wrote: >> >>> Hi, >>> >>> Is there a way to calibrate a heston model to american options using QL? >>> Which variety is the fastest? >>> >>> Thank you very much. >>> >>> //A >>> >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |