Fixed Income Course
Nelson-Siegel-Svensson Curve Fitting
Fit parametric yield curve models and decompose curves into level, slope and curvature factors.
Enrol now
- Lifetime access — all lessons & updates
- 10 lessons across 2 structured parts
- Fully worked Jupyter notebooks
- Market datasets + published benchmark prices
- Free lesson previews before you buy
- 14-day money-back guarantee
Secured by a no-questions-asked 14-day refund.
Overview
Introduction
The Nelson-Siegel and Nelson-Siegel-Svensson models are the workhorses of central bank curve fitting. The European Central Bank, the US Federal Reserve and dozens of sovereign debt management offices use them to produce the official yield curves their research and policy decisions rest on. This course builds both models from first principles and teaches you to calibrate them reliably.
What makes these models powerful is their economy of parameters: a handful of coefficients encode the entire term structure in terms of its economic components — the long-run level of rates, the slope of the curve, and its curvature. Every parameter shift has a direct interpretation, which makes the model not just a fitting tool but a language for discussing monetary conditions.
You will build a calibration pipeline that is robust enough to fit sovereign yield curves from any country: least-squares optimisation for well-behaved cases, differential evolution for the nasty multi-modal NSS landscape, and ridge regularisation to prevent overfitting when the data is sparse. The end result is a toolkit that matches what central banks actually run.
Hands-on
The project you'll build
The project is a central-bank-grade curve fitting toolkit. You start by implementing the Nelson-Siegel loading functions from the formula and verifying that the three parameters correctly reproduce level, slope and curvature effects — including the well-known result that β0 sets the long-term asymptote and β1 + β0 gives the instantaneous short rate.
From there you calibrate the three-factor NS model to a sovereign zero-rate dataset using weighted least-squares, then extend to the four-factor NSS model. The NSS calibration landscape has multiple local minima that defeat simple gradient descent, so you implement a differential evolution global optimiser that reliably finds the global fit regardless of starting point.
The final deliverable is a toolkit that loads zero-rate data for any sovereign, fits NS and NSS with full diagnostics, decomposes the fitted curve into its economic factors, computes instantaneous forward rates analytically, and plots residuals over time to detect model breakdown. You will also add ridge regularisation as a one-line extension and see its effect on parameter stability across different market regimes.
Outcomes
What you'll learn
Nelson-Siegel model
Implement the three-factor NS model and its loading functions, and verify the limiting behaviour of each parameter.
NSS extension
Extend NS to the four-factor Svensson form and understand how the second hump captures medium-term curve features.
Least-squares calibration
Fit the NS model to market zero rates using weighted least-squares and interpret the residuals.
Global optimisation
Use differential evolution to calibrate NSS reliably, avoiding the local minima that trap gradient-based methods.
Ridge regularisation
Add a regularisation penalty to the objective function and understand its effect on parameter stability and out-of-sample fit.
Forward rates from NSS
Derive the instantaneous forward rate formula analytically from the NSS parametrisation and verify it numerically.
Economic factor interpretation
Interpret β0, β1 and β2 as the level, slope and curvature of the curve and relate them to monetary policy signals.
Model diagnostics
Produce and interpret residual plots, parameter time series, and goodness-of-fit statistics to assess model health.
Stack
Tools & technology
The course teaches a workflow, not just a toolset — here is what we use and what you could swap in.
| Tool | Used for | Alternatives |
|---|---|---|
| Python 3 | Primary language for the NS/NSS implementation and calibration pipeline | R (which has well-known NS packages), Julia, MATLAB |
| NumPy | Vectorised evaluation of the NS/NSS loading functions across tenor grids | Pure Python, JAX |
| SciPy | Least-squares optimisation (curve_fit, minimize) and differential evolution global search | lmfit, nevergrad, nlopt |
| pandas | Loading, cleaning and reshaping sovereign zero-rate datasets | polars, plain CSV |
| matplotlib | Plotting fitted curves, factor loadings, residuals and parameter time series | plotly, seaborn |
| Jupyter | Interactive step-by-step development and visualisation | VS Code, plain scripts |
Syllabus
Course curriculum
10 lessons across 2 parts. Lessons marked Free preview can be read before you enrol.
Part 1 — Nelson-Siegel & NSS ModelsParametric yield curve models from first principles.
- 1.Parametric curve models & motivationWhy central banks use NS/NSS and what the parameters mean economically.Free preview
- 2.Nelson-Siegel: level, slope, curvatureImplement the three-factor NS model and its loading functions.Free preview
- 3.Calibrating Nelson-Siegel to market dataFit NS parameters by minimising weighted squared pricing errors.
- 4.Nelson-Siegel-Svensson: the second humpExtend to NSS with the fourth factor for greater flexibility.
- 5.Calibrating NSS with differential evolutionUse global optimisation to avoid local minima in NSS calibration.
- 6.Forward rates from NSSDerive instantaneous forward rates analytically from the NSS formula.
Part 2 — Applications & DiagnosticsRegularisation, cross-country comparison and curve diagnostics.
- 1.Ridge regularisation & overfittingAdd a regularisation term to prevent the model from chasing noise.
- 2.Interpreting level, slope and curvatureWhat central bank rate moves look like in NS/NSS factor space.
- 3.Residuals and model diagnosticsCheck fit quality, residuals and parameter stability over time.
- 4.Conclusion & extensionsWhere NS/NSS fits in a broader modelling toolkit.
Before you start
Prerequisites
- Comfortable with Python, NumPy and basic SciPy — functions, arrays, calling an optimiser.
- Fixed-income fundamentals: what a yield curve is, what zero rates and discount factors represent.
- Basic statistics at the level of least squares: what a residual is and why you minimise its square.
- Introductory familiarity with optimisation concepts (objective function, gradient, local vs global minimum) is helpful but not required.
Fit
Who this course is for
Fixed income analysts and researchers
You work with sovereign yield data and want to build the same curve-fitting tool that central banks use, with full control over calibration and diagnostics.
Macro traders and portfolio managers
You want to decompose yield curve moves into level, slope and curvature shifts to inform relative-value and duration positioning decisions.
Quant-finance students
You are studying term structure modelling and want hands-on calibration experience that goes beyond reproducing a textbook formula.
Risk and strategy quantitative analysts
You need a robust, parametric curve representation for scenario analysis, stress testing or factor-based attribution frameworks.
Faculty
Your instructor
QuantIndex Faculty
QuantIndex Faculty are practising quantitative analysts and former rates-desk developers. The curriculum is written by quants who have built parametric curve models for sovereign and corporate term structures in production environments, and it is reviewed for both mathematical rigour and code quality before publication.
Benchmarked & verified
Every price you compute is checked against published results from leading textbooks and market data. You do not finish the course hoping your model is right — you finish it knowing.
Questions
Frequently asked questions
Why use differential evolution instead of a standard gradient-based optimiser for NSS?
The NSS objective function has several local minima, especially when the two decay parameters τ1 and τ2 are close together. Gradient-based methods (L-BFGS, Nelder-Mead) frequently get trapped. Differential evolution is a population-based global method that explores the parameter space broadly before converging, and it reliably finds the global fit across a wide range of yield curve shapes.
Can I use this on corporate or emerging-market curves, not just G10 sovereigns?
Yes, with care. NS/NSS was designed for sovereign curves, where the data is dense and reliable. On corporate or EM curves the data tends to be sparser and noisier, which is exactly where the ridge regularisation lesson is most valuable. The course covers how to detect and handle this.
Is this a curve bootstrapping course or a curve fitting course?
These are two different approaches to the same problem. Bootstrapping (covered in the Yield Curve Bootstrapping course) constructs a curve that prices every input instrument exactly. NS/NSS fitting finds the smoothest parametric curve that best explains the data in a least-squares sense — tolerating small residuals in exchange for a smooth, parsimonious fit. Both are used in practice for different purposes.
What data source do the lessons use?
The course uses publicly available sovereign zero-rate data from central bank statistical releases. The same data you can download yourself for free from the ECB, Fed or BIS websites.
Will I be able to replicate published central bank yield curve estimates?
Very closely, yes. Central banks typically publish both their model estimates and the underlying zero-rate data. By the end of the course you will be able to fit their curves and understand any small remaining gap (usually different weighting schemes or minor input adjustments).
Is there a refund policy?
Yes — a 14-day, no-questions-asked money-back guarantee. If the course is not right for you, email us and we will refund you in full.
Ready to start?
- Lifetime access — all lessons & updates
- 10 lessons across 2 structured parts
- Fully worked Jupyter notebooks
- Market datasets + published benchmark prices
- Free lesson previews before you buy
- 14-day money-back guarantee
Secured by a no-questions-asked 14-day refund.