forwardrates: Forward Rate Calculation

Description Usage Arguments Value See Also Examples

Description

Calculates forward rates according to the Diebold/Li, Nelson/Siegel, Svensson approach.

Usage

1
forwardrates(method, beta, m, lambda)

Arguments

method

forward 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 forward rate function

Value

The function returns a vector with the calculated forward rates.

See Also

fwr_dl, fwr_ns, fwr_sv

Examples

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

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
 [1] 0.04801208 0.04608768 0.04426910 0.04258121 0.04103638 0.03963821
 [7] 0.03838430 0.03726827 0.03628136 0.03541341 0.03465373 0.03399159
[13] 0.03341658 0.03291888 0.03248935 0.03211963 0.03180216 0.03153013
[19] 0.03129750 0.03109894 0.03092973 0.03078575 0.03066342 0.03055962
[25] 0.03047166 0.03039719 0.03033423 0.03028104 0.03023615 0.03019830

termstrc documentation built on May 2, 2019, 4:50 p.m.