spotrates: Function for the Calculation of the Spot Rates
Description
The function calculates the spot rates for the chosen spot rate function (Diebold/Li, Nelson/Siegel, Svensson) , a provided maturity and parameter vector.
Usage
spotrates(method, beta, m, lambda)
Arguments
method
spot rate function type: "dl" for Diebold/Li, "ns" for Nelson/Siegel, "sv" for Svensson, "asv" for adjusted Svensson.
beta
parameter vector $\bm{\beta}$.
m
maturity or a vector of maturities.
lambda
$=1/\tau_1$, a scalar; only required for Diebold/Li spot rate function