Learn R Programming

SMFI5 (version 1.0)

bond.cir: Simulates the values and yields of zero-coupon bonds when the spot rate is modeled by a Feller process.

Description

Simulates the values and yields of zero-coupon bonds when the (annualized ) spot rate (in percent) is modeled by a Feller process satisfying

dr = alpha(beta-r)dt + sigma sqrt(r) dW,

with market price of risk q = q1/sqrt(r) +q2 sqrt(r). The maturities are 1,3,6 and 12 months.

Usage

bond.cir(alpha, beta, sigma, q1, q2, r0, n, maturities, days = 360)

Arguments

alpha
Mean-reversion parameter.
beta
Long term mean.
sigma
Volatility parameter.
q1
Market prime of risk parameter.
q2
Market prime of risk parameter.
r0
Initial rate value.
n
Number of periods.
maturities
Maturities in years (row vector).
days
Days in a year convention (360 default).

Value

P
Bond values.
R
Annual rate for the bond.
tau
Maturities in years.

References

Chapter 5 of 'Statistical Methods for Financial Engineering, B. Remillard, CRC Press, (2013).

Examples

Run this code
out = bond.cir(0.5,2.55,0.365,0.3,0,3.55,1080,c(1/12, 3/12, 6/12, 1),365)

Run the code above in your browser using DataLab