aerodrome
Use when creating, validating, backtesting, deploying, sizing, or troubleshooting Aerodrome/Base spot trading strategies through…
Use when adding a regime filter to any directional strategy — regime gate, trend filter, directional confirmation, ADX gate, EMA-separation filter, trade-or-skip overlay. Provides three reusable gates (regime_strong_bear, regime_strong_bull, regime_range) that wrap entry signals
$ npx -y skills add Superior-Trade/superior-skills --skill regime-overlay --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/regime-overlayContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when adding a regime filter to any directional strategy — regime gate, trend filter, directional confirmation, ADX gate, EMA-separation filter, trade-or-skip overlay. Provides three reusable gates (regime_strong_bear, regime_strong_bull, regime_range) that wrap entry signals
name: regime-overlay description: "Use when adding a regime filter to any directional strategy — regime gate, trend filter, directional confirmation, ADX gate, EMA-separation filter, trade-or-skip overlay. Provides three reusable gates (regime_strong_bear, regime_strong_bull, regime_range) that wrap entry signals with triple confirmation." metadata: version: 0.1.0 updated: 2026-05-18
A reusable filter that wraps any directional strategy and only allows entries when three independent regime confirmations align. Validated as the difference between a fragile and a robust trend strategy.
Searchable under: **regime filter**, **trend gate**, **trade-or-skip filter**, **directional confirmation**, **ADX gate**.
After 21 backtests, the single biggest performance lever was not entry logic, stop sizing, or trailing config. It was **whether the strategy traded at all** during specific market structure.
The proof:
The first version captured a real edge mixed with random noise. The third version captured **only** the real edge. Smaller absolute return; cleaner equity curve; no losing periods.
A signal is "in regime" when ALL three of these hold simultaneously:
| Indicator | Threshold | What it confirms | |---|---|---| | `(EMA50 - EMA200) / EMA200` | < -0.06 (for bear) | **Structural** trend direction — not a fresh cross, real separation | | `ADX(14)` | > 25 | **Strength** of the current trend | | `close.pct_change(30)` | < -0.10 (for bear) | **Recent** momentum is actually moving |
Three independent angles — structure, strength, recency. A market can satisfy any one or two by accident; satisfying all three is genuinely rare and genuinely informative.
For **long-side** strategies, invert the signs:
def regime_strong_bear(df: pd.DataFrame) -> pd.Series:
ema50 = ta.EMA(df, timeperiod=50)
ema200 = ta.EMA(df, timeperiod=200)
adx = ta.ADX(df, timeperiod=14)
ema_sep = (ema50 - ema200) / ema200
ret_30 = df["close"].pct_change(30)
return (ema_sep < -0.06) & (adx > 25) & (ret_30 < -0.10)
def regime_strong_bull(df: pd.DataFrame) -> pd.Series:
ema50 = ta.EMA(df, timeperiod=50)
ema200 = ta.EMA(df, timeperiod=200)
adx = ta.ADX(df, timeperiod=14)
ema_sep = (ema50 - ema200) / ema200
ret_30 = df["close"].pct_change(30)
return (ema_sep > 0.06) & (adx > 25) & (ret_30 > 0.10)
def regime_range(df: pd.DataFrame) -> pd.Series:
adx = ta.ADX(df, timeperiod=14)
return adx < 25The range-regime check is the opposite end of the spectrum — useful for gating mean-reversion strategies (see `bollinger-reverter-4h`).
Apply this overlay to any signal-driven entry. The cost is **fewer trades**; the benefit is **the trades you do take fire in the right environment.**
| Strategy | Without overlay | With overlay | |---|---|---| | Donchian breakdown BTC | 23 trades, 56.5% win, +12.85%, 3.69% DD | **6 trades, 100% win, +6.69%, 0% DD** | | (Same, second-half only) | 8 trades, 25% win, -4.32% | **0 trades, no PnL** |
The overlay traded the second column's win rate **and drawdown** for the first column's absolute return. Most production strategies should prefer the second column.
| Parameter | Conservative | Aggressive | Notes | |---|---|---|---| | EMA separation threshold | 0.08 | 0.04 | Tighter = wait for deeper structural moves | | ADX threshold | 30 | 20 | Higher = stricter trend-strength requirement | | Return lookback bars | 40 | 20 | Window for "actual momentum" check | | Return threshold | 0.15 | 0.06 | How much momentum needed |
Start conservative (0.06 / 25 / -0.10). Loosen only if the gate eliminates so many trades that the strategy's edge can't compound.
Most directional strategies in this repo benefit from this overlay:
The overlay file itself is regime-agnostic — it provides functions for both bear and bull, and a range complement.
Trading strategies and intelligence tools for Superior Trade — natural-language strategy authoring, backtesting, and autonomous deployment on Hyperliquid, Lighter, and Polymarket.
Use when creating, validating, backtesting, deploying, sizing, or troubleshooting Aerodrome/Base spot trading strategies through…
Use when running, interpreting, or designing backtests on Superior Trade — anything about backtest windows, trade-count…
Use when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the…
Use when writing a symmetric Bollinger-band mean-reversion strategy on the 4h timeframe — BB reverter, range trader, chop…
Use when writing a swing/intraday breakout strategy on Superior Trade — anything described as breakout, momentum, trend…
Use when a Polymarket prediction-market thesis rests on an external event — CPI, Fed, elections, court rulings, ETF decisions —…