Learn R Programming

fractalrock (version 1.1.0)

process: Generate a time series based on stochastic processes

Description

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

Usage

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

Value

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

Details

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

Examples

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

Run the code above in your browser using DataLab