Learn R Programming

Sim.DiffProc (version 2.5)

ABM: Creating Arithmetic Brownian Motion Model

Description

Simulation of the arithmetic brownian motion model.

Usage

ABM(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.
theta
constant (Coefficient of drift).
sigma
constant positive (Coefficient of diffusion).
output
if output = TRUE write a output to an Excel (.csv).

Value

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

Details

The function ABM returns a trajectory of the Arithmetic Brownian motion starting at x0 at time t0, than the Discretization dt = (T-t0)/N. The stochastic differential equation of the Arithmetic Brownian motion is : $$dX(t) = theta * dt + sigma * dW(t)$$ with theta :drift coefficient and sigma :diffusion coefficient,W(t) is Wiener process.

See Also

ABMF creating flow of the arithmetic brownian motion model.

Examples

Run this code
## Arithmetic Brownian Motion Model
## dX(t) = 3 * dt + 2 * dW(t) ; x0 = 0 and t0 = 0
ABM(N=1000,t0=0,T=1,x0=0,theta=3,sigma=2)

Run the code above in your browser using DataLab