{"id":41463,"date":"2025-07-17T15:28:29","date_gmt":"2025-07-17T13:28:29","guid":{"rendered":"https:\/\/quantpedia.com\/?p=41463"},"modified":"2025-07-18T19:56:04","modified_gmt":"2025-07-18T17:56:04","slug":"the-memorization-problem-can-we-trust-llms-forecasts","status":"publish","type":"post","link":"https:\/\/vvv.quantpedia.com\/es\/the-memorization-problem-can-we-trust-llms-forecasts\/","title":{"rendered":"The Memorization Problem: Can We Trust LLMs&#8217; Forecasts?"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><strong>Everyone is excited about the potential of large language models (LLMs) to assist with forecasting, research, and countless day-to-day tasks. However, as their use expands into sensitive areas like financial prediction, serious concerns are emerging\u2014particularly around memory leaks. In the recent paper <em>\u201cThe Memorization Problem: Can We Trust LLMs\u2019 Economic Forecasts?\u201d<\/em>, the authors highlight a key issue: when LLMs are tested on historical data within their training window, their high accuracy may not reflect real forecasting ability, but rather memorization of past outcomes. This undermines the reliability of backtests and creates a false sense of predictive power.<\/strong><\/p>\n\n\n\n<div class=\"post-meta\">\n<p>We have previously explored the <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/can-we-finally-use-chatgpt-as-a-quantitative-analyst\/\" data-wplink-edit=\"true\">use of LLMs in financial analysis<\/a>, and this new research deepens the understanding of their limitations. Building robust macroeconomic or equity\u2010return <strong>forecasts<\/strong> with <strong>large language models (LLMs)<\/strong> faces a core methodological challenge: the memorization problem. Because LLMs are typically pretrained on vast troves of historical textual and numerical data\u2014including macro variables, stock\u2010price time series, and financial\u2010index history\u2014they inherently encode information from \u201cfuture\u201d data relative to any forecast date. When these models are fine-tuned or prompted to generate out-of-sample predictions, they often leak memorized future observations back into their forecasts, thereby undermining genuine predictive power and contaminating performance metrics.<\/p>\n<p>Even explicit instructions to avoid using future data cannot fully eliminate this leakage, as underlying parameter matrices retain synaptic weights keyed to post-cutoff events, and attention layers may still attend to patterns that implicitly reference unseen outcomes. The result is an inflated backtested accuracy that fails to hold in real\u2010time forecasting, a phenomenon akin to data snooping but amplified by the scale and opacity of generative pretraining.<\/p>\n<p>What to do about that? The only practically feasible remedy proposed is to impose a hard cutoff on the LLM\u2019s training horizon\u2014e.g., ending all pretraining by 2023\u2014and then deploy the model for rolling forecasts thereafter. By freezing the model\u2019s knowledge base, one removes access to post\u2010cutoff data and mitigates memory leaks, allowing performance assessments that better approximate genuine adaptive learning rather than illicit hindsight.<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Authors:<\/strong> <a title=\"View other papers by this author\" href=\"https:\/\/papers.ssrn.com\/sol3\/cf_dev\/AbsByAuth.cfm?per_id=2675263\" target=\"_blank\" rel=\"noopener\">Alejandro Lopez-Lira<\/a>, <a title=\"View other papers by this author\" href=\"https:\/\/papers.ssrn.com\/sol3\/cf_dev\/AbsByAuth.cfm?per_id=1088791\" target=\"_blank\" rel=\"noopener\">Yuehua Tang<\/a>, <a title=\"View other papers by this author\" href=\"https:\/\/papers.ssrn.com\/sol3\/cf_dev\/AbsByAuth.cfm?per_id=7562820\" target=\"_blank\" rel=\"noopener\">Mingyin Zhu<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Title: <\/strong>The Memorization Problem: Can We Trust LLMs&#8217; Economic Forecasts?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Link<\/strong>:&nbsp;<a title=\"https:\/\/papers.ssrn.com\/sol3\/papers.cfm?abstract_id=5217505\" href=\"https:\/\/papers.ssrn.com\/sol3\/papers.cfm?abstract_id=5217505\" target=\"_blank\" rel=\"noopener\">https:\/\/papers.ssrn.com\/sol3\/papers.cfm?abstract_id=5217505<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Abstract:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Large language models (LLMs) cannot be trusted for economic forecasts during periods covered by their training data. We provide the first systematic evaluation of LLMs&#8217; memorization of economic and financial data, including major economic indicators, news headlines, stock returns, and conference calls. Our findings show that LLMs can perfectly recall the exact numerical values of key economic variables from before their knowledge cutoff dates. This recall appears to be randomly distributed across different dates and data types. This selective perfect memory creates a fundamental issue&#8212;when testing forecasting capabilities before their knowledge cutoff dates, we cannot distinguish whether LLMs are forecasting or simply accessing memorized data. Explicit instructions to respect historical data boundaries fail to prevent LLMs from achieving recall-level accuracy in forecasting tasks. Further, LLMs seem exceptional at reconstructing masked entities from minimal contextual clues, suggesting that masking provides inadequate protection against motivated reasoning. Our findings raise concerns about using LLMs to forecast historical data or backtest trading strategies, as their apparent predictive success may merely reflect memorization rather than genuine economic insight. Any application where future knowledge would change LLMs&#8217; outputs can be affected by memorization. In contrast, consistent with the absence of data contamination, LLMs cannot recall data after their knowledge cutoff date. Finally, to address the memorization issue, we propose converting identifiable text into anonymized economic logic\u2014an approach that shows strong potential for reducing memorization while maintaining the LLM\u2019s forecasting performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As such, we present several interesting figures and tables:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"810\" height=\"1024\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0003-scaled-e1752170233929-810x1024.jpg\" alt=\"\" class=\"wp-image-41468\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0003-scaled-e1752170233929-810x1024.jpg 810w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0003-scaled-e1752170233929-237x300.jpg 237w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0003-scaled-e1752170233929-1215x1536.jpg 1215w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0003-scaled-e1752170233929-768x971.jpg 768w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0003-scaled-e1752170233929.jpg 1580w\" sizes=\"(max-width: 810px) 100vw, 810px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img decoding=\"async\" width=\"868\" height=\"1024\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0019-scaled-e1752170264453-868x1024.jpg\" alt=\"\" class=\"wp-image-41469\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0019-scaled-e1752170264453-868x1024.jpg 868w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0019-scaled-e1752170264453-254x300.jpg 254w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0019-scaled-e1752170264453-1303x1536.jpg 1303w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0019-scaled-e1752170264453-768x906.jpg 768w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0019-scaled-e1752170264453.jpg 1596w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img decoding=\"async\" width=\"867\" height=\"1024\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0025-scaled-e1752170291634-867x1024.jpg\" alt=\"\" class=\"wp-image-41470\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0025-scaled-e1752170291634-867x1024.jpg 867w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0025-scaled-e1752170291634-254x300.jpg 254w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0025-scaled-e1752170291634-1300x1536.jpg 1300w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0025-scaled-e1752170291634-768x908.jpg 768w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2025\/07\/ssrn-5217505_page-0025-scaled-e1752170291634.jpg 1574w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Notable quotations from the academic research paper:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u201cUsing a novel testing framework, we show that LLMs can perfectly recall exact numerical values of economic data from their training. However, this recall varies seemingly randomly across different data types and dates. For example, before its knowledge cutoff date of October 2023, GPT-4o can recall specific S&amp;P 500 index values with perfect precision on certain dates, unemployment rates accurate to a tenth of a percentage point, and precise quarterly GDP figures. Figure 1 shows the LLM\u2019s memorized values of the stock market indices compared to the actual values and the associated errors. LLMs can reconstruct closely the overall ups and downs of the stock market indices, with some substantial occasional errors appearing, seemingly at random.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The problem can manifest when LLMs are asked to analyze historical data they have been exposed to during training and instructed not to use their knowledge. For example, when prompted to forecast GDP growth for Q4 2008 using only data up to Q3 2008, the model can activate two parallel cognitive pathways: one that generates plausible economic analysis about factors like consumer spending and industrial production and another that subtly accesses its memorized knowledge of the actual GDP contraction during the financial crisis. The resulting forecast appears analytically sound yet achieves suspiciously high accuracy because it\u2019s anchored to memorized outcomes rather than derived from the provided information. This mechanism operates beneath the model\u2019s visible outputs, making it virtually impossible to detect through standard evaluation methods. The fundamental problem is analogous to asking an economist in 2025 to \u201cpredict\u201d whether subprime mortgage defaults would trigger a global financial crisis in 2008 while instructing them to \u201cforget\u201d what happened. Such instructions are impossible to follow when the outcome is known.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The results reveal an evident ability to recall macroeconomic data. For rates, the model demonstrates near-perfect recall, with Mean Absolute Errors ranging from 0.03% (Unemployment Rate) to 0.15% (GDP Growth) and Directional Accuracy exceeding 96% across all indicators, reaching 98% for 10-year Treasury Yield and 99% for Unemployment Rate. This result suggests that GPT-4o has memorized these percentage-based indicators with high fidelity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We observed a similar pattern when we extended our test to ask the model to provide both the headline date and the corresponding S&amp;P 500 level on the next trading day. For the pre-training period, the model achieved high temporal accuracy while maintaining nearperfect recall of index values (mean absolute percent error of just 0.01%). For post-training headlines, both date identification and index level predictions became significantly less accurate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These results connect to our earlier findings on macroeconomic indicators, where high pre-cutoff accuracy reflected memorization. The strong post-cutoff performance without user prompt reinforcement mirrors the suspiciously high accuracy seen in other tests when constraints were not strictly enforced, suggesting that GPT-4o defaults to using its full knowledge unless explicitly and repeatedly directed otherwise. The high refusal rate with dual prompts aligns with weaker recall for less prominent data, as seen in small-cap stocks, indicating partial compliance but not complete isolation from memorized information. This failure to fully respect cutoff instructions reinforces the challenge of using LLMs for historical forecasting, as their outputs may subtly incorporate memorized data, necessitating postcutoff evaluations to ensure genuine predictive ability.\u201d<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-854363cc-8450-4dc0-a06a-c737766e9431\"><strong>Are you looking for more strategies to read about? <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/sign-up-for-our-newsletter\/\">Sign up for our newsletter<\/a> or visit our <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/blog\/\">Blog<\/a> or <a href=\"http:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/Screener\">Screener<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-65925002-6290-4d3b-b5cd-f3a277851ec8\"><strong>Do you want to learn more about Quantpedia Premium service? Check <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/\">how Quantpedia works<\/a>, <a href=\"http:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/Home\/About\">our mission<\/a> and <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing\/\">Premium pricing offer<\/a>.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-34bf63ae-5a22-40a3-aeb4-769374e833d8\"><strong>Do you want to learn more about Quantpedia Pro service? Check its <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/quantpedia-pro\/\">description<\/a>, watch <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/quantpedia-explains\/\">videos<\/a>, review <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/quantpedia-pro-reports\/\">reporting capabilities<\/a> and visit our <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing-pro\/\">pricing offer<\/a>.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-21942b3a-14d9-4c0f-b8ef-04d64675e253\"><strong>Are you looking for historical data or backtesting platforms? Check our list of&nbsp;<a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/links-tools\/?category=algo-trading-discounts\">Algo Trading Discounts<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Would you like free access to <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing\/\" title=\"\">our services<\/a>? Then, <a href=\"https:\/\/lightspeed.com\/lp\/quantpedia-lightspeed-financial-services-group-one-free-year-promotion\" title=\"\">open an account with Lightspeed<\/a> and enjoy one year of Quantpedia Premium at no cost.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-4c45d6c9-c8dd-4283-8743-bf573cfa4d45\"><strong>Or follow us on:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-476e95ed-31a5-4c4d-b701-5203f9fb2e24\"><strong>Facebook <a href=\"https:\/\/www.facebook.com\/groups\/quantstrategies\">Group<\/a>, Facebook <a href=\"https:\/\/www.facebook.com\/quantpedia\/\">Page<\/a>, <a href=\"https:\/\/twitter.com\/quantpedia\">Twitter<\/a>, <a href=\"https:\/\/www.linkedin.com\/company\/quantpedia\">Linkedin<\/a>, <a href=\"https:\/\/quantpedia.medium.com\/\">Medium<\/a> or <a href=\"https:\/\/www.youtube.com\/channel\/UC_YubnldxzNjLkIkEoL-FXg\">Youtube<\/a><\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p><strong>Everyone is excited about the potential of <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/can-we-finally-use-chatgpt-as-a-quantitative-analyst\/\"><strong>large language models (LLMs)<\/strong><\/a> to assist with forecasting, research, and countless day-to-day tasks. However, as their use expands into sensitive areas like financial prediction, serious concerns are emerging\u2014particularly around memory leaks. In the recent paper \u201cThe Memorization Problem: Can We Trust LLMs\u2019 Economic Forecasts?\u201d, the authors highlight a key issue: when LLMs are tested on historical data within their training window, their high accuracy may not reflect real forecasting ability, but rather memorization of past outcomes. This undermines the reliability of backtests and creates a false sense of predictive power.<\/strong><\/p>","protected":false},"author":25210,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[229,227,251,249,148,250,252],"class_list":["post-41463","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-ai","tag-chatgpt","tag-forecasting","tag-llm","tag-machine-learning","tag-memorization-problem","tag-prediction"],"_links":{"self":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/posts\/41463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/users\/25210"}],"replies":[{"embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/comments?post=41463"}],"version-history":[{"count":0,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/posts\/41463\/revisions"}],"wp:attachment":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/media?parent=41463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/categories?post=41463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/tags?post=41463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}