Description Usage Arguments Value Author(s) Examples
Tstar index for Volume Imbalance Bars (bar_vib)
1 | Tstar_vib(dat, w0 = 10, bkw_T = 5, bkw_b = 5)
|
dat |
dat input with at least the following columns: 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_tv_t |
a vector for the lengths of the tick imbalance bars. For example, if the return is c(10,26), then the 2 tick imbalance bars are (0,10] and (10, 36]
Larry Lei Hua
1 2 3 4 5 | set.seed(1)
dat <- data.frame(Price = c(rep(0.5, 4), runif(50)), Size = rep(10,54))
T_vib <- Tstar_vib(dat)
b_tv_t <- imbalance_volume(dat)
cumsum(b_tv_t)[cumsum(T_vib)] # check the accumulated b_tv_t's where the imbalances occur
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.