Learn R Programming

Sim.DiffProc (version 2.5)

GBM: Creating Geometric Brownian Motion (GBM) Models

Description

Simulation geometric brownian motion or Black-Scholes models.

Usage

GBM(N, t0, T, x0, theta, sigma, output = FALSE)

Arguments

N
size of process.
t0
initial time.
T
final time.
x0
initial value of the process at time t0 (x0 > 0).
theta
constant (theta is the constant interest rateand and theta * X(t) :drift coefficient).
sigma
constant positive (sigma is volatility of risky activities and sigma * X(t):diffusion coefficient).
output
if output = TRUE write a output to an Excel (.csv).

Value

  • data.frame(time,x) and plot of process.

Details

This process is sometimes called the Black-Scholes-Merton model after its introduction in the finance context to model asset prices. The process is the solution to the stochastic differential equation : $$dX(t) = theta * X(t)* dt + sigma * X(t)* dW(t)$$ With theta * X(t) :drift coefficient and sigma * X(t) : diffusion coefficient, W(t) is Wiener process, the discretization dt = (T-t0)/N. sigma > 0, the parameter theta is interpreted as the constant interest rate and sigma as the volatility of risky activities. The explicit solution is : $$X(t) = x0 * exp((theta - 0.5 * sigma^2) * t + sigma * W(t))$$ The conditional density function is log-normal.

See Also

GBMF Flow of Geometric Brownian Motion, PEBS Parametric Estimation of Model Black-Scholes, snssde Simulation Numerical Solution of SDE.

Examples

Run this code
## Black-Scholes Models
## dX(t) = 4 * X(t) * dt + 2 * X(t) *dW(t)
 GBM(N=1000,T=1,t0=0,x0=1,theta=4,sigma=2)

Run the code above in your browser using DataLab