C# Heston Model Calibration

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

C# Heston Model Calibration

Kiwiabove
Hi,

I am not the greatest at understanding C++ but I have got all of the library working and bootstrapping a yield curve is going fine from C#. However next I want to calibrate the Heston model to get Kappa etc but I cannot figure out how to do it. Is the C# SWIG interfaces missing some required classes to do this? Can anyone give me an example or a kick start, or is it just not possible with the interfaces that exported at the moment?

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: C# Heston Model Calibration

Klaus Spanderen-2
Hi

I've submitted the missing SWIG interfaces for the HestonModelHelper and the
Levenberg-Marquardt optimizer to the SVN trunk. Please find also a Scala
Heston calibration example under

 QuantLib-SWIG/Scala/examples/HestonModelCalibration.scala

The example is a one-to-one translation of the method

HestonModelTest::testDAXCalibration()

in the C++ Heston test suite.

cheers
 Klaus


On Saturday 17 March 2012 20:11:22 Kiwiabove wrote:

> Hi,
>
> I am not the greatest at understanding C++ but I have got all of the
> library working and bootstrapping a yield curve is going fine from C#.
> However next I want to calibrate the Heston model to get Kappa etc but I
> cannot figure out how to do it. Is the C# SWIG interfaces missing some
> required classes to do this? Can anyone give me an example or a kick start,
> or is it just not possible with the interfaces that exported at the moment?
>
> Thanks in advance.



------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: C# Heston Model Calibration

Kiwiabove
Thank you very much I will try it out tonight and report back on how I got on.




<quote author="Klaus Spanderen-2">
Hi

I've submitted the missing SWIG interfaces for the HestonModelHelper and the
Levenberg-Marquardt optimizer to the SVN trunk. Please find also a Scala
Heston calibration example under

 QuantLib-SWIG/Scala/examples/HestonModelCalibration.scala

The example is a one-to-one translation of the method

HestonModelTest::testDAXCalibration()

in the C++ Heston test suite.

cheers
 Klaus
Reply | Threaded
Open this post in threaded view
|

Re: C# Heston Model Calibration

Kiwiabove

Right I have got that working. After a learning curve in sorting out the swig generation etc. I have my model calibrating, saving the values etc. I can use this with my yield curves to produce a HestonProcess, and have a RNG working, however when I come to do my own crude MC just to test things out, I don't seem to have the "Evolve" method on the HestonProcess object. Am I just not getting something here or is it not exposed to the C# interface? I couldn't find the method on a couple of the other process classes I checked, is it missing from a base type?

Klaus Spanderen-2 wrote
Hi

I've submitted the missing SWIG interfaces for the HestonModelHelper and the
Levenberg-Marquardt optimizer to the SVN trunk. Please find also a Scala
Heston calibration example under

 QuantLib-SWIG/Scala/examples/HestonModelCalibration.scala

The example is a one-to-one translation of the method

HestonModelTest::testDAXCalibration()

in the C++ Heston test suite.

cheers
 Klaus
Reply | Threaded
Open this post in threaded view
|

Re: C# Heston Model Calibration

Kiwiabove
Actually, better than that, would just be to give the ability to access the information inside "multipath" as I can build all the way out to there, but I cannot access the paths inside of the multipath class.


Kiwiabove wrote
Right I have got that working. After a learning curve in sorting out the swig generation etc. I have my model calibrating, saving the values etc. I can use this with my yield curves to produce a HestonProcess, and have a RNG working, however when I come to do my own crude MC just to test things out, I don't seem to have the "Evolve" method on the HestonProcess object. Am I just not getting something here or is it not exposed to the C# interface? I couldn't find the method on a couple of the other process classes I checked, is it missing from a base type?

Klaus Spanderen-2 wrote
Hi

I've submitted the missing SWIG interfaces for the HestonModelHelper and the
Levenberg-Marquardt optimizer to the SVN trunk. Please find also a Scala
Heston calibration example under

 QuantLib-SWIG/Scala/examples/HestonModelCalibration.scala

The example is a one-to-one translation of the method

HestonModelTest::testDAXCalibration()

in the C++ Heston test suite.

cheers
 Klaus
Reply | Threaded
Open this post in threaded view
|

Re: C# Heston Model Calibration

Klaus Spanderen-2
Hi

I've added an additional method to the MultiPath interface and the Scala
example "HestonMonteCarlo", which uses the QuantLib-SWIG interface to
implement a Heston Monte-Carlo pricer for plain vanilla european options.

cheers
 Klaus

On Saturday 24 March 2012 06:04:46 Kiwiabove wrote:

> Actually, better than that, would just be to give the ability to access the
> information inside "multipath" as I can build all the way out to there, but
> I cannot access the paths inside of the multipath class.
>
> Kiwiabove wrote:
> > Right I have got that working. After a learning curve in sorting out the
> > swig generation etc. I have my model calibrating, saving the values etc.
> > I can use this with my yield curves to produce a HestonProcess, and have
> > a RNG working, however when I come to do my own crude MC just to test
> > things out, I don't seem to have the "Evolve" method on the HestonProcess
> > object. Am I just not getting something here or is it not exposed to the
> > C# interface? I couldn't find the method on a couple of the other process
> > classes I checked, is it missing from a base type?
> >
> > Klaus Spanderen-2 wrote:
> >> Hi
> >>
> >> I've submitted the missing SWIG interfaces for the HestonModelHelper and
> >> the
> >> Levenberg-Marquardt optimizer to the SVN trunk. Please find also a Scala
> >> Heston calibration example under
> >>
> >>  QuantLib-SWIG/Scala/examples/HestonModelCalibration.scala
> >>
> >> The example is a one-to-one translation of the method
> >>
> >> HestonModelTest::testDAXCalibration()
> >>
> >> in the C++ Heston test suite.
> >>
> >> cheers
> >>  Klaus



------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users