simOUt | R Documentation |
Simulates a Ornstein–Uhlenbeck process with mu as a function of time
simOUt(
nsims = 2,
S0 = 0,
mu = dplyr::tibble(t = 0:20, mr = c(rep(2, 7), rep(4, 14))),
theta = 12,
sigma = 0.2,
T2M = 1,
dt = 1/12
)
nsims |
number of simulations. Defaults to 2. |
S0 |
S at t=0. |
mu |
data frame of mean reversion level as a function of time. |
theta |
Mean reversion speed. |
sigma |
Standard deviation. |
T2M |
Maturity in years. |
dt |
Time step size e.g. 1/250 = 1 business day. |
Simulated values. tibble
Philippe Cote
mu = dplyr::tibble(t = 0:20,mr = c(rep(2,7),rep(4,14)))
simOUt(nsims = 2, S0 = 5, mu = mu, theta = .5, sigma = 0.2, T2M = 1, dt = 1 / 12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.