impute_OHLC {imputeFin}R Documentation

Impute missing values of an OHLC time series on a rolling window basis based on a Gaussian AR(1) model

Description

Impute inner missing values (excluding leading and trailing ones) of an OHLC time series on a rolling window basis. This is a wrapper of the functions impute_AR1_Gaussian and impute_rolling_AR1_Gaussian.

Usage

impute_OHLC(
  y_OHLC,
  rolling_window = 252,
  remove_outliers = FALSE,
  outlier_prob_th = 0.001,
  tol = 1e-10,
  maxiter = 100
)

Arguments

y_OHLC

Time series object coercible to a numeric matrix (e.g., zoo or xts) with four columns denoting the prices Op, Hi, Lo, Cl.

rolling_window

Rolling window length (default is 252).

remove_outliers

Logical value indicating whether to detect and remove outliers.

outlier_prob_th

Threshold of probability of observation to declare an outlier (default is 1e-3).

tol

Positive number denoting the relative tolerance used as stopping criterion (default is 1e-8).

maxiter

Positive integer indicating the maximum number of iterations allowed (default is 100).

Value

Imputed OHLC prices.

Author(s)

Daniel P. Palomar

See Also

impute_AR1_Gaussian, impute_rolling_AR1_Gaussian


[Package imputeFin version 0.1.2 Index]