monteCarlo: Monte Carlo Price Path Simulation

Description Usage Arguments Details Value Note Examples

Description

Run N monte carlo simulations to generate asset price paths following a geometric brownian motion process with constrant drift rate and constant volatility.

Usage

1
2
monteCarlo(mu, sigma, N = 100, time = 1, steps = 52,
  starting_value = 100)

Arguments

mu

annualized expected return

sigma

annualized standard deviation

N

number of simulations

time

length of simulation (in years)

steps

number of time steps

starting_value

asset price starting value

Details

The Geometric Brownian Motion process to describe small movements in prices is given by

d S_t = μ S_t dt + σ dz_t

ln S is simulated rather than simulating S directly such that

S_t = S_{t-1} exp((μ - 0.5 σ^2) dt + σ √{dt} ε)

where:

Value

matrix of simulated price paths where each column represents a price path

Note

This function returns an m x N matrix of simulated price paths where m is the number of steps + 1 and N is the number of simulations. This can be very memory and computatitonally intensive with a large number of steps and/or a large number of simulations. More efficient methods in terms of speed and memory should be used, for example, to price options.

Examples

1
2
3
library(GARPFRM)

mc <- monteCarlo(0.05, 0.25, 500, 1, 52, 10)

GARPFRM documentation built on May 2, 2019, 5:45 p.m.

Related to monteCarlo in GARPFRM...