Description Usage Arguments Value Author(s) Examples
Construct volume imbalance bars
1  | bar_volume_imbalance(dat, w0 = 10, bkw_T = 5, bkw_b = 5)
 | 
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_tv_t  | 
a list of vectors for tStamp (if returned), and HLOCV of volume imbalance bars. Note that the remaining data after the latest imbalance time point will be formed as a bar.
Larry Lei Hua
1 2 3  | set.seed(1)
dat <- data.frame(Price = c(rep(0.5, 4), runif(50)), Size = rep(10,54))
bar_volume_imbalance(dat)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.