Learn R Programming

RTL (version 1.3.7)

fitOU: Fits a Ornstein–Uhlenbeck process to a dataset

Description

Parameter estimation for Ornstein–Uhlenbeck process using OLS

Usage

fitOU(spread, dt = 1/252)

Value

List of theta, mu, annualized sigma estimates. It returns half life consistent with periodicity list

Arguments

spread

Spread time series. tibble

dt

Time step size in fractions of a year. Default is 1/252.

Author

Philippe Cote

Examples

Run this code
spread <- simOU(nsims = 1, mu = 5, theta = .5, sigma = 0.2, T = 5, dt = 1 / 252)
fitOU(spread = spread$sim1)

Run the code above in your browser using DataLab