About this question
Hard · machine_learning · Quant Researcher interview question · market_microstructure, vpin, order_flow, high_frequency
The Volume-Synchronized Probability of Informed Trading (VPIN) is a high-frequency market microstructure metric used to estimate order flow toxicity by measuring order imbalances within volume-based buckets. By utilizing a volume clock instead of time bars, VPIN aligns with the speed of information arrival, making it a robust tool for predicting market volatility and liquidity crashes. Task Implement a function solution(trades, bucket_volume, window_size) that calculates the rolling VPIN metric