The package brownianMotion does the simulation for 1 dimension or 2 dimension Brownian motion and gives the corresponding plot for the simulation path.

First, load the library.

library(brownianMotion)

Simulate 1 dimension brownian motion.

x <- sim1dBM(10000, 1)

Simulate 2 dimension brownian motion.

x <- sim2dBM(10000, 1)

Plot the simulation path.

plotBM(x)


yzheng74/brownianMotion documentation built on May 4, 2019, 8:47 p.m.