{"slug": "the-crash-that-never-happened-cleaning-price-data-before-you-trust-it", "title": "The Crash That Never Happened: Cleaning Price Data Before You Trust It", "summary": "A developer demonstrated that raw closing-price data can fabricate a 94.9% one-day crash in Amazon (AMZN) shares between June 3 and June 6, 2022, when the actual event was a 20-for-1 stock split. Using the EODHD MCP server with Claude, the same dataset's adjusted-close column showed a 2.0% gain for the identical window, since it retroactively divides pre-split prices by the split ratio ($2,447 / 20 = $122.35). The writeup warns that returns, charts, moving averages and backtests computed on raw closes across a split inherit a crash that never happened, while adjusted close rewrites history each time a split or dividend occurs.", "body_md": "*Python for programmers, prompts for data analysts.*\n\nEvery article in this series has trusted the numbers it pulled. That's mostly fine — but raw price data carries traps that look exactly \n\nlike real market events. A stock can appear to lose 95% of its value overnight when nothing happened to the company at all.\n\nThis one is about checking the data before believing the story it tells. Let's find a crash that never happened, and see which column of \n\nthe same dataset tells the truth.\n\n*Want to try this yourself? The [EODHD MCP Server](<https://eodhd.com/financial-apis/mcp-server-for-financial-data-by-eodhd?via=jsmrd&\\<br\\>%0Autm_source=medium&utm_medium=post&utm_campaign=the-crash-that-never-happened-cleaning-price-data-before-you-trust-it&\\<br\\>%0Autm_content=Jaroslav>) is what pulled the data above — connect it to Claude and ask your own questions (affiliate link).*\n\n*New here? [The Setup](https://medium.com/codetodeploy/the-setup-everything-you-need-before-your-first-prompt-1faeeff94263) covers \neverything you need before your first prompt.*\n\n🟧 **PROMPT**\n\n```\nUse the eodhd MCP to get AMZN's daily closing\nprices from June 1 to June 8, 2022, and tell me\nthe biggest one-day change.\n```\n\n*The biggest one-day move in that window: Friday, June 3, 2022, AMZN closed at $2,447.00. The next trading day, Monday, June 6, it  closed at $124.79. That's a drop of 94.9% in a single session.*\n\nRead that at face value and it's one of the worst days any major stock has ever had: a trillion-dollar company losing nearly all its \n\nvalue between Friday and Monday. Except nothing like that happened. There was no collapse in the news that weekend, no panic, no \n\nheadline. Amazon was fine.\n\nThe same dataset has a second price column, and it tells a very different story:\n\n*Adjusted close, same two days: $122.35 on June 3, $124.79 on June 6. A gain of 2.0%.*\n\nSame stock, same two days, same data provider. One column says the stock lost 95%. The other says it gained 2%.\n\n```\nUse the eodhd MCP to check AMZN's split history.\nDid anything happen on June 6, 2022?\n```\n\n*Yes. On June 6, 2022, Amazon executed a 20-for-1 stock split. Every existing share became twenty shares, each worth one-twentieth of  the old price. A shareholder with one share worth $2,447 on Friday owned twenty shares worth about $124.79 each on Monday, roughly $2,\n496 in total.*\n\n*The raw \"close\" column records the price per share exactly as it traded that day, so it shows the drop from $2,447 to $124.79. The  \"adjusted close\" column rewrites all earlier prices as if the split had always been in effect: $2,447 divided by 20 is $122.35. Divide \none Friday price by the other and you get exactly 20.0, the split ratio.*\n\nNothing about Amazon's value changed that weekend. What changed was the unit of measurement: more, smaller slices of the same company. \n\nThe raw close is historically accurate about the price printed on each day, and completely misleading as a record of what an owner \n\nactually gained or lost.\n\nThat's the trap. Any calculation that runs across a split on raw closes — a return, a chart, a moving average, a backtest like Part 25 — \n\ninherits a 95% crash that never happened. Adjusted close exists to prevent exactly that. It also folds in dividends for companies that \n\npay them, which is why every return calculation in this series has used it.\n\nAdjusted close fixes one problem and quietly creates another: it rewrites history. Every time a company splits or pays a dividend, the \n\nprovider recalculates every earlier adjusted price. A number you saved from last year's adjusted series won't match the same date in \n\ntoday's download, even though nothing about that day changed. Raw close never moves after the fact; adjusted close is only correct \n\nrelative to the moment you pulled it.\n\nNeither column is simply \"right.\" Raw close is the truth about what a share actually traded for on a given day, which is why the options \n\narticles in this series used real, unadjusted strike and spot prices. Adjusted close is the truth about what an owner gained or lost \n\nover time. The mistake isn't choosing one; it's using the wrong one for the question you're asking.\n\nEven the corporate-action records deserve a glance. EODHD lists Amazon's January 1999 split as 959,692 for 319,897, a ratio of 3.000003 \n\nrather than a clean 3-for-1. The difference is tiny, but it's a reminder that the data behind the adjustments is itself data, entered \n\nand stored by someone, and worth a sanity check before you build on it.\n\nAnd this is one pitfall out of many. Missing trading days, companies that vanished from a dataset, prices recorded in the wrong currency \n\nor time zone: each can produce a result that looks precise and is simply wrong. The title of Alexander Hübbert's article \"Six ways to \n\nclean your trading data into the wrong answer\" puts it well — the danger isn't dirty data, it's data that looks clean. Not investment \n\nadvice.\n\nThis is the thirty-third article in the series *[Unlock Real-Time Market Intelligence with EODHD and Claude](<https://medium.com/\\<br\\>%0Acodetodeploy/unlock-real-time-market-intelligence-with-eodhd-and-claude-6f431c82c525>)*, and the first one about the data itself rather \n\nthan what it says. Every earlier part trusted the numbers it pulled; this one checked whether they deserved it.\n\nTwo prompts found a crash, then found out it never happened.\n\nSo here's what they showed: **on June 6, 2022, Amazon's raw closing price fell 94.9% overnight, while its adjusted close rose 2.0% — the  same stock, the same day, the same dataset. The difference was a 20-for-1 split, and dividing one Friday price by the other gives \nexactly 20.** Nothing was wrong with either column. What would have been wrong is feeding the raw one into a return, a chart, or a \n\n*If this made you curious, the [MCP Server](<https://eodhd.com/financial-apis/mcp-server-for-financial-data-by-eodhd?via=jsmrd&\\<br\\>%0Autm_source=medium&utm_medium=post&utm_campaign=the-crash-that-never-happened-cleaning-price-data-before-you-trust-it&\\<br\\>%0Autm_content=Jaroslav>) is free to try — [The Setup](<https://medium.com/codetodeploy/\\<br\\>%0Athe-setup-everything-you-need-before-your-first-prompt-1faeeff94263>) walks you through it.*\n\n*← Part 32: [“The Market” Isn't One Thing: Watching Sectors Take Turns](<https://medium.com/@jaroslav-smarda/\\<br\\>%0Athe-market-isnt-one-thing-watching-sectors-take-turns-0b2b0784e0e0>)*", "url": "https://wpnews.pro/news/the-crash-that-never-happened-cleaning-price-data-before-you-trust-it", "canonical_source": "https://dev.to/jaroslav_marda_9f25d4d9c/the-crash-that-never-happened-cleaning-price-data-before-you-trust-it-54ik", "published_at": "2026-09-30 10:11:34+00:00", "updated_at": "2026-09-30 10:17:29.766701+00:00", "lang": "en", "topics": ["ai-tools", "agent-protocols", "ai-agents"], "entities": ["Amazon", "EODHD", "Claude", "AMZN", "EODHD MCP Server"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/the-crash-that-never-happened-cleaning-price-data-before-you-trust-it", "markdown": "https://wpnews.pro/news/the-crash-that-never-happened-cleaning-price-data-before-you-trust-it.md", "text": "https://wpnews.pro/news/the-crash-that-never-happened-cleaning-price-data-before-you-trust-it.txt", "jsonld": "https://wpnews.pro/news/the-crash-that-never-happened-cleaning-price-data-before-you-trust-it.jsonld"}}