Basic Prerequisites: 02 · PIN (what VPIN estimates) and 01 · From Zero (the volume clock).


1. Intuition & Practical Objective

PIN is a daily, trade-count measure. In high-frequency markets that is too coarse and too slow: a single large institutional order is split into thousands of trades, an information event can unfold in minutes, and the number of trades is a poor proxy for the volume of information. VPIN (Easley, López de Prado & O’Hara 2012) fixes both problems at once:

  • It works in volume time - equal-sized volume buckets, not daily bars - so each measurement contains a comparable amount of trading (and information).
  • It measures imbalance, , which is the observable that reveals the informed fraction.

The practical objective: take a raw trade tape (timestamps, prices, volumes), sign every unit of volume as buy or sell, pack it into volume buckets, and compute a rolling VPIN that rises when the flow turns one-sided and toxic - an early-warning gauge for a maker (and the metric ELO claimed it spiked before the May 6, 2010 flash crash).

The only hard sub-problem is signing volume as buy or sell, because the tape does not tell you who initiated. VPIN’s signature answer is bulk-volume classification (BVC): within a bar, classify the whole bar’s volume probabilistically from the price change, instead of classifying each trade by a tick rule.


2. Mathematical Ground Truth & Derivations

Volume bucketing. The tape is divided into consecutive buckets of exactly shares. In bucket , with buy-volume and sell-volume , we have .

Bulk-volume classification (BVC). Take the per-unit price changes in the bucket. Because , classify each volume unit by the standard-normal CDF of its (normalized) price change (ELO 2012, Appendix A):

A large positive price change is almost surely a buy (); a large negative change almost surely a sell (); a zero change splits 50/50. This is the bulk (bar-wide, probabilistic) analogue of the per-trade Lee–Ready tick rule.

VPIN. Over a rolling window of the most recent buckets:

Since each bucket has exactly volume, the denominator is . Because , VPIN estimates the same PIN ratio - in volume time (ELO eq. 9):

ELO’s default: of average daily volume and , updated after every bucket (rolling - bucket 51 in, bucket 1 out). Updating in volume time makes each update a comparable amount of information, and faster during bursts exactly when information arrives faster.


3. Computational Implementation - BVC + rolling VPIN on a synthetic toxic tape (stdlib only)

Simulate an E-mini-like tape: balanced flow, then a long one-sided informed selling burst, then recovery. Sign volume with BVC, bucket, and roll.

VPIN reads the tape exactly as advertised: ~0.007 on balanced flow (buys and sells cancel), ~0.61 during the one-sided informed selling wave (the toxicity spike), and ~0.09 on recovery. That separation is the entire value of the metric - a real-time, volume-synchronized reading of how informed (and therefore how dangerous) the current flow is.


4. Failure Modes & First-Principles Breakdowns

  1. BVC is probabilistic, not truthful. It infers direction from price moves, so a price move that is not caused by informed flow gets signed as if it were. A volatility cluster or a public trend can manufacture imbalance (05 · Failure Modes).
  2. The absolute level is not portable. VPIN depends on the arbitrary choices of and ; what matters is a VPIN’s position in its own distribution, not a fixed threshold.
  3. It is an imbalance gauge, not a crash oracle. VPIN measures flow one-sidedness; it does not know whether that side is informed or simply panicky/mechanical (the Andersen–Bondarenko critique).
  4. Classification at zero price change. Units with get a 50/50 split, understating the true imbalance of that volume - a systematic bias when much volume trades at unchanged prices.

5. References

  • Easley, López de Prado & O’Hara (2012), Flow toxicity and liquidity in a high-frequency world, RFS 25(5), 1457–1493
  • Easley, López de Prado & O’Hara (2011), The microstructure of the “flash crash”, J. Portfolio Management 37(2)
  • Lee & Ready (1991), Inferring trade direction from intraday data, J. Finance 46(2)

6. Connected Graph Bridges