Skip to main content

Cookies on Macro by Mark.We use essential cookies for sign-in, locale, and security. With your permission, we also use optional cookies for preferences, for analytics, and for advertising measurement with the Meta (Facebook) Pixel. Read our cookie policy.

Macro by MarkMacro by Mark
  • Home
Loading…
Loading…
← Models
MacroConceptsPolicyModels

Markov-switching VAR Model

Regime-switching macro system where latent states govern recession and expansion dynamics through transition probabilities.

OverviewGraphMathReferences

Graph workspace

Smoothed recession probability overlaid on observed GDP growth

Graph workspace

The defining output of a Markov-switching model is the smoothed regime probability. Plotting P(st=recession∣full sample)P(s_t = \text{recession} \mid \text{full sample})P(st​=recession∣full sample) against observed data shows how the model classifies each period and how closely the statistical regimes match economic narratives.

Chart axis metadata
xTimequarters · 0 to TySmoothed P(recession)probability · 0.0 to 1.0
Growth with the inferred recession
probability static chart preview showing Annualized growth, Zero growth
Filtered and smoothed probability of
recession static chart preview showing Smoothed probability, Filtered probability, True regime, Even odds
xTimequarters · 0 to TySmoothed P(recession)probability · 0.0 to 1.0

Current results

Detected recessions

Explain: Detected recessions
∑t1(ξt∣T(1)>0.5)\sum_t \mathbf{1}(\xi_{t|T}^{(1)} > 0.5)∑t​1(ξt∣T(1)​>0.5)

Number of quarters classified as recession (smoothed probability above 0.5).

64.00

quarters

Expected recession duration

Explain: Expected recession duration
1/(1−p22)1 / (1 - p_{22})1/(1−p22​)

Average number of quarters a recession lasts under the transition probability p22p_{22}p22​ set on the page. The toy filters with the true parameters; it estimates nothing.

5.00

quarters

Ergodic recession fraction

Explain: Ergodic recession fraction
(1−p11)/(2−p11−p22)(1 - p_{11}) / (2 - p_{11} - p_{22})(1−p11​)/(2−p11​−p22​)

Long-run fraction of time spent in recession. For the US, typically 10-20%.

0.2000

proportion

Regime separation (Mahalanobis)

Explain: Regime separation (Mahalanobis)
(μ0−μ1)/(σ02+σ12)/2(\mu_0 - \mu_1) / \sqrt{(\sigma_0^2 + \sigma_1^2)/2}(μ0​−μ1​)/(σ02​+σ12​)/2​

How distinguishable the two regimes are. Below 1 signals weak separation and unreliable classification.

0.4351

standardized distance

Controls

ordinary recessions
Explain: How much worse recessions are

Mean growth gap (recession - expansion): -1.2

The gap between average growth in recessions and expansions; a wider gap makes recessions deeper and clearer.

Wider gap produces sharper regime separation - smoothed probabilities snap more decisively to 0 or 1.

much choppier
Explain: How much wilder recessions are

Volatility ratio (recession / expansion): 2.4

How much more the data bounces around in recessions than in expansions.

Higher ratio produces wider scatter in recession episodes and more confident recession classification.

recessions last a while
Explain: Chance a recession continues

Recession persistence: 0.8

The chance the economy is still in recession next quarter, given it is in one now.

Higher p22p_{22}p22​ produces longer recession episodes and wider smoothed-probability spikes.

recessions well spaced
Explain: Chance an expansion continues

Expansion persistence: 0.95

The chance the economy is still expanding next quarter, given it is expanding now.

Higher p11p_{11}p11​ produces longer gaps between recessions. Lower p11p_{11}p11​ makes the economy cycle rapidly.

200
Explain: How many quarters to simulate

How many quarters of data the simulation produces.

Longer samples show more recession episodes and reveal the stationarity of the regime process.

Keep going

Read next

Continue with a related concept, model, or example.

Theory model

IS-LM Model

a well-connected theoretical model two steps from here

New angle: theoretical model →
Macro by Mark
Help
Privacy PolicyTerms of UseEthics and Compliance

© 2026 Mark Jayson Nation LLC