Nelson.Siegel {YieldCurve} | R Documentation |
Returns the estimated coefficients of the Nelson-Siegel's model.
Nelson.Siegel(rate, maturity, MidTau)
rate |
vector or matrix which contains the interest rates. |
maturity |
vector wich contains the maturity ( in months) of the rate . The vector's length must be the same
of the number of columns of the rate . |
MidTau |
vector which indicates medium term maturity to maximize the beta_2 factor. |
The Nelson-Siegel's model to describe the yield curve is:
y_t(tau) = β_{0t} + β_{1t} frac{1-exp(-λ tau)}{λ tau} + β_{2t} (frac{1-exp(-λ tau)}{λ tau} - exp(-λ tau) )
Returns a data frame with the estimated coefficients: β_{0t}, β_{1t}, β_{2t}, and λ.
Sergio Salvino Guirreri
Diebold, F.X. and Li, C. (2006), Forecasting the Term Structure of Government Bond Yields, Journal of Econometrics, 130, 337-364.
Diebold, F.X., Ji, L. and Li, C. (2006), A Three-Factor Yield Curve Model: Non-Affine Structure, Systematic Risk Sources, and Generalized Duration, in L.R. Klein (ed.), Long-Run Growth and Short-Run Stabilization: Essays in Memory of Albert Ando. Cheltenham, U.K.: Edward Elgar, 240-274.
Nelson, C.R., and A.F. Siegel (1987), Parsimonious Modeling of Yield Curve, The Journal of Business, 60, 473-489.
NelsonSiegel, Svensson
data(FedYieldCurve) tau <- c(3, 6, 12, 60, 84, 120) mediumTerm <- c(12,60,84) NSParameters <- Nelson.Siegel( rate=FedYieldCurve[1:10,], maturity=tau, MidTau=mediumTerm ) y <- NSrates(NSParameters[5,1:3], NSParameters$lambda[5],tau) plot(tau,FedYieldCurve[5,],main="Fitting Nelson-Siegel yield curve", type="o") lines(tau,y, col=2) legend("topleft",legend=c("observed yield curve","fitted yield curve"), col=c(1,2),lty=1) grid()