fastGBM: Generating Geometric Brownian motion

Description Usage Arguments Value Author(s) See Also Examples

View source: R/fastGBM.R

Description

Quick Generating Geometric Brownian motion avoiding unnecessary loops using the cumsum function. Technical function implemented in the pricing functions of the package.

Usage

1
fastGBM(Spot = 1, sigma = 0.2, n = 1000, m = 365, r = 0.06, dr = 0, mT = 1)

Arguments

Spot

Spot price of the underlying asset (e.g. stock).

sigma

Volatility of the underlying asset.

n

Number of paths simulated.

m

Number of time steps in the simulation.

r

Interest rate of the numeraire currency (e.g. EUR).

dr

Dividend rate of the underlying asset.

mT

Maturity time (years).

Value

Table with paths generated (each row is a path, class "matrix")

Author(s)

Mikhail A. Beketov

See Also

Functions: AmerPutLSM, AmerPutLSM_AV, AmerPutLSM_CV, AsianAmerPutLSM, QuantoAmerPutLSM, and QuantoAmerPutLSM_AV.

Examples

1
2
fastGBM(n=10, m=5)
matplot(t(fastGBM(n=100, m=100)), type="l") # matrix transpose by "t()"

LSMonteCarlo documentation built on May 29, 2017, 11:08 p.m.