market-regime-detection
Skill4 starsChanged 38 days agoMITView on GitHub
Quantitative market regime classification (Trending Bull/Bear, Mean-Reverting Range, High Volatility Expansion, Liquidity Crisis) with dynamic parameter adaptation for systematic crypto models and spot portfolios.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- IngAs8/ClaudeSkilltheir own version, first seen Sep 28, 2026
- SKE-Labs/agent-trading-skillstheir own version, first seen Jul 18, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- SKE-Labs/agent-trading-skills★ 17same name
- IngAs8/ClaudeSkill★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-debt-detectorSkill
- airflow-dag-patternsSkill
- async-python-patternsSkill
- backtesting-frameworksSkill
- create-readmeSkill
- data-engineeringSkill
- data-quality-frameworksSkill
- dataset-curationSkill
- dbt-transformation-patternsSkill
- design-doc-mermaidSkill
- embedding-strategiesSkill
- eval-harness-firstSkill
- excalidraw-diagramSkill
- execution-algorithmsSkill
- external-diagram-mermaid-generateSkill
- frontend-designSkill
- hybrid-search-implementationSkill
- improve-codebase-architectureSkill
- llm-evaluationSkill
- mcp-builderSkill
- mcp-registry-syndicationSkill
- mcprush-gateway-deploymentSkill
- mermaid-diagramsSkill
- ml-pipeline-workflowSkill
- orchestratorSkill
- postgresql-table-designSkill
- prompt-engineering-patternsSkill
- python-testing-patternsSkill
- rag-implementationSkill
- regulatory-compliance-auditSkill
- risk-metrics-calculationSkill
- security-reviewSkill
- spark-optimizationSkill
- sql-optimization-patternsSkill
- vector-index-tuningSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 55
When regime changes are detected, autonomous models must adapt parameters rather than using static constants:
- Distinctive: line 56
In High Volatility: Stop loss distance must expand from $2.5\%$ to $1.5 \times \text{ATR}$, with position size scaled down proportionally …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Quantitative Market Regime Detection Skill
This skill governs the identification of macroeconomic and volatility regimes in crypto markets, enabling adaptive algorithmic parameters and risk budgeting.
1. The Four Primary Market Regimes
Systematic trading performance depends critically on matching strategies to prevailing market regimes:
| Regime | Mathematical Criteria | Optimal Strategy | Risk Allocation |
| Bullish Expansion | Price > EMA 200, Mayer Multiple 1.0–2.4, RSI > 55, +DMI > -DMI | Momentum / Trend Following (Rule 3) | 100% normal spot allocation |
| Bear Capitulation | Price < EMA 200, 200-day SMA slope negative, RSI < 40 | Cash Preservation / Inactivity (Rule 3) | Cash / USDT Standard |
| Mean-Reverting Range | ADX < 20, Bollinger Band width contracted, RSI oscillating 40–60 | Grid Trading / Mean Reversion | Reduced notional, tight stops |
| Liquidity Shock / Crisis | ATR spike > 3σ, Touch spread > 15 bps, Depth ±1% drop > 60% | Emergency Halt / Confirmer Lockout | 0% execution (Rule 6 discipline) |
2. Quantitative Indicators & Classification Formulas
2.1 Trend Regime Detection
- Mayer Multiple:
$$\text{MM} = \frac{\text{Current Close Price}}{\text{200-day SMA}}$$
- $\text{MM} < 0.6$: Historical cycle bottom / cyclical accumulation zone.
- $0.6 \le \text{MM} < 1.0$: Bear market recovery.
- $1.0 \le \text{MM} < 2.4$: Healthy bull trend accumulation.
- $\text{MM} \ge 2.4$: Overextended euphoric top warning (Rule 5 profit harvesting).
- EMA Momentum Alignment: Fast EMA (12-period) vs Slow EMA (26-period): $$\text{Trend Score} = \frac{\text{EMA}{12} - \text{EMA}{26}}{\text{EMA}_{26}} \times 100$$
2.2 Volatility & Liquidity Regime Detection
- Normalized ATR (NATR):
$$\text{NATR} = \frac{\text{ATR}_{14}}{\text{Close Price}} \times 100$$
- $\text{NATR} < 2.0%$: Compressed volatility (breakout impending).
- $2.0% \le \text{NATR} \le 5.0%$: Normal crypto trading volatility.
- $\text{NATR} > 7.5%$: Extreme volatility expansion (widen stops, halve position sizing).
- Order-Book Liquidity Ratio: $$\text{Liquidity Health} = \frac{\text{Depth}_{\pm 1%}}{\text{24h Volume Notional}}$$
3. Adaptive Parameter Tuning Rules
When regime changes are detected, autonomous models must adapt parameters rather than using static constants:
- In High Volatility: Stop loss distance must expand from $2.5%$ to $1.5 \times \text{ATR}$, with position size scaled down proportionally to keep $1R$ risk constant.
- In Compressed Ranges: Trend-following breakout triggers require 2 consecutive closed candles outside range boundaries to filter false breakouts.
- In Illiquid / Thin Books: Maximum single order size capped at $2%$ of $\pm 1%$ depth.
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.

