simOUt {RTL} | R Documentation |
OU process simulation
Description
Simulates a Ornstein–Uhlenbeck process with mu as a function of time
Usage
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
)
Arguments
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. |
Value
Simulated values. tibble
Author(s)
Philippe Cote
Examples
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)
[Package RTL version 1.3.5 Index]