GEX
Public feedInitializing terminal
Volume-synchronized probability of informed trading
VPIN is a real-time toxicity metric that estimates the probability that current trading volume is driven by informed participants rather than noise. High VPIN readings indicate that informed traders are active in the market, which often precedes large price moves or volatility events.
Traditional measures of informed trading (like the PIN model) require daily data and are backward-looking. VPIN operates in volume-time rather than clock-time, which means it updates as trading activity occurs, not at fixed intervals.
The engine divides order flow into volume buckets of equal size. Within each bucket, trades are classified as buy-initiated or sell-initiated using the Bulk Volume Classification (BVC) method. VPIN is then computed as the absolute imbalance between buy and sell volume, averaged over a rolling window of buckets.
BVC classifies volume using price changes over the bucket interval and a normal distribution assumption. This avoids the need for tick-level trade signing (which is noisy and expensive) and provides a robust estimate of order flow imbalance at the bucket level.
VPIN values range from 0.0 to 1.0. The interpretation depends on context, but general guidelines apply:
| VPIN Range | Interpretation |
|---|---|
| 0.0 - 0.3 | Low toxicity. Normal two-sided flow. No unusual informed activity. |
| 0.3 - 0.5 | Moderate toxicity. Some order flow imbalance. Worth monitoring. |
| 0.5 - 0.7 | Elevated toxicity. Significant informed flow detected. Caution warranted. |
| 0.7 - 1.0 | Extreme toxicity. Heavy informed trading. High probability of impending large move. |
import requests
# VPIN is included in the signals endpoint
resp = requests.get(
"https://api.gexengine.com/v1/signals/SPX",
headers={"X-API-Key": "YOUR_API_KEY"}
)
resp_data = resp.json()
data = resp_data["data"]
# Access VPIN from the vex_index field
vpin = data["vex_index"]
print(f"VEX index: {vpin:.3f}")
print(f"Gamma regime: {data['gamma_regime']}")
print(f"Pin risk score: {data['pin_risk_score']:.3f}")
if vpin > 0.7:
print("Extreme toxicity -- informed flow detected")
elif vpin > 0.5:
print("Elevated toxicity -- monitor closely")