PortfolioHedger
PortfolioHedger monitors the user's Polymarket portfolio for correlated exposure flagged by the Risk guardrail and builds offsetting positions to redu
What it does
PortfolioHedger monitors the user's Polymarket portfolio for correlated exposure flagged by the Risk guardrail and builds offsetting positions to reduce net directional risk. When correlated market clusters exceed target_residual_corr and hedging cost is within max_hedge_cost_bps, the bot emits hedge OrderIntents to neutralise the correlation.
Pipeline placement
Applies to: User Polymarket portfolios where correlated market clusters are identified by the Risk guardrail and residual correlatio
Why it matters
| If this fails | Consequence |
|---|---|
| Correlation model misjudges relationship between markets | If two markets are assumed correlated but resolve independently, the hedge creates unintended net short exposure rather than neutralising risk. |
| Stale input data | Acting on stale signals for PortfolioHedger produces trades based on outdated market conditions, generating adverse fills. |
| KillSwitch not respected | Emitting OrderIntents while KillSwitch is active bypasses risk controls. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| CLOB book (mid, depth, spread) | ws_market | required | Read current market price and available depth for order sizing. |
| Market status (open/closed/resolved) | clob_public | required | Skip closed or resolved markets. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| KillSwitch active flag | KillSwitch | required | Abort all intent emission if KillSwitch active. |
| PortfolioHedger analytics signal | internal (analytics engine) | required | Provides the core PortfolioHedger signal that drives trade decisions. |
| 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 |
|---|---|---|---|
| PH_TRADE | INFO | All gates passed. IOC OrderIntent emitted for PortfolioHedger. | Emit IOC OrderIntent. |
| PH_MARGINAL | WARN | Edge is within the warning threshold; size reduced 50%. | Emit at 50% size; log warning. |
| PH_NO_EDGE | INFO | Edge below hard floor. Skipping. | Skip; emit sampled DecisionReport. |
| PH_HARD_REJECT | HARD_REJECT | A critical gate condition blocked the trade (stale data, kill switch, or hard parameter breach). | Skip; no OrderIntent. |
| KILL_SWITCH_ACTIVE | HARD_REJECT | Global kill switch is active. | Skip all markets; no OrderIntents emitted. |
Related bots in Strategy
Used by
Reverse index — strategies that currently reference strat.portfoliohedger. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| NBA props — line-shop | demo-wired | last triggered 16m ago |
| Crypto Q2 — basket rebalance | frozen | last triggered 23m ago |
| US Elect — book-builder | demo-wired | last triggered 30m ago |
Showing 3 of 3 · 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 →