CalendarCompression
CalendarCompression identifies pairs of related Polymarket markets resolving on different dates (e.
What it does
CalendarCompression identifies pairs of related Polymarket markets resolving on different dates (e.g. 'Will X happen by June?' vs 'Will X happen by December?') and trades the price differential when it deviates from the fair time-decay spread. The bot buys the underpriced near-expiry leg and/or sells the overpriced far-expiry leg to capture calendar compression.
Pipeline placement
Applies to: Pairs of Polymarket markets that share the same underlying event and resolve on different calendar dates, where the time
Why it matters
| If this fails | Consequence |
|---|---|
| Resolution sources differ between pair legs | Even if markets look related, different oracle sources produce independent resolution paths; the calendar spread is not a true arbitrage. |
| Near-expiry market resolves unexpectedly early | A market may resolve before the expected calendar date (breaking news), collapsing the calendar spread before the far-expiry leg adjusts. |
| Both legs resolve YES simultaneously | If both legs are correlated, a calendar long/short pair may both move adversely on news, doubling losses instead of creating a hedged position. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| CLOB mid and depth for both legs | ws_market | required | Measure calendar spread and available depth per leg. |
| Market metadata (resolution date, source) | clob_public | required | Identify calendar pairs and verify shared resolution source. |
| Market status (open, resolved) | clob_public | required | Skip resolved legs. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| KillSwitch active flag | KillSwitch | required | Abort all intent emission if KillSwitch active. |
| Calendar pair catalog (approved near/far pairs) | internal config | required | Restrict trading to pre-approved related-market pairs. |
| Builder code bytes32 | internal config | required | Injected into builder field on every signed V2 OrderIntent. |
Authority
What this bot is permitted to do
State
Readiness
Spec started
Status
planned
Class
Alpha Strategy
Default mode
shadow_only
Developer owner
Polytraders core — Strategy pod
Capital impact
Direct
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| CAL_SPREAD_TRADE | INFO | gap_bps >= min_gap_bps, sources match, within date limits. IOC OrderIntent emitted. | Emit IOC OrderIntent. |
| CAL_NO_GAP | INFO | gap_bps < 25 bps hard floor. | Skip; emit sampled DecisionReport. |
| CAL_GAP_MARGINAL | WARN | gap_bps 25–75 bps; size halved. | Emit at 50% size; log warning. |
| CAL_SOURCE_MISMATCH | HARD_REJECT | Calendar pair legs resolve from different sources. | Skip; no OrderIntent. |
| CAL_PAIR_TOO_LONG_DATED | HARD_REJECT | Far-expiry leg is beyond max_days_to_resolve hard limit. | Skip; no OrderIntent. |
Related bots in Strategy
Used by
Reverse index — strategies that currently reference strat.calendarcompression. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| AI Frontier — release-day taker | frozen | last triggered 8m ago |
Showing 1 of 1 · demo-wired ≠ production-live
Why this matters
Strategy bots does NOT sign, route, or directly submit orders to the chain. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →