Skip to content

Add Nelson-Siegel and Smoothing Spline Yield Curve fitting #70

Open

Description

@alecloudenback

Seems like a good reference:

Three related variants:

  • Nelson-Siegel
  • Nelson-Seigel-Svensson
  • Smoothing Splines

This could be good first issue for someone familiar with the above methods already.

Activity

  1. added this to the after v1 milestone on Feb 6, 2022
  2. leeyuntien commented on Mar 7, 2022

    @leeyuntien
    Contributor

    Would like to contribute to this issue. Please advise next steps. Thanks!

  3. kasperrisager commented on Mar 7, 2022

    @kasperrisager
    Contributor

    A good first step would be to make a struct that holds the data for the Nelson-Siegel parametrisation and methods for computing discount and zero rate correctly. Add in some tests. You can get inspired by the Smith-Wilson implementation. The open a draft pr.

  4. leeyuntien commented on Mar 31, 2022

    @leeyuntien
    Contributor

    Tried to implement and added NelsonSiegelSvensson.jl and SmoothingSplines.jl whose approach might be debatable but please advise how these can be uploaded/pulled for a review.

  5. alecloudenback commented on Apr 2, 2022

    @alecloudenback
    MemberAuthor

    Awesome! Check out this article about creating a pull request: https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github

    A PR will allow the automated tests/checks to occur and makes it easy to review the changes.

  6. alecloudenback commented on Jun 16, 2022

    @alecloudenback
    MemberAuthor

    Two of three will be completed in #116

  7. leeyuntien commented on Jun 22, 2022

    @leeyuntien
    Contributor

    I have seen there are two spline methods in bootstrapping, do we still need smoothing splines? In this reference https://www.bis.org/publ/bppdf/bispap25.pdf it seems to talk about cubic splines, so smoothing splines here would mean cubic splines, or splines with even higher degrees? Thanks.

    Seems like a good reference:

    Three related variants:

    • Nelson-Siegel
    • Nelson-Seigel-Svensson
    • Smoothing Splines

    This could be good first issue for someone familiar with the above methods already.

  8. alecloudenback commented on Jun 23, 2022

    @alecloudenback
    MemberAuthor

    My understanding is that "smoothing splines" refers to fitting (minimizing error) of a starting spline model, whereas the existing methods fit simple splines through bootstrapped points (for the given points, the model error is zero).

  9. alecloudenback commented on Jun 26, 2022

    @alecloudenback
    MemberAuthor

    I was looking at DataInterpolations.jl and think that maybe it has smoothing spline fitting built in?

  10. leeyuntien commented on Jun 27, 2022

    @leeyuntien
    Contributor

    I think you are right, and there are examples showing how to call the BSpline functions. https://htmlpreview.github.io/?https://github.com/PumasAI/DataInterpolations.jl/blob/v2.0.0/example/DataInterpolations.html.

  11. alecloudenback commented on Oct 11, 2026

    @alecloudenback
    MemberAuthor

    Review update against FinanceModels v7.0.0 (6cb71714), 2026-10-11.

    Partially fulfilled; narrow the remaining feature. Nelson–Siegel and NSS are implemented with reference tests. Spline least-squares fitting, including B-spline interpolation models and fitting an existing knot grid, also exists.

    A dedicated roughness-penalized smoothing-spline API is not present. Higher polynomial degree or a smooth interpolant alone does not mean noisy observations are being smoothed, and ordinary least squares is distinct from adding a roughness penalty.

    See spline construction and knot-curve fitting. Rename/scope this issue around penalized smoothing, knot selection, and the intended loss/penalty if that capability is still wanted. Medium-priority feature, not a missing NS/NSS implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions