simOU {RTL} | R Documentation |
OU process simulation
Description
Simulates a Ornstein–Uhlenbeck process
Usage
simOU(
nsims = 2,
S0 = 5,
mu = 5,
theta = 0.5,
sigma = 0.2,
T2M = 1,
dt = 1/12,
epsilon = NULL
)
Arguments
nsims |
number of simulations. Defaults to 2. |
S0 |
S at t=0. |
mu |
Mean reversion level. |
theta |
Mean reversion speed. |
sigma |
Standard deviation. |
T2M |
Maturity in years. |
dt |
Time step size e.g. 1/250 = 1 business day. |
epsilon |
Defaults to NULL function generates its own. |
Value
Simulated values. tibble
Author(s)
Philippe Cote
Examples
simOU(nsims = 5, S0 = 5, mu = 5, theta = .5, sigma = 0.2, T2M = 1, dt = 1 / 12, epsilon = NULL)
simOU(nsims = 1, S0 = 5, mu = 5, theta = .5, sigma = 0.2, T2M = 1, dt = 1 / 12,
epsilon = matrix(rnorm(12,0,sqrt(1/12))))
simOU(nsims = 2, S0 = 5, mu = 5, theta = .5, sigma = 0.2, T2M = 1, dt = 1 / 12,
epsilon = replicate(2,rnorm(12,0,sqrt(1/12))))
[Package RTL version 1.3.5 Index]