Agent Skills
› winstonkoh87/Athena-Public
› trading-risk-gate
trading-risk-gate
GitHub统一交易前置风控关卡,整合破产检查、遍历性审计和胜率主导验证。通过三阶段流水线评估交易安全性,若风险过高则否决,确保资金与生存安全。
Trigger Scenarios
询问交易是否安全
评估风险偏好
检查破产概率
验证遍历性风险
对比胜率与盈亏比
Install
npx skills add winstonkoh87/Athena-Public --skill trading-risk-gate -g -y
SKILL.md
Frontmatter
{
"name": "trading-risk-gate",
"model": "default",
"auto-invoke": true,
"description": "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.",
"argument-hint": "ruin check | should I take this trade | is this safe | compare WR vs RR",
"context_trigger": "ruin, is this safe, should I risk, veto, ergodic, sequence risk, WR vs RR, position size, Law #1, bankruptcy"
}
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
Version History
- e624e2d Current 2026-07-19 08:47


