fwr_ns: Forward Rate Calculation according to Nelson/Siegel.

Description Usage Arguments Details Value References See Also Examples

View source: R/spotfwdratedef.R

Description

Calculate forward rates according to Nelson/Siegel(1987).

Usage

1

Arguments

beta

parameter vector {\bm{β}} = ≤ft(β_0,β_1,β_2,τ_1\right).

m

maturity or maturity vector.

Details

The forward rate for a maturity m is calculated using the following relation:

f(m,\bm{β}) = β_0+β_1\exp≤ft(-\frac{m}{τ_1}\right)+β_2≤ft[≤ft(\frac{m}{τ_1}\right)\exp≤ft(-\frac{m}{τ_1}\right)\right].

Value

The function returns the calculated forward rate (vector).

References

Charles R. Nelson and Andrew F. Siegel (1987): Parsimonious Modeling of Yield Curves. The Journal of Business, 60(4):473–489.

See Also

fwr_sv,fwr_dl, forwardrates

Examples

1
fwr_ns(beta=c(0.03,0.02,0.01,5),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 29, 2017, 1:05 p.m.