drawdown-circuit-breaker
Skill4 starsChanged 3 months agoMITView on GitHub
Use this skill to apply a mechanical drawdown-based risk gate — reduce or halt new position-taking after account equity falls a defined percentage from its peak. Trigger on "drawdown limit", "circuit breaker", "stop trading after a losing streak", "reduce size after a drawdown", "risk gate". Pairs with [position-sizer](../position-sizer/SKILL.md), which the gate's size_multiplier is meant to scale.
In this repository58 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/project-docs-prep/templates/AGENTS.mdAGENTS.md
- skills/project-docs-prep/templates/CLAUDE.mdCLAUDE.md
- deep-planningSkill
- deep-planningSkill
- deprecatedSkill
- architecture-reviewSkill
- code-reviewSkill
- diagnoseSkill
- tddSkill
- ui-design-engineeringSkill
- ux-ui-design-assessmentSkill
- in-progressSkill
- mcp-tool-managementSkill
- skill-managementSkill
- obsidian-canvasSkill
- obsidian-markdownSkill
- obsidian-notion-bridgeSkill
- obsidian-vault-workflowSkill
- boomz-preferencesSkill
- personal-agent-workflowSkill
- personalSkill
- automation-designSkill
- grill-with-docsSkill
- handoffSkill
- inbox-meeting-triageSkill
- markdown-reportSkill
- prompt-improvementSkill
- project-docs-prepSkill
- claim-citation-checkSkill
- daily-news-reportSkill
- github-skill-researchSkill
- project-discoverySkill
- repo-tourSkill
- research-methodologySkill
- seo-website-evaluatorSkill
- thaiSkill
- thai-addressSkill
- thai-customer-serviceSkill
- thai-date-formatSkill
- thai-festival-cardSkill
- thai-government-formSkill
- thai-id-validateSkill
- thai-invoiceSkill
- thai-pdpaSkill
- thai-resumeSkill
- thai-social-captionSkill
- thai-text-processingSkill
- thai-translateSkill
- backtest-expertSkill
- dividend-value-screenerSkill
- exposure-coachSkill
- market-breadth-analyzerSkill
- portfolio-managerSkill
- position-sizerSkill
- tradingSkill
- trader-memory-coreSkill
- uptrend-analyzerSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
No peak-equity/current-equity tracking exists yet — this skill needs those two numbers.
- Distinctive: line 37
When multiple thresholds are crossed, the most severe governs (an 18% drawdown triggers "halt," not "reduced," even though it also crosses …
- Very specific: line 56
Run python3 gate.py for the self-test.
- Distinctive: line 60
Default thresholds are illustrative starting points, explicitly not validated against any specific strategy's real drawdown history — …
- Distinctive: line 61
Does not track equity history itself.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Drawdown Circuit Breaker
Overview
Deciding "should I cut my size after a rough stretch?" in the moment is a documented weak point — loss-averse or revenge-trading decisions tend to be worse than a rule set in advance while calm. This skill applies a pre-committed, mechanical rule: given account equity's peak and current value, it returns whether new positions should be full-size, reduced, or halted.
Not financial advice. This is a mechanical rule over numbers you supply, not a prediction that further decline is or isn't coming.
When to use
- ตั้งกฎลดขนาดโพซิชันหรือหยุดเทรดชั่วคราวเมื่อพอร์ตขาดทุนถึงระดับที่กำหนด
- Checking whether current account drawdown crosses a pre-defined threshold
- Deciding the size multiplier to apply to position-sizer's output after a losing stretch
When NOT to use
- The user wants a market-timing signal (predicting further decline) — this is a risk-management rule about the user's own account state, not a market forecast
- No peak-equity/current-equity tracking exists yet — this skill needs those two numbers; if the user doesn't track equity curve, that's a prerequisite to set up first (see trader-memory-core)
Core knowledge
Drawdown: (peak_equity - current_equity) / peak_equity × 100. If current equity is a new high, drawdown is 0, not negative — a circuit breaker only cares about decline from the high-water mark.
Default illustrative thresholds (starting point, not a validated rule — tune to the user's own risk tolerance and strategy history):
| Drawdown | Action | Size multiplier |
| < 10% | Full size | 1.0× |
| 10-14.9% | Reduced size | 0.5× |
| ≥ 15% | Halt new positions | 0× |
When multiple thresholds are crossed, the most severe governs (an 18% drawdown triggers "halt," not "reduced," even though it also crosses the 10% threshold).
Why mechanical rules over judgment calls: the entire point of a circuit breaker is that the threshold and response are decided before the emotionally difficult moment, not during it — a rule that gets overridden in the moment provides none of its intended benefit.
Common mistakes
- Treating the "halt" trigger as a market call ("the market is going down") rather than an account-state rule ("my own risk budget for new bets just changed").
- Overriding the gate in the moment because "this setup looks too good to skip" — that defeats the purpose of a pre-committed rule.
- Setting thresholds so tight that normal volatility triggers "halt" constantly (rule becomes noise) or so loose that it never fires (rule provides no protection) — thresholds should be calibrated against the strategy's own historical drawdown distribution, not copied from this skill's illustrative defaults unexamined.
- Computing drawdown from an average or arbitrary equity value instead of the actual peak (high-water mark) — the peak must be tracked continuously, not re-estimated each time.
Code
gate.py — pure Decimal arithmetic, no dependencies:
compute_drawdown_pct(peak_equity, current_equity)→ Decimal percentage, floored at 0evaluate_drawdown_gate(peak_equity, current_equity, thresholds=DEFAULT_THRESHOLDS)→GateResult(drawdown_pct, action, size_multiplier)DEFAULT_THRESHOLDS— the illustrative table above, override with your own tuned thresholds
Run python3 gate.py for the self-test.
Known limitations
- Default thresholds are illustrative starting points, explicitly not validated against any specific strategy's real drawdown history — replace them before relying on this for real account decisions.
- Does not track equity history itself; the caller must supply an accurate peak-equity (high-water mark) figure.
- A rule this simple ignores context (e.g., a drawdown driven by one outlier loss vs. a genuine losing streak) — it's a blunt, deliberately mechanical instrument, not a nuanced risk model.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

