TailLossSimulator
TailLossSimulator applies scripted adverse shock scenarios to the combined portfolio (open positions plus the proposed order) and rejects or downsizes
What it does
TailLossSimulator applies scripted adverse shock scenarios to the combined portfolio (open positions plus the proposed order) and rejects or downsizes the order if the simulated tail loss exceeds the configured maximum. It acts as a pre-trade stress test, replacing post-hoc margin calls with a forward-looking gate.
Pipeline placement
Applies to: Every OrderIntent — stress-tests the combined portfolio (existing + proposed) against scripted shock scenarios before ap
Why it matters
| If this fails | Consequence |
|---|---|
| Tail loss unquantified before sizing up | Adding a new position without a stress test can push the portfolio into a tail regime where a single adverse resolution event causes losses far beyond the user's tolerance. |
| Correlated shock undetected | A scripted scenario that resolves all markets in the same direction reveals hidden concentration risk that individual position limits would miss. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Current market prices for all open positions | clob_public | required | Seed the shock scenario with current mark-to-market prices. |
| Outcome probabilities for open markets | data_api | required | Apply shock probability shifts to compute stressed portfolio value. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Open position list and notional values | internal | required | Define the current portfolio state before adding the proposed order. |
| Shock scenario library | internal | required | Load scripted adverse scenarios (probability shifts per market category). |
| KillSwitch active flag | KillSwitch | required | If active, reject immediately. |
Authority
What this bot is permitted to do
State
Readiness
Planned
Status
planned
Class
Guardrail
Default mode
planned
Developer owner
Polytraders core — Risk pod
Capital impact
Direct
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| KILL_SWITCH_ACTIVE | HARD_REJECT | Global kill switch active. | Immediate HARD_REJECT. |
| TAIL_LOSS_EXCEEDED | RESHAPE | Simulated tail loss exceeds max_tail_loss_usd; order resized if possible. | RESHAPE if safe_size > 0; else HARD_REJECT. |
| TAIL_LOSS_APPROACHING | WARN | Tail loss is between warning and hard threshold. | Attach WARN annotation; APPROVE. |
| TAIL_LOSS_DATA_UNAVAILABLE | HARD_REJECT | Position data or scenario library unavailable. | HARD_REJECT (fail-closed). |
Related bots in Risk Guardrail
Used by
Reverse index — strategies that currently reference risk.taillosssimulator. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| Fed Rates — surprise drift | frozen | last triggered 35m ago |
| AI Frontier — release-day taker | frozen | last triggered 42m ago |
Showing 2 of 2 · demo-wired ≠ production-live
Why this matters
Risk Guardrail bots does NOT propose intents or sign orders; only permits or blocks. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →