Skip to Main Content

Market Structure

Order Flow Toxicity (VPIN)

Order flow toxicity is the adverse selection liquidity providers face from informed traders, and VPIN estimates it from buy-sell imbalance in equal-volume buckets.
Also Called
  • VPIN
  • Volume-Synchronized Probability of Informed Trading
  • Flow Toxicity
  • Toxic Order Flow
By InsiderFinance TeamUpdated Sources & Methodology

Update VPIN One Bucket at a Time

The update raises VPIN by 0.004. Buy-heavy and sell-heavy buckets contribute by the same absolute-difference rule.
Rolling CalculationValue
Starting Imbalance Sum575,000 contracts
Remove Oldest BucketSubtract 4,000
Add Newest BucketAdd 14,000
Updated Sum585,000 contracts
Divide by Window Volume585,000 / 2,500,000 = 0.234
The update raises VPIN by 0.004. Buy-heavy and sell-heavy buckets contribute by the same absolute-difference rule.
On This Page
  1. What is order flow toxicity (VPIN)?
  2. How VPIN volume buckets are built
  3. Worked example
  4. How is VPIN calculated?
  5. How VPIN fits with other market data
  6. Limitations of VPIN
  7. Bottom line
  8. FAQ

Key Takeaways

  • Order flow toxicity describes adverse selection from the liquidity provider’s perspective.
  • VPIN calculates average absolute imbalance across equal-volume buckets.
  • The example uses 50 buckets of 50,000 contracts each.
  • Replacing a 4,000-contract imbalance with 14,000 raises VPIN from 0.230 to 0.234.
  • Reversing the classified buy and sell quantities produces the same absolute imbalance.
  • A rising VPIN flags one-sided flow; the quote, depth and completed trades show which side is pressing.

What is order flow toxicity (VPIN)?

Order flow toxicity is the adverse selection a liquidity provider faces when its executions leave inventory exposed to unfavorable price moves tied to the counterparty’s information. VPIN, the Volume-Synchronized Probability of Informed Trading, measures the average absolute difference between classified buy and sell volumes across equal-volume buckets. Easley, López de Prado and O’Hara introduced it in research on order flow toxicity. Its inputs are the bucket quantity, rolling bucket count and volume classification.

How VPIN volume buckets are built

The worked contract has average daily volume of 2,500,000 contracts. Dividing that amount by 50 sets each bucket at 50,000 contracts. The rolling window holds 50 completed buckets, totaling 2,500,000 contracts.

Each bucket closes when its quantity is filled. Faster trading completes buckets sooner, making the update frequency follow trading activity.

Bulk volume classification allocates bar volume between buying and selling using standardized price changes. Those assigned quantities add to the bucket’s total. The example assigns 32,000 contracts to buys and 18,000 to sells, producing an absolute difference of 14,000.

Formula

VPIN = ( sum over the last n volume buckets of |V(S,tau) − V(B,tau)| ) / (n × V)
  • V is the positive fixed quantity in each completed bucket.
  • n is the positive number of completed buckets in the rolling window.
  • Classified buy and sell volumes sum to V within each bucket.
  • Sum the absolute buy-sell differences and divide by n × V.
  • The result runs from zero for balanced buckets to one for entirely one-sided buckets.
  • Replacing one bucket changes the ratio by at most 1 / n.
  • Bulk volume classification splits each bar’s volume between buys and sells by its standardized price change: a rise sends more to buys, a fall more to sells.

Worked Example

A desk tracks VPIN on the E-mini S&P 500 futures contract. Average daily volume is 2,500,000 contracts, so the bucket size V is set to one fiftieth of that figure and the rolling window n is set to 50 buckets. Trade direction inside each bucket is imputed by bulk volume classification rather than signed trade by trade.

  • Bucket quantity: 2,500,000 / 50 = 50,000 contracts
  • Window volume: 50 × 50,000 = 2,500,000 contracts
  • Starting VPIN: 575,000 / 2,500,000 = 0.230
  • New classified quantities: 32,000 buy and 18,000 sell; absolute difference = 14,000
  • Updated imbalance sum: 575,000 − 4,000 + 14,000 = 585,000
  • Updated VPIN: 585,000 / 2,500,000 = 0.234

The new bucket adds 10,000 contracts to the rolling absolute-imbalance sum after the old bucket leaves. VPIN rises by 0.004 to 0.234. Reversing the new bucket to 18,000 classified buys and 32,000 classified sells produces the same result.

How is VPIN calculated?

VPIN adds the absolute buy-sell differences across the last n completed buckets and divides that sum by n × V, the window’s total volume. The initial 50 buckets contain 575,000 contracts of absolute imbalance. Divide by 2,500,000 to obtain 0.230.

Remove the oldest bucket’s 4,000 imbalance and add the new bucket’s 14,000. The updated sum is 585,000, giving 585,000 / 2,500,000 = 0.234. The change is +0.004.

The absolute value preserves magnitude. Switching the new bucket’s classified buys and sells leaves the same 14,000 contribution.

For 50 equal buckets, replacing one bucket changes the ratio by at most 0.02. In this example, even a completely one-sided new bucket would produce (575,000 − 4,000 + 50,000) / 2,500,000 = 0.2484.

How VPIN fits with other market data

VPIN summarizes the classified volume within its window. Order book imbalance describes displayed resting quantities, while time and sales records completed trades. Read VPIN for how one-sided recent volume has been, the book for where liquidity rests now, and the tape for what is trading.

Limitations of VPIN

  • Fix the settings before comparing readings. Bucket size, window length and the classification method all change the number, so compare the example’s 0.234 with readings built on the same 50 buckets of 50,000 contracts.
  • Check the split against signed trades when you have them. Bulk volume classification infers trade direction from price changes instead of signing each trade, so the 32,000 buy and 18,000 sell split comes from price moves.
  • The absolute difference discards direction. A buy-heavy bucket and its sell-heavy mirror add the same 14,000, so read the side from price and the tape.
  • Act on the book that confirms a high VPIN: a widening spread and thinning depth. Andersen and Bondarenko (CREATES Research Paper 2013-42) challenge VPIN’s record as an early warning of liquidity events, so the confirmation is what decides.
  • Watch the newest buckets for a sudden shift. One bucket moves the ratio by at most 1 / n, or 0.02 with 50 buckets, so a long window lags a sudden shift in flow.

Bottom line

VPIN turns classified trading volume into a rolling, volume-timed measure of one-sided flow, the condition liquidity providers associate with toxic order flow. Fix the bucket, window and classification settings, and act when the quote, depth and completed trades confirm what a rising reading flags.

Clear answers

Frequently Asked Questions

Sources and Further Reading

  1. Easley, Lopez de Prado and O'Hara: Flow Toxicity and Liquidity in a High Frequency World (Review of Financial Studies, 2012)
  2. Andersen and Bondarenko: Reflecting on the VPIN Dispute (CREATES Research Paper 2013-42)
  3. CFTC and SEC Staffs: Findings Regarding the Market Events of May 6, 2010

How entries are sourced, calculated and updated: editorial methodology.

Continue learning