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

Counterfactual Analysis via Large Language Models

Author

Listed:
  • Zonghao Yang

Abstract

Counterfactual analysis aims to predict potential outcomes under hypothetical scenarios, offering valuable insights for decision-making. This paper investigates the application of large language models (LLMs), specifically the GPT-3.5 model, for counterfactual analysis. We focus on the online lending context, where the counterfactual return on investment (ROI) is crucial for evaluating different interest rate schemes. We begin by assessing the predictive performance of GPT and comparing it with advanced machine learning algorithms. The results show that prompt engineering can significantly enhance GPT's predictions, with the R-squared increasing from 1.97% to 2.84%, closely approaching the 3.48% achieved by gradient-boosted regression. Subsequently, we utilize GPT to generate counterfactual ROIs under a set of alternative interest rates. GPT exhibits logical coherence and causal reasoning in its responses. The findings underscore the potential of LLMs as effective tools for counterfactual analysis in online lending, suggesting broader applications for LLMs in various predictive and decision-making contexts.

Suggested Citation

  • Zonghao Yang, 2026. "Counterfactual Analysis via Large Language Models," Papers 2608.05367, arXiv.org.
  • Handle: RePEc:arx:papers:2608.05367
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. Murray Shanahan & Kyle McDonell & Laria Reynolds, 2023. "Role play with large language models," Nature, Nature, vol. 623(7987), pages 493-498, November.
    2. Maria Stepanova & Lyn Thomas, 2002. "Survival Analysis Methods for Personal Loan Data," Operations Research, INFORMS, vol. 50(2), pages 277-289, April.
    3. Johnson, Mark J. & Ben-David, Itzhak & Lee, Jason & Yao, Vincent, 2023. "FinTech Lending with LowTech Pricing," Working Paper Series 2023-08, Ohio State University, Charles A. Dice Center for Research in Financial Economics.
    4. Yock Y. Chong & David F. Hendry, 1986. "Econometric Evaluation of Linear Macro-Economic Models," The Review of Economic Studies, Review of Economic Studies Ltd, vol. 53(4), pages 671-690.
    5. Xia, Yufei & Zhao, Junhao & He, Lingyun & Li, Yinguo & Yang, Xiaoli, 2021. "Forecasting loss given default for peer-to-peer loans via heterogeneous stacking ensemble approach," International Journal of Forecasting, Elsevier, vol. 37(4), pages 1590-1613.
    6. Joshua D. Angrist & Victor Lavy, 1999. "Using Maimonides' Rule to Estimate the Effect of Class Size on Scholastic Achievement," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 114(2), pages 533-575.
    7. Jon Kleinberg & Himabindu Lakkaraju & Jure Leskovec & Jens Ludwig & Sendhil Mullainathan, 2018. "Human Decisions and Machine Predictions," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 133(1), pages 237-293.
    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. Li, Zhiyong & Li, Aimin & Bellotti, Anthony & Yao, Xiao, 2023. "The profitability of online loans: A competing risks analysis on default and prepayment," European Journal of Operational Research, Elsevier, vol. 306(2), pages 968-985.
    2. Léonard Boussioux & Jacqueline N. Lane & Miaomiao Zhang & Vladimir Jacimovic & Karim R. Lakhani, 2024. "The Crowdless Future? Generative AI and Creative Problem-Solving," Organization Science, INFORMS, vol. 35(5), pages 1589-1607, September.
    3. Juan Carlos Perdomo, 2023. "The Relative Value of Prediction in Algorithmic Decision Making," Papers 2312.08511, arXiv.org, revised May 2024.
    4. Li, Aimin & Li, Zhiyong & Bellotti, Anthony, 2023. "Predicting loss given default of unsecured consumer loans with time-varying survival scores," Pacific-Basin Finance Journal, Elsevier, vol. 78(C).
    5. Wo[ss]mann, Ludger & West, Martin, 2006. "Class-size effects in school systems around the world: Evidence from between-grade variation in TIMSS," European Economic Review, Elsevier, vol. 50(3), pages 695-736, April.
    6. Andersson, Christian, 2007. "Teacher density and student achievement in Swedish compulsory schools," Working Paper Series 2007:4, IFAU - Institute for Evaluation of Labour Market and Education Policy.
    7. Sophie-Charlotte Klose & Johannes Lederer, 2020. "A Pipeline for Variable Selection and False Discovery Rate Control With an Application in Labor Economics," Papers 2006.12296, arXiv.org, revised Jun 2020.
    8. Cerqua, Augusto & Giannantoni, Costanza & Letta, Marco & Pinto, Gabriele, 2026. "Femicides, anti-violence centers, and policy targeting," European Economic Review, Elsevier, vol. 183(C).
    9. D’Acunto, Francesco & Ghosh, Pulak & Rossi, Alberto G., 2026. "How costly are cultural biases? Evidence from FinTech," Journal of Financial Economics, Elsevier, vol. 175(C).
    10. Ma, Lingjie & Koenker, Roger, 2006. "Quantile regression methods for recursive structural equation models," Journal of Econometrics, Elsevier, vol. 134(2), pages 471-506, October.
    11. Barrow, Lisa & Rouse, Cecilia Elena, 2004. "Using market valuation to assess public school spending," Journal of Public Economics, Elsevier, vol. 88(9-10), pages 1747-1769, August.
    12. Corak, Miles & Lauzon, Darren, 2009. "Differences in the distribution of high school achievement: The role of class-size and time-in-term," Economics of Education Review, Elsevier, vol. 28(2), pages 189-198, April.
    13. Bentes, Sonia R. & Menezes, Rui, 2013. "On the predictability of realized volatility using feasible GLS," Journal of Asian Economics, Elsevier, vol. 28(C), pages 58-66.
    14. Peng, Qiao & McKillop, Donal & Quinn, Barry & Liu, Kailong, 2025. "Modeling and predicting failure in US credit unions," International Journal of Forecasting, Elsevier, vol. 41(3), pages 1237-1259.
    15. Martin Schlotter & Guido Schwerdt & Ludger Woessmann, 2011. "Econometric methods for causal evaluation of education policies and practices: a non-technical guide," Education Economics, Taylor & Francis Journals, vol. 19(2), pages 109-137.
    16. Keen Meng Choy & Hwee Kwan Chow, 2004. "Forecasting the Global Electronics Cycle with Leading Indicators: A VAR Approach," Econometric Society 2004 Australasian Meetings 223, Econometric Society.
    17. Alexandre, Michel & Antônio Silva Brito, Giovani & Cotrim Martins, Theo, 2017. "Default contagion among credit modalities: evidence from Brazilian data," MPRA Paper 76859, University Library of Munich, Germany.
    18. Angrist, Joshua & Lavy, Victor, 2002. "The Effect of High School Matriculation Awards: Evidence from Randomized Trials," CEPR Discussion Papers 3827, Centre for Economic Policy Research.
    19. Ericsson, Neil R., 2016. "Eliciting GDP forecasts from the FOMC’s minutes around the financial crisis," International Journal of Forecasting, Elsevier, vol. 32(2), pages 571-583.
    20. B. Jahanshahi, 2014. "Separating Gender Composition Effect from Peer Effects in Education," Working Papers wp932, Dipartimento Scienze Economiche, Universita' di Bologna.

    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:2608.05367. 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.