Python for programmers, prompts for data analysts.
Every article in this series has trusted the numbers it pulled. That's mostly fine — but raw price data carries traps that look exactly
like real market events. A stock can appear to lose 95% of its value overnight when nothing happened to the company at all.
This 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
the same dataset tells the truth.
Want to try this yourself? The EODHD MCP Server is what pulled the data above — connect it to Claude and ask your own questions (affiliate link).
New here? The Setup covers everything you need before your first prompt.
🟧 PROMPT
Use the eodhd MCP to get AMZN's daily closing
prices from June 1 to June 8, 2022, and tell me
the biggest one-day change.
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.
Read 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
value between Friday and Monday. Except nothing like that happened. There was no collapse in the news that weekend, no panic, no
headline. Amazon was fine.
The same dataset has a second price column, and it tells a very different story:
Adjusted close, same two days: $122.35 on June 3, $124.79 on June 6. A gain of 2.0%.
Same stock, same two days, same data provider. One column says the stock lost 95%. The other says it gained 2%.
Use the eodhd MCP to check AMZN's split history.
Did anything happen on June 6, 2022?
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, 496 in total.
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 one Friday price by the other and you get exactly 20.0, the split ratio.
Nothing about Amazon's value changed that weekend. What changed was the unit of measurement: more, smaller slices of the same company.
The raw close is historically accurate about the price printed on each day, and completely misleading as a record of what an owner
actually gained or lost.
That'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 —
inherits a 95% crash that never happened. Adjusted close exists to prevent exactly that. It also folds in dividends for companies that
pay them, which is why every return calculation in this series has used it.
Adjusted close fixes one problem and quietly creates another: it rewrites history. Every time a company splits or pays a dividend, the
provider recalculates every earlier adjusted price. A number you saved from last year's adjusted series won't match the same date in
today's download, even though nothing about that day changed. Raw close never moves after the fact; adjusted close is only correct
relative to the moment you pulled it.
Neither 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
articles in this series used real, unadjusted strike and spot prices. Adjusted close is the truth about what an owner gained or lost
over time. The mistake isn't choosing one; it's using the wrong one for the question you're asking.
Even 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
rather 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
and stored by someone, and worth a sanity check before you build on it.
And this is one pitfall out of many. Missing trading days, companies that vanished from a dataset, prices recorded in the wrong currency
or 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
clean your trading data into the wrong answer" puts it well — the danger isn't dirty data, it's data that looks clean. Not investment
advice.
This is the thirty-third article in the series Unlock Real-Time Market Intelligence with EODHD and Claude, and the first one about the data itself rather
than what it says. Every earlier part trusted the numbers it pulled; this one checked whether they deserved it.
Two prompts found a crash, then found out it never happened.
So 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 exactly 20. Nothing was wrong with either column. What would have been wrong is feeding the raw one into a return, a chart, or a
If this made you curious, the MCP Server is free to try — The Setup walks you through it.
← Part 32: “The Market” Isn't One Thing: Watching Sectors Take Turns