Garch11 exmaple code needed

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

Garch11 exmaple code needed

Andrew Leach
I've been reading the Book on Implementing QuantLib that I bought on LeanPub and the test case examples and I've come up with this outline of code that I need to perform Garch11 calculations.

QuantLib::Garch11 cgarch2(iArray, Garch11::MomentMatchingGuess);
LevenbergMarquardt lm;
cgarch2.calibrate(iArray, lm, EndCriteria(3, 2, 0.0, 0.0, 0.0));
cgarch2.calibrate(iArray);
oArray = garch.calculate(iArray);

where iArray and oArray are QuantLib::TimeSeries<Volatility> objects.

Is this outline correct? I appreciate someone giving some insight as I'm relatively new to this.

Also, I don't understand how to define the EndCriteria part of the calibrate method. I've read the docs and that doesn't help me either. Could someone explain in simple English please?

What I want to do is finish after 3 interations but as far as the other parameters I'm none the wiser.

Anyone can help me?

Thanks in advance.
-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Garch11 exmaple code needed

Andrew Leach
Updated.

Please see post entitled Re: Question regarding EndCriteria parameter (Old Subject: Garch11 exmaple code needed)

-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.

On 11 July 2017 at 00:26, Andrew Leach <[hidden email]> wrote:
I've been reading the Book on Implementing QuantLib that I bought on LeanPub and the test case examples and I've come up with this outline of code that I need to perform Garch11 calculations.

QuantLib::Garch11 cgarch2(iArray, Garch11::MomentMatchingGuess);
LevenbergMarquardt lm;
cgarch2.calibrate(iArray, lm, EndCriteria(3, 2, 0.0, 0.0, 0.0));
cgarch2.calibrate(iArray);
oArray = garch.calculate(iArray);

where iArray and oArray are QuantLib::TimeSeries<Volatility> objects.

Is this outline correct? I appreciate someone giving some insight as I'm relatively new to this.

Also, I don't understand how to define the EndCriteria part of the calibrate method. I've read the docs and that doesn't help me either. Could someone explain in simple English please?

What I want to do is finish after 3 interations but as far as the other parameters I'm none the wiser.

Anyone can help me?

Thanks in advance.
-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users