spotrates: Function for the Calculation of the Spot Rates In termstrc: Zero-coupon Yield Curve Estimation

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

 `1` ```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{β}. `m` maturity or a vector of maturities. `lambda` =1/τ_1, a scalar; only required for Diebold/Li spot rate function

Value

Returns a vector with the calculated spot rates.

`spr_dl`, `spr_ns`, `spr_sv`
 ```1 2``` ```spotrates(method="ns",beta=c(0.03,0.02,0.01,5),m=1:30) ```