# Strategy Switching & Rotation

Also known as: session-based, risk-on/off, retirement rules, ensemble allocation.
A Meta & Composition concept (Regime logic) in the LuxAlgo Library, with 1 indicator implementation.

## What is Strategy Switching & Rotation?

Strategy switching and rotation is a meta-layer that decides which strategy is allowed to trade, rather than generating entries itself. Instead of one always-on system, a rulebook allocates among several: a trend-follower when conditions trend, a mean-reversion system in ranges, nothing at all when no system's conditions are met. The switch key can be a regime classifier, the volatility state, the calendar (session windows, seasonal filters), a risk-on/risk-off gauge, or each strategy's own rolling performance, as in the so-called retirement rules that bench a system after sustained underperformance.

The idea borrows from two older disciplines. Portfolio managers have long rotated capital across sectors and styles under the banner of tactical asset allocation, and ensemble methods in machine learning formalized the insight that diverse model pools tend to be more robust than any single model. Strategy rotation applies both to a trading account: the roster of systems is the asset list, the regime read is the allocation signal, and the value comes from the systems disagreeing about when they work.

Rotation generalizes the on/off switch into weighting: the strategy roster is treated like a portfolio, with allocation shifted toward whatever the current environment favors (ensemble allocation). The caveat is that the switching layer is itself a strategy with its own failure modes. Regime calls arrive with lag, so switches often fire after a transition has partly played out; whipsaw at regime boundaries can erase the benefit; and every switch rule is another parameter that can be overfit to past regimes. The meta-rules deserve the same out-of-sample scrutiny as the systems beneath them.

Implementation is mostly an architecture problem. Each system needs to be a self-contained unit, in the spirit of the [filter-setup-trigger-exit architecture](https://www.luxalgo.com/library/concept/filter-setup-trigger-exit-architecture/), so the meta-layer can enable, disable, or reweight it without touching its internals. The switch key is typically a trend/range classifier, a volatility percentile, or a composite gauge; rosters that span markets lean on [cross-instrument composition](https://www.luxalgo.com/library/concept/cross-instrument-composition/) to read one instrument's regime from another; and live switching is usually wired through [alerts and webhooks](https://www.luxalgo.com/library/concept/alerts-and-webhooks/) rather than manual intervention.

## How to identify regime shifts that justify a switch

Switching has no chart pattern of its own; what the chart shows is the regime evidence the meta-layer keys on.

1. Define each regime measurably before looking: a classifier reading, a volatility percentile band, a session clock, or a risk gauge, not a visual impression.
2. Plot the classifier beneath price and mark its historical transitions, noting how long each regime persisted; regimes flipping every few bars are too fast to allocate around.
3. Measure the lag between each visible regime change and the classifier's confirmation; that gap is the cost every switch pays.
4. Bucket each strategy's results by regime; rotation needs the systems to win in different buckets, not merely to differ on average.
5. Add hysteresis at the boundary, a minimum dwell or separate entry and exit thresholds, and check that it removes most flip-flops.

## How it's calculated

A supervisory layer that decides which of several strategies may trade at any moment and how much capital each one gets.

```
1. Define the pool: strategies S_1 to S_m, each with its own rules and a per-period return series r_{i,t}.
2. Choose the switching key K_t: a session or calendar window, a regime state (trend/range, risk-on/off, volatility level), or each member's own rolling performance.
3. For rotation, compute score_{i,t} for every member over the last L periods (commonly trailing return or equity-curve strength) and rank the pool.
4. Map the key state to target weights w_{i,t}, with the weights summing to 1 across the pool (less when partly in cash).
5. Hard switching sets one w_{i,t} = 1 and the rest to 0; rotation holds the top k ranked members at w_{i,t} = 1/k; ensemble allocation spreads weight across members (equal, score-proportional, or inverse-volatility).
6. Apply persistence and retirement rules: require the key state to hold for h consecutive evaluations before switching, and bench a member (w_{i,t} = 0) while its drawdown exceeds a preset limit or its score sits below its retirement floor.
7. Rebalance on the evaluation schedule and book the composite return with lagged weights: r_{p,t} = Σ (w_{i,t-1} × r_{i,t}) over i = 1..m, minus switching costs.

  S_i: strategy (or asset sleeve) number i in the pool
  m: number of members in the pool
  i: member index, 1 to m
  t: evaluation period (bar, session, or rebalance date)
  r_{i,t}: return of member i over period t
  K_t: switching key evaluated at t (time window, regime label, or performance state)
  score_{i,t}: ranking metric for member i at t (commonly trailing L-period return)
  L: scoring lookback (commonly 1 to 12 months in rotation systems)
  w_{i,t}: target weight of member i set at t
  k: number of members held by a rotation (commonly 1 to 3)
  h: persistence requirement, in consecutive evaluations, before a switch fires
  r_{p,t}: composite portfolio return for period t
```

There is no single canonical formula; this is the shared skeleton behind session switches, risk-on/off filters, performance-based retirement rules, and rotation or ensemble portfolios.

Keys and scores must use only data available before the weights take effect, otherwise the backtest gains lookahead bias.

Every switch pays costs and regime keys confirm late, so the hysteresis term h and cost-aware evaluation decide whether the layer helps at all.

## How traders use it

- To key systems to regime: a [trend/range classifier](https://www.luxalgo.com/library/concept/trend-range-classifiers/) enables trend-following logic only in trending tape and hands off to mean-reversion rules in ranges, while volatility-based switches cut size or disable everything when conditions turn disorderly.
- To gate by calendar: an intraday system trades only inside its tested session window and stands down around major scheduled news, encoding the observation that many edges are session-specific.
- To rotate on performance: each system's rolling equity is monitored, allocation is trimmed for systems in drawdowns beyond their historical norm, and restored on recovery, accepting that such rules react late by construction.
- To weight an ensemble: capital is spread across the roster the way [custom indices and baskets](https://www.luxalgo.com/library/concept/custom-indices-baskets/) spread across instruments, favoring members that win in different regimes.
- To keep the layer honest: minimum-dwell and debounce rules borrowed from [signal hygiene](https://www.luxalgo.com/library/concept/signal-hygiene/) stop the switch thrashing at regime boundaries, where classifiers are least reliable.

## Strategy Switching & Rotation vs related composition ideas

- **Adaptive Parameterization** (https://www.luxalgo.com/library/concept/adaptive-parameterization/): Adaptive parameterization keeps one strategy and re-tunes its inputs as conditions change; switching assumes different regimes need structurally different logic and swaps whole strategies. Adaptation is the gentler intervention, rotation the more drastic, and they nest: rotated systems can each be adaptive internally.
- **Confluence & Scoring Systems** (https://www.luxalgo.com/library/concept/confluence-and-scoring-systems/): Confluence scoring blends multiple signals into one entry decision on a single trade. Rotation never merges signals: each system keeps its own entries and exits, and the meta-layer only decides which systems hold capital. One composes evidence; the other composes strategies.

## FAQ

### Is switching between strategies better than running one strategy all the time?

Not automatically. Switching only adds value when regimes can be identified with usable lead time and the strategies genuinely complement each other. Because classifiers confirm regimes late, the switch often costs part of each transition, and the extra rules are easy to overfit. Compare the switched portfolio against the always-on versions out of sample before concluding it helps.

### What are retirement rules in a trading strategy?

Retirement rules deactivate a strategy after sustained underperformance, for example a drawdown beyond its historical norm or equity falling below a long moving average of itself, and may reinstate it if performance recovers. They protect against decayed edges, but they are lagging by nature and can bench a system right before it recovers, so thresholds should be tested, not guessed.

### What does risk-on/risk-off switching mean?

Allocating by a broad appetite gauge rather than a per-market regime: when equity trend, credit conditions, or implied volatility signal appetite for risk, directional systems are enabled; when the gauge turns defensive, allocation moves to mean-reversion, hedged, or flat states. The gauge choice is itself a modeling decision with the usual overfitting hazards.

### What is session-based strategy switching?

Enabling systems only during the hours where their edge was measured: an opening-drive system for the first hour, mean-reversion for the midday lull, nothing overnight. It encodes the well-documented daily shape of intraday volatility and participation, and the calendar is the cheapest switch key because it arrives with zero lag.

### How many strategies do you need for rotation to be worthwhile?

There is no magic count; what matters is that the systems win in different regimes. Two genuinely complementary systems, one trending and one ranging, capture most of the idea; ten variants of the same trend-follower add complexity without diversification. Regime-bucketed performance, not roster size, is the test.

### How do you keep switching rules from being overfit?

Keep the meta-layer coarse: few regimes, few thresholds, hysteresis at boundaries, and switch keys with an economic rationale rather than tuned constants. Then hold the construction to walk-forward evaluation against always-on baselines, including an equal-weight blend of the same systems. A switching layer that only outperforms in the sample it was tuned on is a curve-fit, not a discovery.

## Implementations in the Library

- Multi-Strategy Portfolio Optimizer (LuxAlgo): https://www.luxalgo.com/library/indicator/multi-strategy-portfolio-optimizer/

## Related concepts

- Adaptive Parameterization: https://www.luxalgo.com/library/concept/adaptive-parameterization/
- Trend/range Classifiers: https://www.luxalgo.com/library/concept/trend-range-classifiers/
- Volatility Regime Switches: https://www.luxalgo.com/library/concept/volatility-regime-switches/

---

Source: https://www.luxalgo.com/library/concept/strategy-switching-and-rotation/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/