process: Generate a time series based on stochastic processes

Description Usage Arguments Details Value Author(s) Examples

Description

A collection of functions to produce time series using stochastic processes.

Usage

1
ou.process(theta, mu = 0, sigma = 1, initial=mu, end = Sys.Date(), start = NULL, obs = NULL)

Arguments

theta

Rate of dissipation

mu

Mean

sigma

Volatility

initial

Initial value

end

The end date

start

The starting date

obs

Number of observations to produce

Details

The 'ou.process' function generates a mean-reverting time series according to the Ornstein-Uhlenbeck process.

Value

An xts object containing a time series of values representing asset prices whose evolution is defined by the given process.

Author(s)

Brian Lee Yung Rowe

Examples

1
series <- ou.process(1, 1.2, 0.3, obs=50)

Example output

Loading required package: futile.any
Loading required package: lambda.r
Loading required package: futile.logger
Loading required package: timeDate
Loading required package: quantmod
Loading required package: xts
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: TTR
Version 0.4-0 included new data defaults. See ?getSymbols.

fractalrock documentation built on May 2, 2019, 6:05 a.m.