# Trading Risk Gate

> Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

- Skill: `winstonkoh87/trading-risk-gate` (Agent Skill)
- Install (CLI): `npx skillmds@latest add winstonkoh87/trading-risk-gate`
- Raw SKILL.md: https://api.skillmd.com/api/skills/winstonkoh87/trading-risk-gate/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: winstonkoh87 (https://skillmd.com/u/winstonkoh87)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/winstonkoh87/trading-risk-gate

---


# Trading Risk Gate (Pre-Trade Safety)

> **Absorbs**: `ergodicity-check`, `law-of-ruin`, `win-rate-dominance`

Unified pre-trade gate. Answers: "Should I take this trade?" by running three checks in sequence.

## Triggers

"is this safe", "should I risk", "ruin", "Law #1", "veto", "ergodic", "sequence risk", "wr vs rr", "win rate stability", "why am I losing with 1:3", "absorbing state", "all-in", "bankruptcy"

## The Three-Gate Pipeline

```
GATE 1: Law of Ruin          GATE 2: Ergodicity           GATE 3: WR Dominance
┌─────────────────────┐     ┌─────────────────────┐     ┌─────────────────────┐
│ P(Ruin) > 5%?       │ ──▶ │ Non-ergodic?         │ ──▶ │ WR < Breakeven?     │
│ 5 Domains:          │     │ Absorbing barrier?   │     │ Variance Drag > EV? │
│ Bio/Legal/Fin/      │     │ P(survive N) < 80%?  │     │ RR structure viable? │
│ Social/Psych        │     │                      │     │                      │
│ VETO if YES ❌      │     │ VETO if YES ❌       │     │ WARN if YES ⚠️      │
└─────────────────────┘     └─────────────────────┘     └─────────────────────┘
```

### Gate 1: Ruin Class Check (Law #1)

| Layer | Domain | Event Horizon |
|-------|--------|---------------|
| 1 | Biological | Death, permanent disability |
| 2 | Legal | Incarceration, criminal record |
| 3 | Financial | Bankruptcy, margin call |
| 4 | Social | De-platforming, exile |
| 5 | Psychological | Burnout Stage 4, loss of agency |

**VETO** if P(Ruin) > 5%. No exceptions.

### Gate 2: Ergodicity Audit

- Ensemble average ≠ Time average for non-ergodic processes
- $P(\text{Survive } n \text{ trials}) = (1-r)^n$
- Even 5% risk/trial = 0.6% survival after 100 trials
- **VETO** if P(survival over all planned trials) < 80%

### Gate 3: Win Rate Dominance

- High WR / Low RR systems structurally dominate High RR / Low WR systems
- Variance Drag ($V^2/2$) geometrically destroys low-WR portfolios
- Validates that the system's WR sustains the chosen RR structure

## Output

```
RISK GATE REPORT
────────────────
Gate 1 (Ruin):      [✅ PASS / ❌ VETO — domain: ...]
Gate 2 (Ergodicity): [✅ PASS / ❌ VETO — P(survival): X%]
Gate 3 (WR/RR):     [✅ PASS / ⚠️ WARN — variance drag exceeds ...]

VERDICT: [CLEARED / VETOED]
```

## Reference Protocols

- Protocol 193: Ergodicity Check
- Protocol 367: High Win-Rate Supremacy
- Law #1: No Irreversible Ruin

