Menu

#132 Error in Svensson Fitting Formula

closed-fixed
nobody
None
5
2011-08-01
2011-07-13
Wasi
No

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));

Discussion

  • Luigi Ballabio

    Luigi Ballabio - 2011-08-01

    The bug is now fixed in the Subversion repository.
    Thank you for the report.

     
  • Luigi Ballabio

    Luigi Ballabio - 2011-08-01
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB