Explore Polymarket TWAP dislocation, spot divergence, reference-price lag, and execution-aware methods for detecting genuine market signals.
Introduction
A crypto price can move sharply while its time-weighted average price (TWAP) responds gradually. During that interval, a Polymarket order book may reflect a different probability than a model using the latest spot price.
This creates an interesting market microstructure problem: when is TWAP divergence meaningful, and when is it simply the expected behavior of a smoothing mechanism?
A Polymarket TWAP dislocation is not automatically an arbitrage opportunity. It may represent information latency, a temporary price shock, or a rational market response to an approaching settlement boundary.
Author: Nagi — GitHub · Telegram
The challenge is separating these explanations.
The Core Research Question
Can we identify periods when the underlying spot price, the TWAP reference price, and Polymarket market probabilities disagree beyond what normal market dynamics would predict?
The key is analyzing three related quantities rather than treating spot–TWAP distance as an independent trading signal.
1. Measuring TWAP Dislocation
This continuous-time equation is a research approximation, not a claim about Chainlink's exact calculation implementation.
Hypothetical BTC observations
| Variable | Value |
|---|---|
| BTC spot | $68,120 |
| TWAP | $68,060 |
| Price to beat | $68,080 |
| Spot–TWAP divergence | +8.82 bps |
| UP best ask | $0.64 |
The spot price exceeds the TWAP by $60, but the TWAP remains below the threshold.
That disagreement is measurable. Whether the UP contract is mispriced is a separate question.
2. Three Types of Dislocation
A. Mechanical dislocation
Spot moves abruptly, while the TWAP responds according to its averaging window.
This is expected mathematical behavior, not necessarily market inefficiency.
B. Informational dislocation
The Polymarket order book may incorporate information about future reference-price movements before the TWAP itself reflects them.
A large spot divergence could therefore coexist with a correctly priced prediction-market contract.
C. Probability dislocation
The interesting case occurs when a properly calibrated probability model disagrees with executable Polymarket prices after accounting for uncertainty and costs.
3. Why Time Remaining Changes Everything
The same spot–TWAP divergence can have very different implications depending on the remaining market duration.
With substantial time remaining, the underlying price can reverse and materially change the eventual reference price.
Near settlement, fewer observations may remain available to influence the final average.
Hypothesis: Dislocation magnitude becomes more informative when conditioned on remaining time, volatility, and the reference-price averaging mechanism.
This should be tested separately across market durations and volatility regimes.
4. A Better Detection Framework
Instead of triggering on a fixed divergence threshold, use a three-stage research framework.
This separates reference-price behavior from market pricing and execution.
A detector should report all three quantities, even when no actionable opportunity exists.
5. A Small Python Experiment
The following example uses synthetic spot prices and a simplified rolling average. It does not reproduce an official oracle feed.
import numpy as np
import pandas as pd
rng = np.random.default_rng(42)
spot = 68000 + np.cumsum(
rng.normal(0, 12, 300)
)
df = pd.DataFrame({"spot": spot})
df["twap"] = (
df["spot"].rolling(60).mean()
)
df["divergence_bps"] = (
(df["spot"] - df["twap"])
/ df["twap"] * 10000
)
df["dislocation"] = (
df["divergence_bps"].abs() > 5
)
print(df.tail(10))
The 60-sample window and five-basis-point threshold are experimental choices.
A real investigation should replace them with the relevant reference-feed observations and empirically calibrated thresholds.
6. What Can Go Wrong?
The most dangerous error is confusing reference-price lag with predictable settlement outcomes.
Other important failure modes include:
- Timestamp mismatch: Comparing prices captured at different moments.
- Stale order books: Treating an outdated quote as executable.
- Look-ahead bias: Using later reference observations in historical predictions.
- Volatility regime changes: Applying quiet-market thresholds during rapid price movement.
- Execution costs: Ignoring spread, fees, partial fills, and adverse selection.
A profitable-looking historical signal may disappear when reconstructed using only information available at the decision timestamp.
7. Validation and Advanced Research
A credible experiment should collect synchronized spot prices, TWAP observations, order-book snapshots, market thresholds, and settlement outcomes.
Evaluate predictions using probability calibration, Brier scores, and walk-forward validation. Separately estimate execution-adjusted expected value.
Useful extensions include volatility-conditioned thresholds, change-point detection, cross-exchange spot comparisons, probabilistic forecasting, and order-book response analysis.
The strongest evidence would be consistent out-of-sample predictive improvement over a baseline that already includes time remaining and distance to the settlement threshold.
Key Takeaways
- TWAP divergence is measurable but is not automatically arbitrage.
- Mechanical averaging lag must be distinguished from probability mispricing.
- Time remaining and volatility fundamentally affect signal interpretation.
- Executable order-book prices matter more than displayed midpoint prices.
- Historical replay must prevent timestamp leakage and stale-price assumptions.
FAQ
Is Polymarket TWAP dislocation arbitrage? Not necessarily. A divergence may be fully explained by averaging mechanics or correctly anticipated by traders.
Does larger spot divergence imply a stronger signal? Not without controlling for volatility, time remaining, and threshold distance.
Should a detector use best bid or best ask? Use the executable side corresponding to the contemplated trade, including relevant costs.
Can machine learning improve detection? Potentially, but only if its out-of-sample calibration and incremental predictive value exceed simpler baselines.
What is the most important backtesting requirement? Reconstructing the information genuinely available at each historical decision time.
Conclusion
Polymarket TWAP dislocation is best understood as a relationship among reference-price dynamics, settlement probabilities, and market microstructure.




Top comments (0)