About this question

Tick Imbalance Bars

Hard · data_manipulation · Quant Researcher interview question · tick_imbalance, microstructure, bar_construction, information_driven, lopez_de_prado

Standard time-based or volume-based bars sample market data at fixed intervals, ignoring the information content of each observation. Tick imbalance bars, introduced by Lopez de Prado, instead trigger a new bar when the cumulative signed tick flow exceeds a threshold, producing samples synchronized with information arrival rather than the clock. Task Implement tick_imbalance_bars(prices, threshold) that constructs tick imbalance bars from a sequence of trade prices. Algorithm: 1. Assign a sign