split_by_id: Split by ID

View source: R/split_by_id.R

split_by_idR Documentation

Split by ID

Description

Helper function to split data by ID and make it regular for computing the test statistic.

Usage

split_by_id(
  DATA,
  IMPUTATION = FALSE,
  T_large = 1,
  full_day = 0.95 * 86400,
  delts = c(1, 5, 10, 15),
  FREQ = 1,
  ALIGN = TRUE
)

Arguments

DATA

A data.table with structure as provided in the example.

IMPUTATION

Should missing values be imputed? If TRUE, then na.locf will be used. Defaults to FALSE.

T_large

The number of trading days. Defaults to 1 for one observed day.

full_day

How many observations in seconds does a full day have? Defaults to 0.95*86400.

delts

Frequencies that should be tested for subsampling the regularized data, where e.g. a value of 5 means that the data is subsampled every 5 seconds. Defaults to c(5, 10, 15).

FREQ

The highest possible frequency. Defaults to 1 for a frequency of 1 second.

ALIGN

Should the data be aligned to round timestamps? Defaults to TRUE.


YalDan/hf.econometrics documentation built on May 10, 2024, 2:18 a.m.