regime-detection

Classify market regimes using volatility and trend indicators on OHLCV data.

266|54|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/agiprolabs/claude-trading-skills --skill regime-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: regime-detection
Source: https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/regime-detection
Command: npx skills add https://github.com/agiprolabs/claude-trading-skills --skill regime-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, httpx, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps traders and quantitative analysts identify the current market regime (trending vs. ranging, high vs. low volatility) to adapt their strategies, position sizing, and risk management accordingly.

Core Features & Use Cases

  • Regime Classification: Utilizes indicators like ATR, ADX, Hurst Exponent, and Bollinger Bands to classify markets into four quadrants (e.g., "quiet trend", "volatile range").
  • Strategy Adaptation: Provides guidance on which strategies perform best in each regime and how to adjust position size and stop-loss levels.
  • Use Case: A quantitative trader can use this Skill to automatically detect if the market is trending strongly or ranging, and then dynamically switch their trading algorithm between a momentum strategy and a mean-reversion strategy, while also adjusting their risk exposure.

Quick Start

Use the regime-detection skill to classify the current market regime based on the provided price data.

Frequently Asked Questions about regime-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect market regimes using volatility and trend strength indicators?

You can detect market regimes by applying volatility clustering and trend strength indicators to OHLCV price data. Using Python libraries, the process calculates metrics like the Hurst exponent and ADX to classify markets into distinct trend and volatility states for adaptive trading.

What is market regime classification and how does it work with the Hurst exponent?

Market regime classification categorizes markets into four quadrants like quiet trend or volatile range. The Hurst exponent serves as a statistical method within this process to measure long-term memory, helping identify whether price series are trending, mean-reverting, or random walks.

How do I adapt my trading strategy based on different market conditions?

You adapt trading strategies by classifying the current market regime and dynamically switching algorithms. For strong trends, you apply momentum strategies, while for volatile ranges, you switch to mean-reversion, simultaneously adjusting position sizing and stop-loss levels to match detected conditions.

Can I use pandas and numpy for market regime detection with OHLCV data?

Yes, you can use pandas and numpy for market regime detection. The process requires OHLCV data as input and leverages these Python libraries along with httpx to perform the technical analysis calculations needed for volatility and trend strength indicator computations.

When should I adjust position sizing and stop-loss levels for adaptive trading?

You should adjust position sizing and stop-loss levels when the market transitions between different volatility and trend regimes. By detecting shifts using indicators like ATR and Bollinger Bands, you can optimize risk exposure and match your stop-loss levels to current market conditions.