Login  Register

Re: Quant advice for a newbie trying to learn Heston model calibration via QuantLib

Posted by stephan buschmann on Nov 15, 2013; 9:43pm
URL: http://quantlib.414.s1.nabble.com/Quant-advice-for-a-newbie-trying-to-learn-Heston-model-calibration-via-QuantLib-tp14662p14664.html

Hi Klaus,
just catching up this thread.
What is your experience in using the heston model and what are the
practical shortcomings you saw? Is the model not easy to calibrate or
what is it?
Many thanks!
stephan

On Fri, Nov 15, 2013 at 10:35 PM, Klaus Spanderen <[hidden email]> wrote:

> Hi Paul,
>
>
>
> technically speaking, QuantLib Date and DayCounter classes support "Days" as
> smallest granularity.
>
>
>
> Given the fact that the Heston model has many shortcomings in practical
> usage, the missing hourly resolution is really a minor problem for the
> calibration (...and IMO the error almost cancels out because the
> Black-Scholes reference price is also calculated using the same day
> counter).
>
>
>
> The missing resolution becomes a problem if one e.g. tries to calculate the
> "pin" risk for an ATM option a few hours before expiry.
>
>
>
>
>
> regards
>
> Klaus
>
>
>
> On Friday, November 15, 2013 01:49:43 AM Paul Cao wrote:
>
> Hi Everyone,
>
>
> Thanks for being on this mailing-list and supporting users like me and to
> better the community. QuantLib has really helped me in not only having a
> useful library but also helped me understand some of the models in the
> library via the code; I'm not as strong as some of you in "groking" the
> formal steps of say, Heston, Black-Scholes in mathematical notations
> step-by-step but with the help of QuantLib's source, it has helped me in
> following along the derivation and the logic.
>
>
> I have a question about the Heston model calibration in QuantLib, AFAIK, to
> calibrate a option pricing model,
>
>
> 1) Use the QuantLib::CalibrateModel::calibrate method on the model of your
> choice (e.g., Heston)
>
> http://quantlib.sourcearchive.com/documentation/1.1-1/classQuantLib_1_1HestonModel.html
>
>
> http://quantlib.sourcearchive.com/documentation/1.1-1/classQuantLib_1_1CalibratedModel_ab3876cc20f2a7dd368789e5f6960707c.html#ab3876cc20f2a7dd368789e5f6960707c
>
>
> 2) Pass into the calibrate method a collection of CalibrationHelper
>
>
> http://www.pkill.info/linux/man/3-HestonModelHelper/
>
>
> Which is essentially a collection of actual option prices with strikes and
> expiry for the chosen optimization algorithm to search and converge on. The
> Heston Model takes in 4 parameters, so the optimizer would presumably
> iterate by varying the initial parameters based on the derived pricing
> compared to actual pricing until they converges close enough.
>
>
> 3) Choose the desired optimization algorithm steps, and acceptable
> constraint/error range.
>
>
> However, what I *don't* understand is why the calibration helper's maturity
> argument's time resolution is only up to day and not minute or hourly bars.
>
>
> e.g.,
>
>
> HestonModelHelper(const Period &maturity...) where Period has a TimeUnit
> type which is a enum of {Days, Weeks, Months, Years}. Now, under regular BSM
> model and option prices in general, option pricing is sensitive to time
> resolution of expiration down to minutes especially on the day of expiration
> due to increasing theta decay.
>
>
> So I'm not understanding why the CalibrationHelper class constructor only
> takes in the Day resolution to calculate the theoretical option price.
> Perhaps I'm missing something, I understand that Heston model models only
> the volatility; so perhaps the pricing calculation based off it still
> require the other parameters. But unfortunately, I'm unable to figure it out
> via the sample code or the QuantLib references,
>
>
> If anyone can pinpoint me to my misunderstandings and how calibration really
> works, I'd greatly appreciated; thanks again for everyone's help and
> support,
>
>
> Best,
>
> Paul Cao
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users