spotrates: Function for the Calculation of the Spot Rates

Description Usage Arguments Value See Also Examples

View source: R/spotfwdratedef.R

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.

See Also

spr_dl, spr_ns, spr_sv

Examples

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

termstrc documentation built on May 29, 2017, 1:05 p.m.