make_regular_return_file: Make regular return file

View source: R/make_regular_return_file.R

make_regular_return_fileR Documentation

Make regular return file

Description

Helper function to create a regular return file

Usage

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

Arguments

DATA

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

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).

full_day

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

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.

ALIGN

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

FREQ

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

Value

Outputs a regularized return file with appropriate frequency.


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