Learn R Programming

Sim.DiffProc (version 2.5)

BMRW: Creating Brownian Motion Model (by a Random Walk)

Description

Simulation of the brownian motion model by a Random Walk.

Usage

BMRW(N, t0, T, C, output = FALSE)

Arguments

N
size of process.
t0
initial time.
T
final time.
C
constant positive (if C = 1 it is standard brownian motion).
output
if output = TRUE write a output to an Excel (.csv).

Value

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

Details

One characterization of the Brownian motion says that it can be seen as the limit of a random walk in the following sense. Given a sequence of independent and identically distributed random variables X1, X2, . . . , Xn, taking only two values +1 and -1 with equal probability and considering the partial sum, Sn = X1+ X2+ . . . + Xn. then, as n --> lnf,P(Sn/sqrt(N) < x) = P( W(t) < x). Where [x] is the integer part of the real number x. Please note that this result is a refinement of the central limit theorem that, in our case, asserts that Sn/sqrt(n) ~~> N(0,1).

See Also

BMN simulation brownian motion by the normal distribution, BMNF simulation flow of brownian motion by the normal distribution, BMRWF simulation flow of brownian motion by a random walk, BB Simulation of brownian bridge model, GBM simulation geometric brownian motion Model.

Examples

Run this code
BMRW(N=1000,t0=0,T=1,C=1)
 BMRW(N=1000,t0=0,T=1,C=10)

Run the code above in your browser using DataLab