simOU | R Documentation |
Simulates a Ornstein–Uhlenbeck process
simOU(
nsims = 2,
S0 = 5,
mu = 5,
theta = 0.5,
sigma = 0.2,
T2M = 1,
dt = 1/12,
epsilon = NULL
)
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. |
Simulated values. tibble
Philippe Cote
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))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.