# Regime Analysis and Strategy Portfolios

Test whether strategy behavior changes across defined regimes.

Use this workbook alongside the course. Write your answers before opening the solutions. Practical work is self-reviewed; scored knowledge checks are in the Academy.

## 1. Definitions

### Trend

A regime is a defined condition used to organize observations, such as high versus low measured variation. It is a modeling choice, not a directly observed permanent market identity. State the variables and thresholds used.

### Volatility

Definitions must use information available at the decision time. Labelling a period trending because its later full-period return was large cannot support a decision at the period's start.

### Liquidity

Regime duration and transition rules determine how quickly labels can change. Very responsive labels may switch often; slow labels can lag important changes. Evaluate the trade-off rather than assuming more stable labels are always better.

### Macro context

The purpose of a regime definition should be explicit: description, risk control or strategy selection. A classification useful for explaining history may not improve a prospective trading decision.

### Worked example

A month is labelled high volatility using its final realized volatility. That label is useful descriptively, but it was not known on the first trading day unless a separate forecast produced it then.

### Independent exercise

Rewrite the label as a decision-time rule using only a trailing window, and state what changes in the experiment.

My inputs and assumptions:

My calculation or decision:

Evidence that would change my conclusion:


## 2. Classification

### Observable features

Threshold classification maps measured features into categories under explicit rules. Borderline observations can change class with small data changes. Retain the underlying feature values instead of storing only the final label.

### Lag

Statistical clustering groups observations according to a chosen distance or model. Cluster names are interpretations added by the researcher. A cluster does not automatically correspond to an economic mechanism or tradable state.

### Threshold stability

Train transformations and classification parameters only on the allowed development data. Recomputing clusters over the full history can alter past labels using future observations, creating a misleading point-in-time record.

### Transition risk

Evaluate classification stability and uncertainty. An unfamiliar observation may not fit any learned class well. A documented unknown-state response is more honest than forcing every case into a confident category.

### Worked example

A clustering algorithm is refit after new data arrives and changes labels assigned to last year. If a backtest uses those revised labels as historical decisions, it may differ from what the system actually knew then.

### Independent exercise

Describe how to preserve a valid historical classification record while still allowing future model updates.

My inputs and assumptions:

My calculation or decision:

Evidence that would change my conclusion:


## 3. Allocation

### Correlated strategies

Strategy allocation should connect a class to an explicit action, not merely a colorful dashboard label. Specify which strategy, size rule or inactivity condition changes and when the change becomes effective.

### Switching costs

Compare the conditional policy with an unchanged baseline. Apparent success may come from the underlying strategy rather than the classifier. Include the costs and delays caused by switching.

### Drawdown scenarios

Risk limits apply across active strategies and transitions. Temporarily overlapping old and new exposures can increase risk during a switch. Model the actual close, cancel and open sequence.

### Monitoring rules

Allocation choices based on small class-specific samples can be unstable. Report observations per class and uncertainty. A class with a few favorable trades should not automatically receive a large allocation.

### Worked example

A classifier switches from strategy A to B, but A's working order remains active. If both fill, the account can hold more exposure than either isolated strategy test assumed.

### Independent exercise

Write a transition protocol that reconciles working orders and positions before activating the new policy.

My inputs and assumptions:

My calculation or decision:

Evidence that would change my conclusion:


## 4. Regime failure cases

### Avoid labels using future data

Avoid definitions that use future returns, eventual extremes or later revised data. A label must have an availability timestamp. Otherwise the apparent benefit can come from knowing the answer in advance.

### Measure transition delay

Measure transition delay between a relevant change and the model's response under a stated definition. Delay is part of implementation, not an inconvenience to remove retrospectively from the test.

### Test misclassification costs

Misclassification costs need not be symmetric. Applying a high-turnover strategy in an unsuitable state may be more costly than missing an eligible trade. Choose evaluation measures that reflect the actual decision consequences.

### Plan behavior in an unrecognized regime

An unrecognized regime requires a defined response such as withholding dependent entries or using a conservative baseline. The response should be tested; simply adding a new label after an extreme event does not validate it prospectively.

### Worked example

A classifier has high overall accuracy because one class dominates, but repeatedly makes the most costly error in a rare state. Accuracy alone can hide the decision problem.

### Independent exercise

Propose an evaluation table that includes class frequency, error type and economic consequences, without selecting weights after seeing the preferred model.

My inputs and assumptions:

My calculation or decision:

Evidence that would change my conclusion:


## Course project

Evaluate a fixed regime policy without hindsight relabelling.

### Self-review rubric

- Concepts and reasoning: 25%
- Calculations, data and evidence: 30%
- Process and risk controls: 25%
- Limitations and communication: 20%

Record one correction and one next practice task. This rubric is not automatically graded.

## Worked solutions

### Exercise 1

The new rule classifies using past observations and has a known calculation time. It predicts or proxies current conditions rather than identifying the completed month's outcome. Its errors and delays must be evaluated.

### Exercise 2

Store model version, fitted parameters, feature inputs and decision-time labels. Apply a new version only from its documented activation point in prospective evaluation; distinguish retrospective reclassification from the original record.

### Exercise 3

Define cancellation acknowledgements, treatment of existing positions and the exact point at which new entries are allowed. Include a failure or unknown-state branch and test the combined exposure during transition.

### Exercise 4

Report a confusion table, per-class sample sizes, predefined decision costs and net policy results including transitions. Disclose uncertainty in rare states and retain an independent evaluation period.

## Further reading

- https://www.itl.nist.gov/div898/handbook/
- https://scikit-learn.org/stable/modules/cross_validation.html
