bar_tick_imbalance: Construct tick imbalance bars

Description Usage Arguments Value Author(s) Examples

View source: R/bars.R

Description

Construct tick imbalance bars

Usage

1
bar_tick_imbalance(dat, w0 = 10, bkw_T = 5, bkw_b = 5)

Arguments

dat

dat input with at least the following column: Price, Size

w0

the expected time window length of the first bar

bkw_T

backward window length when using exponentially weighted average T

bkw_b

backward window length when using exponentially weighted average b_t

Value

a list of vectors for tStamp (if returned), and HLOCV of tick imbalance bars. Note that the remaining data after the latest imbalance time point will be formed as a bar.

Author(s)

Larry Lei Hua

Examples

1
2
3
set.seed(1)
dat <- data.frame(Price = c(rep(0.5, 4), runif(1000)), Size = rep(10,1004))
bar_tick_imbalance(dat)

larryleihua/fmlr documentation built on Jan. 31, 2020, 8:55 a.m.