Learn R Programming

termstrc (version 1.3.7)

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

Value

See Also

spr_dl, spr_ns, spr_sv

Examples

Run this code
spotrates(method="ns",beta=c(0.03,0.02,0.01,5),m=1:30)
  

Run the code above in your browser using DataLab