Learn R Programming

SMFI5 (version 1.0)

sim.cir: Simulates the Feller process.

Description

Simulates the Feller process

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

Usage

sim.cir(alpha, beta, sigma, r0, n, h)

Arguments

alpha
Mean-reversion parameter.
beta
Long term mean.
sigma
Volatility parameter.
r0
Initial rate value.
n
Number of periods.
h
Time between observations.

Value

r
Simulated annual rate in percent.

References

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

Examples

Run this code
r = sim.cir(0.5,2.55,0.365,2.55,720,1/360)

Run the code above in your browser using DataLab