Market Regimes Detector

Indicator Overview

This indicator identifies market regimes using a combination of technical indicators and machine learning. It classifies each period into one of three regimes: Uptrend, Downtrend, or Mean Reversion.

The system is powered by a K-Nearest Neighbors (KNN) model, which is trained to predict market behavior based on a broad range of technical features. The final regime classification is an ensemble of both traditional regime scores and machine learning predictions.

The indicator was carefully tested using walk-forward optimization, Bayesian parameter search, and out-of-sample validation to ensure robust and adaptive performance across changing market conditions.

How To Use This Indicator

Visual Interpretation

  1. Green shaded areas: represent Uptrend regimes
  2. Red shaded areas: represent Downtrend regimes
  1. Grey shaded areas: represent Mean Reversion regimes

Strategy Alignment

  1. In Uptrend Regimes: favor trend-following strategiesโ€
  2. In Downtrend Regimes: favor trend-following strategies
  1. โ€In Mean Reversion Regimes: consider strategies that take advantage of short-term price oscillations

Timing &ย Signals

Regimes are calculated using both raw and smoothed regime scores.

Signals between regimes are filtered to reduce false signals and increase stability.

The ensemble regime score can be used as a confidence signal for adaptive strategy switching.

Created By

Alpha Extract in April 2025

How To Use This Indicator