Hi all,
Does anyone know if the class PiecewiseYieldCurve can be used with the ConvexMonotone Interpolator or not? I seem to be able to only use the Linear, LogLinear or Cubic Interpolator with PiecewiseYieldCurve but not ConvexMonotone. If I use the latter exactly like how I use the formers with the PiecewiseYieldCurve in pricing something, say some bonds, I run into problems. Anyone is able to use it successfully? Thanks! |
Hi Stephen,
There's an example in the test files (test-suite/piecewiseyieldcurve.cpp) which is a bit convoluted to interpret. It's been a while since I wrote it but - if I remember correctly - you need to specify a different bootstrap class: new PiecewiseYieldCurve<ForwardRate, ConvexMonotone, LocalBootstrap>(.....) The LocalBootstrap is designed to make the convex monotone interpolation method local to the neighbouring yieldcurve points (so risk is not spread down the curve and calibration is stable). Note that ConvexMonotone is designed to work solely with the ForwardRate. You can also pass in the exact version of the ConvexMonotone that you want in the "interpolator" parameter for the PiecewiseYieldCurve class constructor. The are three parameters for the ConvexMonotone interpolator class: 1) quadraticity; the higher this number is (minimum of 0.0, maximum of 1.0), the more quadratic (smooth) the forward rate is 2) monotonicity; the higher this number is (minimum of 0.0, maximum of 1.0), the more monotonicity is enforced (if quadraticity is a low value) - this can lead to sharp gradients in the forward rate. 3) forcePositive; boolean, if TRUE it prevents negative forward rates; this can mean calibration is impossible. Try graphing the forward rates and adjust the parameters to suit your needs. If you have any problems, let me know. Simon -----Original Message----- From: StephenWong [mailto:[hidden email]] Sent: 13 January 2012 01:26 To: [hidden email] Subject: [Quantlib-users] ConvexMonotone Interpolator compatible with PiecewiseYieldCurve? Hi all, Does anyone know if the class PiecewiseYieldCurve can be used with the ConvexMonotone Interpolator or not? I seem to be able to only use the Linear, LogLinear or Cubic Interpolator with PiecewiseYieldCurve but not ConvexMonotone. If I use the latter exactly like how I use the formers with the PiecewiseYieldCurve in pricing something, say some bonds, I run into problems. Anyone is able to use it successfully? Thanks! -- View this message in context: http://old.nabble.com/ConvexMonotone-Interpolator-compatible-with-Piecew iseYieldCurve--tp33131655p33131655.html Sent from the quantlib-users mailing list archive at Nabble.com. ------------------------------------------------------------------------ ------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer. The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards. This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from The Financial Services Authority (FSA) 25 The North Colonnade, Canary Wharf, London E14 5HS United Kingdom Registered as a Limited Company in England and Wales No.1920623. Registered Office as above Switchboard: 020 7066 1000 Web Site: http://www.fsa.gov.uk ***************************************************************** ------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Thanks Simon! The example in test-suite/piecewiseyieldcurve.cpp has both PiecewiseYieldCurve<ForwardRate, ConvexMonotone, LocalBootstrap>(.....) and PiecewiseYieldCurve<ForwardRate, ConvexMonotone, IterativeBootstrap>(.....). So it seems the only restriction is to use ForwardRate as the Traits? I will have to give this a try. Thanks again!
|
Free forum by Nabble | Edit this page |