| 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(FedYieldCurve)
tau <- c(3,6,12,60,84,120)
A <- Svensson(FedYieldCurve[1:10,], tau, c(3,12), c(60,120) )
B <- Srates(A[,1:4], A[,5:6], tau, whichRate="Spot")
plot(tau,FedYieldCurve[10,],main="Fitting Svensson's yield curve", type="o")
lines(tau,B[10,], col=2)
legend("topleft",legend=c("observed yield curve","fitted yield curve"),col=c(1,2),lty=1)
grid()