GBM_simulate: Simulate the geometric Brownian motion (GBM) stochastic...

Description Usage Arguments Details Value Examples

View source: R/SDE_simulate.R

Description

GBM is a commonly used stochastic process to simulate the price paths of stock prices and other assets, in which the log of the asset follows a random walk process with drift. The GBM_simulate function utilizes antithetic variates as a simple variance reduction technique.

Usage

1
GBM_simulate(n, t, mu, sigma, S0, dt)

Arguments

n

The total number of price paths to simulate

t

The forecasting period, in years

mu

The drift term of the GBM process

sigma

The volatility term of the GBM process

S0

The initial value of the underlying asset

dt

The discrete time step of observations, in years

Details

A stochastic process S(t) is a geometric brownian motion that follows the following continuous-time stochastic differential equation:

dS(t)/S(t) = mu dt + sigma dW(t)

Where 'mu' is the drift term, 'sigma' the volatility term and W(t) is defined as a Weiner process.

The GBM is log-normally distributed.

Value

A matrix of simulated price paths of the GBM process. Each column corresponds to a simulated price path, and each row corresponds to a simulated observed price of the simulated price paths at each discrete time period.

Examples

1
2
3
4
5
6
7
## 100 simulations of 1 year of monthly price paths:
Simulated <- GBM_simulate(n = 100,
                         t = 1,
                         mu = 0.05,
                         sigma = 0.2,
                         S0 = 100,
                         dt = 1/12)

LSMRealOptions documentation built on June 26, 2021, 5:06 p.m.