History Rhymes: Macro-Contextual Retrieval for Robust Financial Forecasting

๐Ÿ“… 2025-11-12
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
Financial markets exhibit non-stationarity and structural breaks, causing severe performance degradation of predictive models under out-of-distribution (OOD) conditions. To address this, we propose a macroeconomic context retrieval framework that jointly embeds macroeconomic indicators (CPI, unemployment rate, interest rate spreads, GDP) and news sentiment into a unified similarity spaceโ€”enabling zero-shot, causally grounded case retrieval and interpretable evidence-chain construction. By retrieving historically analogous macroeconomic regimes, our method enhances forecasting robustness against train-deploy distribution shifts. In 2024 out-of-sample tests on AAPL and XOM, the resulting trading strategy demonstrates strong robustness (AAPL: Profit Factor = 1.18, Sharpe Ratio = 0.95; XOM: Profit Factor = 1.16, Sharpe Ratio = 0.61), consistently outperforming static and state-of-the-art multimodal baselines. Our key contributions are: (i) a novel multi-source macro-text joint embedding mechanism; and (ii) an OOD-robust, interpretable retrieval-augmented forecasting paradigm.

Technology Category

Application Category

๐Ÿ“ Abstract
Financial markets are inherently non-stationary: structural breaks and macroeconomic regime shifts often cause forecasting models to fail when deployed out of distribution (OOD). Conventional multimodal approaches that simply fuse numerical indicators and textual sentiment rarely adapt to such shifts. We introduce macro-contextual retrieval, a retrieval-augmented forecasting framework that grounds each prediction in historically analogous macroeconomic regimes. The method jointly embeds macro indicators (e.g., CPI, unemployment, yield spread, GDP growth) and financial news sentiment in a shared similarity space, enabling causal retrieval of precedent periods during inference without retraining. Trained on seventeen years of S&P 500 data (2007-2023) and evaluated OOD on AAPL (2024) and XOM (2024), the framework consistently narrows the CV to OOD performance gap. Macro-conditioned retrieval achieves the only positive out-of-sample trading outcomes (AAPL: PF=1.18, Sharpe=0.95; XOM: PF=1.16, Sharpe=0.61), while static numeric, text-only, and naive multimodal baselines collapse under regime shifts. Beyond metric gains, retrieved neighbors form interpretable evidence chains that correspond to recognizable macro contexts, such as inflationary or yield-curve inversion phases, supporting causal interpretability and transparency. By operationalizing the principle that"financial history may not repeat, but it often rhymes,"this work demonstrates that macro-aware retrieval yields robust, explainable forecasts under distributional change. All datasets, models, and source code are publicly available.
Problem

Research questions and friction points this paper is trying to address.

Forecasting financial markets under non-stationary macroeconomic regime shifts
Addressing model failure when deployed out-of-distribution due to structural breaks
Improving robustness against distributional changes in financial time series
Innovation

Methods, ideas, or system contributions that make the work stand out.

Retrieves historically analogous macroeconomic regimes for predictions
Embeds macro indicators and news sentiment in shared space
Enables causal retrieval without retraining during inference
๐Ÿ”Ž Similar Papers
No similar papers found.
S
Sarthak Khanna
University of Bonn - Department of Computer Science, Germany
Armin Berger
Armin Berger
Data Scientist, Fraunhofer IAIS & PhD Fellow in Machine Learning, University of Bonn
Machine LearningNatural Language Processing
M
M. Chopra
University of Bonn - Department of Computer Science, Germany
R
R. Sifa
Fraunhofer IAIS - Department of Media Engineering, Germany