Learn R Programming

RTL (version 1.3.7)

simGBM: GBM process simulation

Description

Simulates a Geometric Brownian Motion process

Usage

simGBM(
  nsims = 1,
  S0 = 10,
  drift = 0,
  sigma = 0.2,
  T2M = 1,
  dt = 1/12,
  vec = TRUE
)

Value

A tibble of simulated values. tibble

Arguments

nsims

Number of simulations. Defaults to 1. numeric

S0

Spot price at t=0. numeric

drift

Drift term in percentage. numeric

sigma

Standard deviation. numeric

T2M

Maturity in years. numeric

dt

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

vec

Vectorized implementation. Defaults to TRUE. logical

Author

Philippe Cote

Examples

Run this code
simGBM(nsims = 2, S0 = 10, drift = 0, sigma = 0.2, T2M = 1, dt = 1 / 12, vec = TRUE)

Run the code above in your browser using DataLab