impute_OHLC: Impute missing values of an OHLC time series on a rolling...

Description Usage Arguments Value Author(s) See Also

View source: R/OHLC.R

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

1
2
3
4
5
6
7
8
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


imputeFin documentation built on Feb. 20, 2021, 9:07 a.m.