Regime-aware financial volatility forecasting via in-context learning
Authors: Saba Asaad, Shayan Mohajer Hamidi, Ali Bereyhi
Organizations: Department of Electrical and Computer Engineering, University of Toronto, Toronto, Canada · Department of Electrical Engineering, Stanford University, Stanford, CA, USA
This work introduces a regime-aware in-context learning framework that leverages large language models (LLMs) for financial volatility forecasting under nonstationary market conditions. The proposed approach deploys pretrained LLMs to reason over historical volatility patterns and adjust their predictions without parameter fine-tuning. We develop an oracle-guided refinement procedure that constructs regime-aware demonstrations from training data. An LLM is then deployed as an in-context learner that predicts the next-step volatility from the input sequence using demonstrations sampled conditional to the estimated market label. This conditional sampling strategy enables the LLM to adapt its predictions to regime-dependent volatility dynamics through contextual reasoning alone. Experiments with multiple financial datasets show that the proposed regime-aware in-context learning framework outperforms both classical volatility forecasting approaches and direct one-shot learning, especially during high-volatility periods.
Figures & tables
Figure 1: Illustration of the proposed prompt-based volatility forecasting framework. (1) A fixed pretrained LLM is first prompted with recent log returns and realized variance to produce an initial estimate. (2) Oracle feedback is build from the ground truth and used iteratively to refine predictions. (3) A regime-labeled demonstration pool is constructed from refined predictions. (4) Demonstrations are selected conditional to estimated volatility regime and provided as in-context examples to generate a forecast of the next-day realized variance.
Dataset
Method
MAE(↓)
RMSE(↓)
MAElow(↓)
MAEhigh(↓)
×104
S&P500
Rolling mean
1.41
4.87
0.73
4.13
HAR
1.17
5.36
0.25
4.85
GARCH(1,1)
1.34
4.80
0.71
3.86
GJR-GARCH
1.33
4.64
0.72
3.76
One-shot learning
1.72
6.68
0.87
5.09
Random selection
1.22
4.77
0.65
3.12
Table 1: Volatility forecasting performance across multiple assets in terms of RMSE and MAE. The results are normalized to 10−4 . Low- and high-volatility regimes are defined using the 80th percentile of realized variance. Regime-aware in-context learning enhances the performance, due to better estimate in high regime.
Department of Mechanical Engineering and Aeronautics, University of Patras, Rion-Patras, Greece · FICC Market Risk, BNP Paribas CIB, London, United Kingdom