Free research tool

Market Regime

The market's regime as the data estimate it each trading day, with its history and each state's volatility and length.

How the market regime is estimated

How the Market Regime states are estimated, what they can and cannot say, and the checks the model passes before any state is published.

The input

One series: the daily log return of the S&P 500 members’ index, each member weighted by its index weight of the day before, from prices adjusted for splits and dividends, with each day’s actual members (so companies that later left the index are included). Volatility is not a separate input: each state has its own mean and its own spread, so the states are learned from the level and the spread of returns together. VIX is not an input.

The model: hidden states

A hidden-state (Markov-switching) model, Hamilton (1989): on each day the market is in one of a few states it does not show; in each state the day’s return is drawn from a normal distribution with that state’s own mean and variance, and from one day to the next the state either stays or switches with fixed probabilities (a first-order Markov chain). The model is fitted by maximum likelihood (expectation-maximisation) from several fixed starting points, the best fit kept.

  • How many states. One, two or three, chosen once, by the Bayesian information criterion on the first five years of data; a tie or a small difference goes to fewer states. A state that does not last (its chance of staying from one day to the next below 0.9) is not a regime, so the number is then lowered by one. The number is then fixed. Each year-end it is checked again on all the data so far; the check never changes it, and the dashboard says when it would prefer another number. Only a new method version can change it. One state means the first five yearsshowed no regime, and none is used.
  • Their names. At every fit the states are ordered by their variance, lowest first, and named calm and turbulent (with three: calm, normal, turbulent), so a refit cannot swap the names.
  • Refits. On all the data up to each month’s last trading day, from the end of the first five years on. A fit is used from the next trading day until the next refit.

Only what was known on the day

A day’s state probabilities are the filtered probabilities: the probability of each state given the returns up to and including that day’s close, computed with the fit in force on that day (fitted on data that ended before it). Never the smoothed probabilities, which use later returns. A day’s probabilities are written once and never recomputed with a later fit, so the history shows what the model said at the time. When a revised past price would change a stored day, the stored day stands and the change is recorded.

The label and the regime change

A day is labelled with its most likely state when that state’s filtered probability is at least 0.8, and “uncertain” otherwise. Uncertain days are counted and shown. A regime change is a day whose label differs from that of the last earlier day that was not uncertain. The days of the first five years are labelled with the first fit (in sample) and are shown in no history.

Market states are the model’s labels from the S&P 500 members’ index; a few days labelled calm can be turbulent, so a calm-state result can carry part of a turbulent-state effect.

The checks before anything is published

The method was written and fixed before it was run on real data. Before any real-data state is shown, the code passes gates, most of them on synthetic data whose true states are known: on returns made by two states it must find two, recover their means and variances, label the days and date the changes; on returns with no regime (normal, or with fat tails) it must find one state; and on the real index, rerun with every return after a day deleted, it must give that day the same probabilities as the full run (no later return reaches an earlier day). No state is published while those gates have not passed, and a result whose gate fails is shown as withheld, with its reason. No real-data state is shown before the first run’s results are reviewed.

How it is used

The states are an input to the Price Momentum analysis: its tests are also run within each market state, and a finding that holds only in one state names it, with whether that state applies today.

The model describes the market’s past and present state. It does not forecast the next state, and nothing here is investment advice.

Reference

Hamilton, J. D. (1989). A new approach to the economic analysis of nonstationary time series and the business cycle. Econometrica, 57(2), 357–384.

Markets and Macro is a summary of what Gyre's free tools show, with the studies behind them. The free tools behind it