NSrates: Interest rates of the Nelson-Siegel's model.

Description Usage Arguments Details Value Author(s) References Examples

Description

Returns the interest rates by Nelson-Siegel's model.

Usage

1
NSrates(Coeff, maturity)

Arguments

Coeff

Vector or matrix of the beta's coefficients and lambda as the function Nelson.Siegel returns.

maturity

maturity of the yield curve of which want to return the interest rates.

Details

Coeff is a vector or matrix of the four coefficients of the Nelson-Siegel's model: (β_0; β_1; β_2; λ).

Value

Return interest rates in matrix object with number of rows equal to nrow(betaCoeff) and number of columns equal to length(maturity).

Author(s)

Sergio Salvino Guirreri

References

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 
data(FedYieldCurve)
maturity.Fed <- c(3/12, 0.5, 1,2,3,5,7,10)
NSParameters <- Nelson.Siegel( rate = first(FedYieldCurve,'10 month'), maturity=maturity.Fed )
y <- NSrates(NSParameters[5,],maturity.Fed)
plot(maturity.Fed,FedYieldCurve[10,],main="Fitting Nelson-Siegel yield curve", type="o")
lines(maturity.Fed,y, col=2)
legend("topleft",legend=c("observed yield curve","fitted yield curve"),
col=c(1,2),lty=1)
grid()

YieldCurve documentation built on May 2, 2019, 5:56 p.m.