Regime-aware financial volatility forecasting via in-context learning

This paper introduces a regime-aware in-context learning framework that leverages pretrained large language models to forecast financial volatility by dynamically adapting to nonstationary market conditions through oracle-guided, regime-specific demonstrations without requiring parameter fine-tuning.

Saba Asaad, Shayan Mohajer Hamidi, Ali Bereyhi

Published 2026-03-12
📖 4 min read☕ Coffee break read

Imagine you are trying to predict the weather for tomorrow.

If you live in a place where the weather is always mild and predictable, you can just look at the last few days and guess, "It'll probably be sunny." This is how traditional financial models work. They look at past stock prices and assume the future will look a lot like the past.

But financial markets are more like the weather in a place with sudden, violent storms. One day it's calm, and the next, a hurricane hits. Traditional models get confused during these storms because they are too rigid. They keep predicting "sunny" even when the sky is turning black.

This paper introduces a new way to predict market chaos using Large Language Models (LLMs)—the same kind of AI that writes essays and chats with you. But instead of teaching the AI new math (which is slow and expensive), the authors teach it how to learn on the fly by looking at examples, just like a human student.

Here is the breakdown of their "Regime-Aware" system using simple analogies:

1. The Problem: The "One-Size-Fits-All" Mistake

Imagine a chef who cooks the same recipe for everyone. If you ask for a spicy dish, they give you mild soup. If you ask for mild soup, they give you a fire-breathing chili.

  • Traditional Models: They are like this chef. They try to find one "average" pattern for the market. When the market is calm, they do okay. When the market goes crazy (high volatility), they fail miserably because they don't know how to switch recipes.

2. The Solution: The "Smart Librarian" Approach

The authors propose using an LLM as a Smart Librarian. Instead of memorizing a single recipe, the librarian has a massive library of past market days.

  • In-Context Learning: When you ask the librarian, "What will the market do tomorrow?", the librarian doesn't just guess. They look at their library, find similar days from the past, and say, "Well, on days like this (calm days), the market did X. But on days like that (stormy days), the market did Y."
  • The Catch: If you just ask the librarian to pick any random past day, they might pick a calm day to explain a stormy situation. That's bad.

3. The Secret Sauce: "Regime-Aware" Sorting

The paper's big innovation is Regime-Awareness.

Think of the market as having two distinct "moods" or Regimes:

  1. The "Calm" Regime: Like a sunny Tuesday. Prices move slowly.
  2. The "Storm" Regime: Like a hurricane. Prices swing wildly.

The authors built a system that acts like a Sorter:

  1. The Oracle (The Teacher): First, they use a "teacher" (who knows the future answers) to look at past data and label every single day as either "Calm" or "Storm."
  2. The Two Shelves: They organize the librarian's library into two separate shelves:
    • Shelf A: Only contains examples of "Stormy" days.
    • Shelf B: Only contains examples of "Calm" days.
  3. The Smart Guess: When you ask for a prediction for tomorrow:
    • The system first checks the current weather (the last few days of data). "Hey, it looks like a storm is brewing!"
    • It then tells the librarian: "Go to Shelf A (Stormy days) and find me 5 examples of what happened on days that looked like this."
    • The librarian reads those 5 examples and says, "Ah, I see the pattern. When the market gets this crazy, it usually swings this way."

4. Why This is Better

  • No Retraining: Traditional models need to be "re-taught" every time the market changes. This AI just changes its reading list. It's like a student who doesn't need to go back to school; they just need to open the right chapter of the textbook.
  • Adaptability: When the market is calm, the AI looks at calm examples. When the market panics, it instantly switches to looking at panic examples.
  • The Results: In their tests (using data from the S&P 500, NASDAQ, and currency markets), this "Smart Librarian" made significantly fewer mistakes than the old "One-Size-Fits-All" chefs, especially during the scary, high-volatility times.

The Bottom Line

This paper shows that we don't need to build a new, super-smart AI from scratch to predict the stock market. We can take an existing AI, give it a sorted library of past examples, and teach it to pick the right examples based on whether the market is currently calm or crazy.

It's the difference between guessing the weather by looking at an average of the whole year, versus checking the forecast for this specific season and this specific weather pattern.