[ quantlib-Bugs-3366336 ] Error in Svensson Fitting Formula

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ quantlib-Bugs-3366336 ] Error in Svensson Fitting Formula

SourceForge.net

Bugs item #3366336, was opened at 2011-07-13 22:42
Message generated for change (Tracker Item Submitted) made by wasix
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3366336&group_id=12740

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Wasi (wasix)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error in Svensson Fitting Formula

Initial Comment:
The zerorate calculation of the svensson discount function has an error:

109        Real zeroRate = x[0] + (x[1] + x[2])*
110                        (1.0 - std::exp(-kappa*t))/
111                        ((kappa+QL_EPSILON)*(t+QL_EPSILON)) -
112                        (x[2])*std::exp(-kappa*t) +
113                        x[3]* (((1.0 - std::exp(-kappa*t))/((kappa_1+QL_EPSILON)*(t+QL_EPSILON)))- std::exp(-kappa_1*t));

in line 113 kappa is used instead of kappa_1

correct is this:
109        Real zeroRate = x[0] + (x[1] + x[2])*
110                        (1.0 - std::exp(-kappa*t))/
111                        ((kappa+QL_EPSILON)*(t+QL_EPSILON)) -
112                        (x[2])*std::exp(-kappa*t) +
113                        x[3]* (((1.0 - std::exp(-kappa_1*t))/((kappa_1+QL_EPSILON)*(t+QL_EPSILON)))- std::exp(-kappa_1*t));



----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3366336&group_id=12740

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev