Order Flow Toxicity (VPIN) - Quant Researcher Interview Question
Difficulty: Hard
Category: architecture & logic
Asked at: Jump Trading, Virtu, Two Sigma, Tower Research, Citadel Securities, Tudor Investment, HRT
Topics: market-microstructure, risk, pandas, scipy
Problem Description
The Volume-Synchronized Probability of Informed Trading (VPIN) estimates order flow toxicity by sampling data using a Volume Clock rather than chronological time. By aggregating trades into fixed-volume buckets and analyzing price drift, this metric quantifies buy-sell imbalances to detect adverse selection risk and potential liquidity crises in high-frequency markets.
Task
Implement the function solution(trades, bucket_size, window_size, sigma) to calculate the VPIN metric from a sequence of t
Practice this hard researcher interview question on MyntBit - the LeetCode for quants with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.