spr_dl: Spot Rate Function according to the Diebold and Li Version of...

Description Usage Arguments Details Value References See Also Examples

View source: R/spotfwdratedef.R

Description

This function calculates the spot rates for certain maturity dates and a parameter vector according to Diebold/Li (2006).

Usage

1
spr_dl(beta, m, lambda)

Arguments

beta

a vector of parameters {\bm{β}} = ≤ft(β_0,β_1,β_2\right).

m

one maturity (or a vector of maturities).

lambda

=\frac{1}{τ_1}, a scalar

Details

The spot rate according to Diebold/Li for a maturity m is defined as:

s(m,\bm{β},λ) = β_0 + β_1\frac{1-\exp(-mλ)}{mλ} + β_2≤ft(\frac{1-\exp(-mλ)}{mλ} - \exp(-mλ)\right).

Value

Returns a vector consisting of the calculated spot rates.

References

F.X. Diebold and C. Li: Forecasting the Term Structure of Government Bond Yields. Journal of Econometrics, 130:337–364.

See Also

codespr_ns

Examples

1
spr_dl(c(0.1,0.03,0.01),1:30,0.0609)

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.1293972 0.1288067 0.1282285 0.1276626 0.1271089 0.1265672 0.1260375
 [8] 0.1255196 0.1250134 0.1245187 0.1240354 0.1235633 0.1231023 0.1226520
[15] 0.1222125 0.1217833 0.1213645 0.1209557 0.1205568 0.1201675 0.1197877
[22] 0.1194172 0.1190557 0.1187031 0.1183591 0.1180236 0.1176964 0.1173772
[29] 0.1170659 0.1167622

termstrc documentation built on May 31, 2017, 2:19 a.m.