r.gbm: Geometric Brownian motion

Description Usage Arguments Value Author(s) Examples

View source: R/models.R

Description

Sampling of paths of the geometric Brownian motion.

Usage

1
r.gbm(n, t = seq(0, 1, len = 201), mu = 0, sigma = 1, s0 = 1)

Arguments

n

number of functions to sample.

t

time locations for the functional data.

mu, sigma

mean and diffusion of the underlying Brownian motion.

s0

a number or a vector of length n giving the initial value(s) of the geometric Brownian motion.

Value

Functional sample, an fdata object of length n.

Author(s)

Eduardo García-Portugués (edgarcia@est-econ.uc3m.es).

Examples

1
2
plot(r.gbm(n = 10, s0 = 1))
plot(r.gbm(n = 10, mu = -1, s0 = rnorm(10, mean = 10)))

egarpor/rp.flm.test documentation built on Oct. 20, 2021, 12:31 a.m.