powered by
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 )
Simulated values. tibble
tibble
number of simulations. Defaults to 2. numeric
numeric
S at t=0. numeric
data frame of mean reversion level as a function of time. tibble
Mean reversion speed. numeric
Standard deviation. numeric
Maturity in years. numeric
Time step size e.g. 1/250 = 1 business day. numeric
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)
Run the code above in your browser using DataLab