bond.vasicek: Simulates the values and yields of zero-coupon bonds when the...

Description Usage Arguments Value Note Author(s) References Examples

View source: R/bond.vasicek.R

Description

Simulates the values and yields of zero-coupon bonds when the (annualized ) spot rate (in percent) is modeled by a Ornstein-Uhlenbeck process satisfying dr <- alpha(beta-r)dt + sigma dW, with market price of risk q(r) <- q1+q2 r. The maturities are 1,3,6 and 12 months.

Usage

1
bond.vasicek(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.

Note

Translated from Matlab by David-Shaun Guay (HEC Montreal grant).

Author(s)

Bruno Remillard

References

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

Examples

1
out = bond.vasicek(0.5,2.55,0.365,0.3,0,3.55,1080,c(1/12, 3/12, 6/12, 1),365);

Example output

Loading required package: ggplot2
Loading required package: reshape
Loading required package: corpcor

SMFI5 documentation built on May 30, 2017, 1:51 a.m.