Learn R Programming

termstrc (version 1.1.1)

nelson_siegel: Spot Rate Function according to Nelson/Siegel

Description

This function calculates the spot rates for certain maturity dates and a parameter vector according to Nelson/Siegel (1987).

Usage

nelson_siegel(beta, m)

Arguments

beta
a vector of parameters ${\bm{\beta}} = \left(\beta_0,\beta_1,\beta_2,\tau_1\right)$.
m
one maturity (or a vector of maturities).

Value

  • Returns a vector consisting of the calculated spot rates.

Details

The spot rate according to Nelson/Siegel for a maturity $m$ is defined as: $$s(m,\bm{\beta}) = \beta_0 + \beta_1\frac{1-\exp(-\frac{m}{\tau_1})}{\frac{m}{\tau_1}} + \beta_2\left(\frac{1-\exp(-\frac{m}{\tau_1})}{\frac{m}{\tau_1}} - \exp(-\frac{m}{\tau_1})\right).$$

References

Charles R. Nelson and Andrew F. Siegel (1987): Parsimonious Modeling of Yield Curves. The Journal of Business, 60(4):473--489.

Examples

Run this code
nelson_siegel(rep(0.01,4),1:30)

Run the code above in your browser using DataLab