Two averages of the same trades. VWAP weights each trade by its size; our TWAP counts each trade once.
Volume-weighted and time-weighted average prices for precise execution benchmarks.
All 11,692 trades from 14:38 to 14:39 UTC on 11 June 2025, Binance BTC-USDT perpetual, from the free raw-trades preview.
Step 1
At the end of the minute they are 0.108 bps apart.
Step 2
VWAP weights each trade by its size in BTC. TWAP here is the plain mean of trade prices, not time-weighted, so a $110 trade counts as much as a $264K one. It equals price_mean in the range dataset.
Step 3
BTC-USDT perpetual on Binance, 5m bars, 1 to 31 May 2025, from the free preview.
Bars by volume, quietest tenth to busiest tenth. Basis points.
The median gap over the month was 0.32 bps, and 1 bar in 100 had more than 2.74 bps. Sorted by volume, the quietest tenth of bars had a median gap of 0.14 bps and the busiest tenth 0.70 bps.
The two benchmarks differ most on the bars with the most volume. On those bars TWAP is furthest from the price most of the volume traded at.
vwap is the sum of price times quantity divided by the quantity traded in the interval. twap is the plain mean of the trade prices: each trade counts once, regardless of size or how long the price stood.
vwap above twap means the larger trades printed above the typical trade. Below means they printed lower.
Neither is a price you could trade at in one order. Use them as benchmarks, for execution and for fills in a backtest that doesn't model the book.
VWAP and TWAP are both price averages over an interval. But they weight observations differently — by volume and by time, respectively — and the divergence between them is itself a powerful signal about the quality of price moves.
Berkowitz, Logue & Noser (1988) established VWAP as the standard institutional execution benchmark, arguing that it represents the "average price available to the market" weighted by actual trading intensity. An institution that consistently buys above VWAP is demonstrably executing worse than the average participant — either because of adverse selection, poor timing, or market impact.
TWAP, by contrast, treats all time equally. It's the benchmark for time-sliced execution algorithms that distribute orders uniformly across a window, ignoring volume patterns. Madhavan (2002) noted that the choice of benchmark reveals the execution strategy's implicit assumption: VWAP assumes you should trade when everyone else does; TWAP assumes you should trade at a constant rate regardless.
The gap between VWAP and TWAP encodes information about the structure of trading within the bar:
VWAP > TWAP → Volume was disproportionately concentrated at higher prices. Heavy-volume trades happened at the top of the range. This is a bullish volume-quality signal: the market didn't just drift up on thin liquidity — participants endorsed the higher prices with real size. This aligns with the Blume, Easley & O'Hara (1994) finding that volume conveys information about the precision of traders' signals.
TWAP > VWAP → Price was elevated for extended periods but on thin volume. The asset spent time at high prices, but trading activity didn't endorse those levels. This is the signature of a thin-market drift — potentially unsustainable and vulnerable to reversal once volume returns.
Measuring fills against both benchmarks simultaneously reveals different aspects of execution quality:
References:
# Install the Aperiodic CLI into ~/.local/bin
mkdir -p "$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/aperiodic-io/cli/main/install.sh | INSTALL_DIR="$HOME/.local/bin" bash
export PATH="$HOME/.local/bin:$PATH"
# Free preview — no API key required
aperiodic vtwap --preview \
--exchange binance-futures \
--symbol perpetual-BTC-USDT:USDT \
--interval 5m \
--timestamp exchange \
--start-date 2025-05-01 \
--end-date 2025-05-31 \
--output-dir ./data && echo "Saved to $PWD/data"