fitOU: Fits a Ornstein–Uhlenbeck process to a dataset

View source: R/fitOU.R

fitOUR Documentation

Fits a Ornstein–Uhlenbeck process to a dataset

Description

Parameter estimation for Ornstein–Uhlenbeck process using OLS

Usage

fitOU(spread, dt = 1/252)

Arguments

spread

Spread time series. tibble

dt

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

Value

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

Author(s)

Philippe Cote

Examples

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

risktoollib/RTL documentation built on Feb. 26, 2024, 3:43 a.m.