q-fin.RMNov 26, 2025

LLM-Generated Counterfactual Stress Scenarios for Portfolio Risk Simulation via Hybrid Prompt-RAG Pipeline

Authors: Masoud Soleimani

Organizations: Department of Information Engineering, University of Pisa, Pisa, Italy

Abstract

We develop a transparent, auditable large language model (LLM) pipeline for macro-financial stress testing. Structured prompting, with optional retrieval of country fundamentals and news, emits G7 macroeconomic scenarios (GDP growth, inflation, policy rate), which are converted into deviations from an IMF World Economic Outlook baseline and translated into portfolio losses through a three-channel PCA factor model. The macro-to-factor mapping is stipulated rather than estimated, so every tail-risk multiple is conditional on stated assumptions. Across 2,420 accepted scenarios from two model families and three runs, plus an unanchored-severity run and eight risk-layer ablations, we find three things. First, severity is inherited from scenario design, not generated by the model: prompt variant dominates every variance decomposition, removing the prompted severity bands makes GPT-5.6-luna's recession 1.6 pp milder, apparent country heterogeneity largely reflects the institutional baseline, and retrieval and news matter only where the prompt leaves magnitude free. Second, numerical severity and narrative severity are only weakly coupled. Third, GPT-5.6-luna follows its own arithmetic but anchors on prompted bands, whereas Llama-3.1-8B is four to seven times more dispersed and contradicts its own stated changes in 90% of cases. A repeat run differs at the scenario level yet agrees on aggregate multiples to within 0.007 times. LLM scenario generators are best used for narrative and sector elicitation around a prescribed severity path, not as autonomous calibrators of stress magnitude.

Figures & tables

Explore similar work

CardsList
  1. PortBench: A Correlation-Aware, Full-Pipeline Benchmark for LLM-Driven Portfolio Management

    May 27, 2026Yuxuan Zhao, Sijia Chen, Ningxin SuLLM EvaluationQuantitative Finance

  2. CN-Buzz2Portfolio: A Chinese-Market Dataset and Benchmark for LLM-Based Macro and Sector Asset Allocation from Daily Trending Financial News

    Mar 18, 2026Liyuan Chen, Shilong Li, Jiangpeng Yan +3Financial Decision-MakingLLM Agent Evaluation

  3. Are the Financial Reasoning from LLMs Credible? A Real World Test over Long-Horizon Statements

    Jul 22, 2026Xinke Tong, Xuanming Zhang, Tianyi Tang +10Numerical Reasoning in Language ModelsLLM Evaluation