agentleFS
KumailQaziKumailQazi/krmaazha-binance-mcp/.agents/skills/market-regime-detection/SKILL.md

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

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
  1. Distinctive:

    When regime changes are detected, autonomous models must adapt parameters rather than using static constants:

    line 55
  2. Distinctive:

    In High Volatility: Stop loss distance must expand from $2.5\%$ to $1.5 \times \text{ATR}$, with position size scaled down proportionally …

    line 56

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

RegimeMathematical CriteriaOptimal StrategyRisk Allocation
Bullish ExpansionPrice > EMA 200, Mayer Multiple 1.0–2.4, RSI > 55, +DMI > -DMIMomentum / Trend Following (Rule 3)100% normal spot allocation
Bear CapitulationPrice < EMA 200, 200-day SMA slope negative, RSI < 40Cash Preservation / Inactivity (Rule 3)Cash / USDT Standard
Mean-Reverting RangeADX < 20, Bollinger Band width contracted, RSI oscillating 40–60Grid Trading / Mean ReversionReduced notional, tight stops
Liquidity Shock / CrisisATR spike > 3σ, Touch spread > 15 bps, Depth ±1% drop > 60%Emergency Halt / Confirmer Lockout0% 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:

  1. 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.
  2. In Compressed Ranges: Trend-following breakout triggers require 2 consecutive closed candles outside range boundaries to filter false breakouts.
  3. In Illiquid / Thin Books: Maximum single order size capped at $2%$ of $\pm 1%$ depth.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.