Basic Prerequisites: Econometrics & Time Series (AR models, stationarity, ergodicity) and 01 · From Zero.


1. Intuition & Practical Objective

Markov-switching (02 · MS) treats the regime as latent - you never see it. Threshold models flip this: the regime is observable (or nearly so), because it is decided by a lagged value of the observed series crossing a threshold. If returns (or some state variable like a drawdown measure) are below a level , you are in the low regime; above it, in the high regime. No hidden coin - the data itself flips the switch.

Two families (Tsay Ch 4, verified):

  1. SETAR - Self-Exciting Threshold AR. The AR coefficients switch discontinuously when the delay- lag crosses :

The regime is fully observed once is known. This gives threshold models a forecasting advantage Hamilton flags: when the threshold variable is observed, the next regime is known with certainty (SETAR is a single model at horizon ); Markov-switching always produces a mixture.

  1. STAR - Smooth Transition AR. Replaces the hard cut with a smooth transition function (logistic or exponential):

so the conditional mean is a weighted combination of two linear models with weight . The logistic transition is for very negative , for very positive, and at the location with slope controlled by .

Practical objective: when you can name the switching variable (e.g., vol-level or drawdown state), threshold models estimate the threshold and the per-regime dynamics directly - cleaner than forcing a hidden Markov state. Tsay’s threshold-cointegration application (S&P 500 futures basis, Ch 8 §8.7) finds thresholds : outside the no-arbitrage band the ECM binds, inside it does not - a classic “regime = active vs inactive” story.


2. Mathematical Ground Truth & Derivations

SETAR() ergodicity (Tsay Ch 4, verified). For a TAR(1) with threshold variable (delay ), the two-regime process is ergodic if

Note the product condition: one regime may have as long as the other compensates - a key difference from a single linear AR, where is required.

Estimation (least squares). For a fixed threshold , each regime is a linear regression on the observations whose falls on that side; total SSE is the sum over regimes. The threshold is then chosen by grid search over the observed values of (Tsay recommends candidate thresholds in the interior, e.g. the – quantiles, to keep enough observations per regime):

SETAR vs Markov-switching - the forecasting contrast (Tsay, verified). SETAR: if the horizon and is observed, the regime is known exactly, so the conditional mean is a single linear model. Only beyond horizon do you average over which regime might be entered. Markov-switching: the state is always latent, so the forecast is always a mixture. Latent vs observed state is a modeling choice with real forecasting consequences.

STAR as a smooth generalization. As the slope , the logistic a step function and STAR collapses to SETAR. The smooth version avoids the discontinuity (better for estimation and for regimes that transition gradually) at the cost of the weakly-identified parameters .


3. Computational Implementation - SETAR threshold recovered exactly, STAR smooths it

Part 1 - SETAR grid search. Simulate a 2-regime AR(1) with a hard threshold at (low regime , high regime ), then recover the threshold and both regimes by grid search. Stdlib only.

The grid search finds the threshold exactly at and recovers both regimes’ AR coefficients well - a sharp, unambiguous demonstration of how an observed-state regime model works.

Part 2 - STAR smooths the hard threshold. Fit a logistic-STAR to the same SETAR data and show it approximates the threshold with a smooth transition (midpoint ) at nearly equal SSE.

The STAR midpoint lands at - right on the SETAR threshold - and reaches the SETAR SSE with a steep slope (, nearly a step). STAR is the smooth generalization of SETAR; the “regime” is a weighted blend, not a hard cut.


4. Failure Modes & First-Principles Breakdowns

  1. Threshold undefined under . Testing for a threshold is delicate: under the null of a single linear regime, the threshold is not identified (the classic Davies problem), so a standard LR test statistic has no null distribution (Tsay Ch 4 notes this explicitly). Hypothesis tests must be simulated/bootstrap, not taken from tables.
  2. Ergodicity vs one-regime stability. The two-regime process can be ergodic with one regime’s AR coefficient above (the product condition). Practitioners who impose in each regime throw away valid nonlinear behavior; those who ignore it may simulate explosive paths. Understand which you are assuming.
  3. Weak identification of the smooth parameters . STAR’s location and slope are only weakly identified (a broad, flat likelihood), so fitted bounce between runs even when in-sample SSE is nearly identical - unlike SETAR’s sharply-identified threshold. Report the whole transition, not the point estimate.
  4. Threshold-variable choice. The result depends on which lagged variable defines the regime and the delay ; misspecify the threshold variable and the “regimes” are artifacts. Cross-validate over candidate variables.

5. References

  • Tsay, Ruey S.: Analysis of Financial Time Series, 3rd ed.
  • Tong, Howell: Non-Linear Time Series (1990) and Threshold Models in Non-linear Time Series Analysis (1983)
  • Teräsvirta, Timo: Specification, Estimation, and Evaluation of Smooth Transition Autoregressive Models, JASA (1994)

6. Connected Graph Bridges