IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2512.07867.html

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

Author

Listed:
  • Masoud Soleimani

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.

Suggested Citation

  • Masoud Soleimani, 2025. "LLM-Generated Counterfactual Stress Scenarios for Portfolio Risk Simulation via Hybrid Prompt-RAG Pipeline," Papers 2512.07867, arXiv.org, revised Oct 2026.
  • Handle: RePEc:arx:papers:2512.07867
    as

    Download full text from publisher

    File URL: https://arxiv.org/pdf/2512.07867
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Aikman, David & Angotti, Romain & Budnik, Katarzyna, 2024. "Stress testing with multiple scenarios: a tale on tails and reverse stress scenarios," Working Paper Series 2941, European Central Bank.
    2. Xiao-Yang Liu & Guoxuan Wang & Hongyang Yang & Daochen Zha, 2023. "FinGPT: Democratizing Internet-scale Data for Financial Large Language Models," Papers 2307.10485, arXiv.org, revised Nov 2023.
    3. Rodrigo Alfaro & Mathias Drehmann, 2009. "Macro stress tests and crises: what can we learn?," BIS Quarterly Review, Bank for International Settlements, December.
    4. Fama, Eugene F. & French, Kenneth R., 1993. "Common risk factors in the returns on stocks and bonds," Journal of Financial Economics, Elsevier, vol. 33(1), pages 3-56, February.
    5. Bollerslev, Tim, 1986. "Generalized autoregressive conditional heteroskedasticity," Journal of Econometrics, Elsevier, vol. 31(3), pages 307-327, April.
    6. Anastasios Petropoulos & Vassilis Siakoulis & Konstantinos P. Panousis & Loukas Papadoulas & Sotirios Chatzis, 2020. "A Deep Learning Approach for Dynamic Balance Sheet Stress Testing," Papers 2009.11075, arXiv.org, revised Sep 2022.
    7. Pesaran, Hashem & Timmermann, Allan, 2005. "Real-Time Econometrics," Econometric Theory, Cambridge University Press, vol. 21(1), pages 212-231, February.
    8. Solveig Flaig & Gero Junike, 2022. "Scenario Generation for Market Risk Models Using Generative Neural Networks," Risks, MDPI, vol. 10(11), pages 1-28, October.
    9. Matthias Thiemann & Carolina Raquel Melches & Edin Ibrocevic, 2021. "Measuring and mitigating systemic risks: how the forging of new alliances between central bank and academic economists legitimize the transnational macroprudential agenda," Review of International Political Economy, Taylor & Francis Journals, vol. 28(6), pages 1433-1458, October.
    10. Paul C. Tetlock, 2007. "Giving Content to Investor Sentiment: The Role of Media in the Stock Market," Journal of Finance, American Finance Association, vol. 62(3), pages 1139-1168, June.
    11. M. K. Nallakaruppan & Himakshi Chaturvedi & Veena Grover & Balamurugan Balusamy & Praveen Jaraut & Jitendra Bahadur & V. P. Meena & Ibrahim A. Hameed, 2024. "Credit Risk Assessment and Financial Decision Support Using Explainable Artificial Intelligence," Risks, MDPI, vol. 12(10), pages 1-18, October.
    12. Shijie Wu & Ozan Irsoy & Steven Lu & Vadim Dabravolski & Mark Dredze & Sebastian Gehrmann & Prabhanjan Kambadur & David Rosenberg & Gideon Mann, 2023. "BloombergGPT: A Large Language Model for Finance," Papers 2303.17564, arXiv.org, revised Dec 2023.
    13. Hamilton, James D & Gang, Lin, 1996. "Stock Market Volatility and the Business Cycle," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 11(5), pages 573-593, Sept.-Oct.
    14. Kutateladze, Varlam, 2022. "The kernel trick for nonlinear factor modeling," International Journal of Forecasting, Elsevier, vol. 38(1), pages 165-177.
    15. Paolo Guarda & Abdelaziz Rouabah & John Theal, 2011. "An MVAR Framework to Capture Extreme Events in Macroprudential Stress Tests," BCL working papers 63, Central Bank of Luxembourg.
    16. Borio, Claudio & Drehmann, Mathias & Tsatsaronis, Kostas, 2014. "Stress-testing macro stress testing: Does it live up to expectations?," Journal of Financial Stability, Elsevier, vol. 12(C), pages 3-15.
    17. Moffo, Ahmadou Mustapha Fonton, 2024. "A machine learning approach in stress testing US bank holding companies," International Review of Financial Analysis, Elsevier, vol. 95(PC).
    18. Natalie Packham, 2024. "Risk factor aggregation and stress testing," Quantitative Finance, Taylor & Francis Journals, vol. 24(9), pages 1327-1340, September.
    19. Connor, Gregory & Korajczyk, Robert A., 1986. "Performance measurement with the arbitrage pricing theory : A new framework for analysis," Journal of Financial Economics, Elsevier, vol. 15(3), pages 373-394, March.
    20. Engle, Robert F, 1982. "Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation," Econometrica, Econometric Society, vol. 50(4), pages 987-1007, July.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Keunbae Ahn, 2021. "Predictable Fluctuations in the Cross-Section and Time-Series of Asset Prices," PhD Thesis, Finance Discipline Group, UTS Business School, University of Technology, Sydney, number 1-2021, January-A.
    2. Wisniewski, Tomasz Piotr & Yekini, Liafisu Sina, 2014. "Predicting Stock Market Returns Based on the Content of Annual Report Narrative: A New Anomaly," MPRA Paper 58107, University Library of Munich, Germany.
    3. Jin Guo, 2015. "Causal relationship between stock returns and real economic growth in the pre- and post-crisis period: evidence from China," Applied Economics, Taylor & Francis Journals, vol. 47(1), pages 12-31, January.
    4. Hawley, Andrew & LeBaron, Blake & Paddrik, Mark & Palmer, Nathan, 2026. "Dynamic order dispersion and volatility persistence in a simple limit order book model," Journal of Economic Dynamics and Control, Elsevier, vol. 188(C).
    5. Seyoung Park & Eun Ryung Lee & Sungchul Lee & Geonwoo Kim, 2019. "Dantzig Type Optimization Method with Applications to Portfolio Selection," Sustainability, MDPI, vol. 11(11), pages 1-32, June.
    6. Andrea Bucci, 2020. "Realized Volatility Forecasting with Neural Networks," Journal of Financial Econometrics, Oxford University Press, vol. 18(3), pages 502-531.
    7. Kei Nakagawa & Yusuke Uchiyama, 2020. "GO-GJRSK Model with Application to Higher Order Risk-Based Portfolio," Mathematics, MDPI, vol. 8(11), pages 1-12, November.
    8. Konstantinos Drakos, 2009. "Cross-Country Stock Market Reactions to Major Terror Events: The Role of Risk Perception," Economics of Security Working Paper Series 16, DIW Berlin, German Institute for Economic Research.
    9. Campbell, John Y. & Giglio, Stefano & Polk, Christopher & Turley, Robert, 2018. "An intertemporal CAPM with stochastic volatility," Journal of Financial Economics, Elsevier, vol. 128(2), pages 207-233.
    10. Kuang‐Liang Chang & Chi‐Wei He, 2010. "Does The Magnitude Of The Effect Of Inflation Uncertainty On Output Growth Depend On The Level Of Inflation?," Manchester School, University of Manchester, vol. 78(2), pages 126-148, March.
    11. Ding, Yi & Engle, Robert & Li, Yingying & Zheng, Xinghua, 2025. "Multiplicative factor model for volatility," Journal of Econometrics, Elsevier, vol. 249(PB).
    12. Ioannis D Vrontos & Loukia Meligkotsidou & Spyridon D Vrontos, 2011. "Performance evaluation of mutual fund investments: The impact of non-normality and time-varying volatility," Journal of Asset Management, Palgrave Macmillan, vol. 12(4), pages 292-307, September.
    13. Junyu Chen & Tom Boot & Lingwei Kong & Weining Wang, 2026. "Transformer-based CoVaR: Systemic Risk in Textual Information," Bristol Economics Discussion Papers 26/840, School of Economics, University of Bristol, UK.
    14. Zhao, Zifeng & Zhang, Zhengjun & Chen, Rong, 2018. "Modeling maxima with autoregressive conditional Fréchet model," Journal of Econometrics, Elsevier, vol. 207(2), pages 325-351.
    15. Zhu (Drew) Zhang & Jie Yuan & Amulya Gupta, 2024. "Let the Laser Beam Connect the Dots: Forecasting and Narrating Stock Market Volatility," INFORMS Journal on Computing, INFORMS, vol. 36(6), pages 1400-1416, December.
    16. Dickerson, Alexander & Julliard, Christian & Mueller, Philippe, 2026. "The co-pricing factor zoo," Journal of Financial Economics, Elsevier, vol. 182(C).
    17. David Daewhan Cho, 2004. "Uncertainty in Second Moments: Implications for Portfolio Allocation," Econometric Society 2004 Far Eastern Meetings 433, Econometric Society.
    18. Abdulrahman Alswaidan & Jeffrey D. Varner, 2026. "Variance-Corrected Multi-Asset Equity Simulation with Hybrid Hidden Markov Marginals," Papers 2603.10202, arXiv.org, revised Sep 2026.
    19. Choi, Jaewon & Richardson, Matthew, 2016. "The volatility of a firm's assets and the leverage effect," Journal of Financial Economics, Elsevier, vol. 121(2), pages 254-277.
    20. Shogbuyi, Abiodun & Steeley, James M., 2017. "The effect of quantitative easing on the variance and covariance of the UK and US equity markets," International Review of Financial Analysis, Elsevier, vol. 52(C), pages 281-291.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2512.07867. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: https://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.