Srates {YieldCurve} | R Documentation |
Returns the interest rates by Svensson's model.
Srates(betaCoeff, lambdaValues, maturity, whichRate = "Forward")
betaCoeff |
vector or matrix of the beta's coefficients. |
lambdaValues |
vector or matrix of values of λ_1 and λ_2. |
maturity |
maturity of the yield curve of which want to return the interest rates. |
whichRate |
which rate want to return: "Spot" or "Forward" rates. |
betaCoeff
is a vector or matrix of the four coefficients of the Svensson's model, while lambdaValues
is a vector or matrix of two lambda values of Svensson's model.
Return interest rates in matrix object with number of rows equal to nrow(betaCoeff)
and number of columns equal to length(maturity)
.
Sergio Salvino Guirreri
Svensson, L.E. (1994), Estimating and Interpreting Forward Interest Rates: Sweden 1992-1994, IMF Working Paper, WP/94/114.
Nelson, C.R., and A.F. Siegel (1987), Parsimonious Modeling of Yield Curve, The Journal of Business, 60, 473-489.
data(ECBYieldCurve) tauECB <- c(0.25,0.5,1:30) Y <- Svensson(ECBYieldCurve[1:10,], tauECB, c(1,4), c(5,8) ) B <- Srates(Y[,1:4], Y[,5:6], tauECB, whichRate="Spot") plot(tauECB,ECBYieldCurve[10,],main="Fitting Svensson's yield curve", type="o") lines(tauECB,B[10,], col=2) legend("topleft",legend=c("observed yield curve","fitted yield curve"),col=c(1,2),lty=1) grid()