Quick Generating Geometric Brownian motion avoiding unnecessary loops using the cumsum function. Technical function implemented in the pricing functions of the package.
Usage
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")