RegimeShift

KSA Market Regime Monitor

Latest verified pipeline run: train-only MRSM fit, filtered forward, feeding both the current-regime explainer and the 5-day forecaster.

as of
2025-03-13
train window
2009-02-25 → 2017-12-31 (n=1992)
compute
CPU (no visible GPUs)

Step 7 / Latest signal

Attribution: attention x Integrated Gradients

22.0%GREEN · Low Risk

P(Crisis) on 2025-03-13, calibrated with temperature scaling.

Top-3 drivers

  • 1SPREAD_chg_5dvalue -2,199.61attr 0.0006
  • 2MA100value 59,086.34attr 0.0003
  • 3SPREADvalue 54,493.59attr 0.0003

Step 2 / MRSM regime variances

Train-only fit, frozen params

Stable

σ² 0.333002

Moderate

σ² 1.626206

Crisis

σ² 10.199626

Step 6 / Calibration of Model B

Fitted temperature 4.255

Brier score on P(Crisis) — lower is better. Temperature scaling (0.0193) beats both the uncalibrated model (0.0453) and isotonic regression (0.0216).

Model A

Explain the current regime

Model_A_Current_Regime_Explainer · horizon = 0 days

76.1%

accuracy · n=1299

ClassPrecisionRecallF1Support
Stable0.8180.879
0.847
934
Moderate0.5590.469
0.510
343
Crisis1.0000.318
0.483
22

macro F1 0.613

weighted F1 0.752

Confusion matrix · rows = true, cols = predicted

Stable
Moderate
Crisis
Stable
821
113
0
Moderate
182
161
0
Crisis
1
14
7

Model B

Forecast the regime ahead

Model_B_Future_Regime_Forecaster · horizon = 5 days

72.3%

accuracy · n=1294

ClassPrecisionRecallF1Support
Stable0.7850.897
0.837
932
Moderate0.5030.285
0.364
340
Crisis0.0560.091
0.069
22

macro F1 0.423

weighted F1 0.700

Confusion matrix · rows = true, cols = predicted

Stable
Moderate
Crisis
Stable
836
91
5
Moderate
214
97
29
Crisis
15
5
2

Step 1 / Data pipeline

Non-trading days removed before features

Raw rows

5,016

Non-trading removed

1,206

24% of raw (repeated TASI price)

After completeness

3,790

from 3,810 trading rows

Feature columns

22

20 shared model inputs

Removals by weekday

  • Mon
    35
  • Tue
    34
  • Wed
    34
  • Thu
    260
  • Fri
    843

Concentrated on Thu/Fri, consistent with the Saudi weekend.

NaNs per required column

  • TASI_ret1
  • REALIZED_VOL_1010
  • REALIZED_VOL_2020
  • OIL_chg_5d5
  • OIL_chg_20d20
  • SPREAD_chg_5d5

Skipped feature

VOLUME_ZSCORE

source column 'DWCF Index (USD) - Volume' only 76% populated — skipped rather than silently dropping rows

Step 2b / Stable-regime diagnostic

Flat-price artefact check

Zero-return days

0 / 3790

0.0% of the cleaned series

Longest zero run

0

Days labelled Stable

2,395

Stable ∩ zero return

0

Stable regime is not a flat-price artefact

Step 3 / Shared feature set

MRSM output feeds both models

  • TASI
  • OIL
  • SPREAD
  • US_RATE
  • MA50
  • MA100
  • MA200
  • MA15
  • TASI_ret
  • REALIZED_VOL_10
  • REALIZED_VOL_20
  • OIL_chg_5d
  • OIL_chg_20d
  • SPREAD_chg_5d
  • TASI_vs_MA50
  • TASI_vs_MA200
  • RSI_14
  • P_Stable_f
  • P_Moderate_f
  • P_Crisis_f

Highlighted inputs are the filtered MRSM state probabilities shared by Model A and Model B.