Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct documentation error in Svensson zero rate formula #2057

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

twan3617
Copy link
Contributor

Inconsistency was found between:

  • Svensson implementation here
    Real zeroRate = x[0] + (x[1] + x[2])*
    (1.0 - std::exp(-kappa*t))/
    ((kappa+QL_EPSILON)*(t+QL_EPSILON)) -
    (x[2])*std::exp(-kappa*t) +
    x[3]* (((1.0 - std::exp(-kappa_1*t))/((kappa_1+QL_EPSILON)*(t+QL_EPSILON)))- std::exp(-kappa_1*t));
    and the
  • Svensson documentation here:
    \f$ d(t) = \exp^{-r t}, \f$ where the zero rate \f$r\f$ is defined as
    \f[
    r \equiv c_0 + (c_0 + c_1)(\frac {1 - exp^{-\kappa t}}{\kappa t})
    - c_2exp^{ - \kappa t}
    + c_3{(\frac{1 - exp^{-\kappa_1 t}}{\kappa_1 t} -exp^{-\kappa_1 t})}.
    \f]

Corrected the documentation to follow the implementation.

Copy link

boring-cyborg bot commented Aug 16, 2024

Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it.

@CLAassistant
Copy link

CLAassistant commented Aug 16, 2024

CLA assistant check
All committers have signed the CLA.

@lballabio
Copy link
Owner

Thanks for bringing attention to this—there were also a few issues in the LaTeX syntax of the formulas, I fixed those too.

@coveralls
Copy link

Coverage Status

coverage: 72.651%. remained the same
when pulling 903dda4 on twan3617:patch-1
into c0fac24 on lballabio:master.

@lballabio lballabio added this to the Release 1.36 milestone Aug 19, 2024
@lballabio lballabio merged commit 4456722 into lballabio:master Aug 19, 2024
42 checks passed
Copy link

boring-cyborg bot commented Aug 19, 2024

Congratulations on your first merged pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants