| Srates | R Documentation |
Returns the interest rates by Svensson's model.
Srates(Coeff, maturity, whichRate = "Forward")
Coeff |
vector or matrix of the beta's coefficients and 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. |
Coeff 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(Coeff) 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)
rate.ECB = first(ECBYieldCurve,'2 day')
maturity.ECB = c(0.25,0.5,seq(1,30,by=1))
SvenssonParameters <- Svensson(rate.ECB, maturity.ECB)
Svensson.rate <- Srates( SvenssonParameters ,maturity.ECB,"Spot")
plot(maturity.ECB, last(rate.ECB,'1 day'),main="Fitting Svensson yield curve",
xlab=c("Pillars in years"), ylab=c("Rates"),type="o")
lines(maturity.ECB, last(Svensson.rate,'1 day'), col=2)
legend("topleft",legend=c("observed yield curve","fitted yield curve"),
col=c(1,2),lty=1)
grid()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.