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. numeric

S0

S at t=0. numeric

mu

data frame of mean reversion level as a function of time. tibble

theta

Mean reversion speed. numeric

sigma

Standard deviation. numeric

T2M

Maturity in years. numeric

dt

Time step size e.g. 1/250 = 1 business day. numeric

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]