# Term Structure (Svensson Model)

## Definition (Nelson/Siegel Model)

$\displaystyle{ f(t,T) \equiv f_{NS}(m;\theta_{NS}) = \beta_{0} + \beta_{1}\exp\left(-\frac{m}{\tau_{1}} \right) + \beta_{2}\frac{m}{\tau_{1}}\exp\left(-\frac{m}{\tau_{1}} \right) }$

where $m = T - t$ is the time-to-maturity and $\theta_{NS} = \left( \beta_{0},\beta_{1},\beta_{2},\tau_{1} \right)$ the parameter vector of this model.

## Definition (Svensson Model)

The Svensson Model is an extension of the Nelson/Siegel Model to provide more flexibility. It assumes that the instantaneous forward rate is of the following form:

$\displaystyle{ f(t,T) \equiv f_{S}(m;\theta) = \beta_{0} + \beta_{1}\exp\left(-\frac{m}{\tau_{1}} \right) + \beta_{2}\frac{m}{\tau_{1}}\exp\left(-\frac{m}{\tau_{1}} \right) + \beta_{3}\frac{m}{\tau_{2}}\exp\left(-\frac{m}{\tau_{2}} \right) }$

where $m = T - t$ is the time-to-maturity and $\theta_{S} = \left( \beta_{0},\beta_{1},\beta_{2}, \beta_{3},\tau_{1},\tau_{2} \right)$ the parameter vector of this model.

## Codebook

### Construction

One of the most important classes of term structures is the Svensson (Nelson/Siegel) term structure.

double beta_0 = 0.08;
double beta_1 = -0.02;
double beta_2 = 0.02;
double tau_1 = 1.0;
double beta_3 = 0.01;
double tau_2 = 6.0;

ILevelTS nelson_siegel_ts = SvenssonTS.create(beta_0, beta_1, beta_2, tau_1);
ILevelTS svensson_ts = SvenssonTS.create(beta_0, beta_1, beta_2, tau_1, beta_3, tau_2);