Why is a moving average across a stock split simply wrong?
Because the column it averages contains two different units, and the mean of a mixture of units is not a quantity. This is the adjustment problem from the Price and Trading Data course — and from adjusted-prices in Markets Foundations — wearing a different hat. There it made a chart look strange. Here it produces a plausible, well-formatted, entirely fictional number.
The event
/splits/AAPL.US returns two entries for the 2014–2020 period, one of them:
date: 2020-08-31 split: 4.000000/1.000000
Four new shares for each old one, effective 2020-08-31. Now the raw close column across that boundary, straight from /eod:
2020-08-27 500.04
2020-08-28 499.23
2020-08-31 129.04
2020-09-01 134.18
2020-09-02 131.40
Three averages of the same week
On raw close:
(500.04 + 499.23 + 129.04 + 134.18 + 131.40) ÷ 5 = 1,393.89 ÷ 5 = 278.778
The stock closed at 131.40 that day. The "five-day average price" came out at 278.78 — 2.12 times the price. Nothing was miscalculated. Before 2020-08-31 a row means one old share; from that date it means one new share, and there are four of them per old one.
On split-adjusted prices — divide the two pre-split closes by 4, giving 125.0100 and 124.8075:
(125.0100 + 124.8075 + 129.04 + 134.18 + 131.40) ÷ 5 = 644.4375 ÷ 5 = 128.8875
On EODHD's adjusted_close, which removes dividends as well as splits — 121.2564, 121.06, 125.1654, 130.1511, 127.4545, as fetched on 2026-07-28:
÷ 5 = 125.0175
Three answers: 278.778, 128.8875, 125.0175. The first is broken; the unadjusted mean is 2.16 times the split-adjusted one, and it stays broken for one bar fewer than the window is long — forty-nine days, for a fifty-day average, because the fiftieth post-split bar is the first whose whole window sits after the split.
The other two are both correct, and they are not the same
Split-only adjustment answers "what would this bar look like at today's share count". Full adjustment answers "what did a holder who reinvested dividends actually experience". For 2020-08-28 those are 124.8075 and, on that same pull, 121.06 — a gap of 3.7475, or 3.00% of the split-only figure, being the dividends paid since. Only the first of those two numbers is fixed: the third average above is the one that will differ when you run this, and by the same factor on every row.
So an indicator computed on adjusted_close is a total-return indicator. It will not line up with a chart drawn on split-adjusted prices, and the divergence grows the further back you look and the more the instrument pays out. Neither series is wrong; they answer different questions, and mixing them within one study is what goes wrong.
What the endpoint gives you
/technical/{ticker} exposes splitadjusted_only, an integer 0 or 1 defaulting to 0, which for selected functions restricts adjustment to splits alone. There is also a splitadjusted function that simply returns split-adjusted OHLCV, so you can inspect the series an indicator is running over rather than infer it.
EODHD documents the technical endpoint as computing on split-adjusted OHLC. "Documented" and "true for the function you called with the parameters you sent" are different claims, and the answer turns out to be fully adjusted, dividends included — which is a stronger statement than the documentation makes.
Here is how you can tell, and it is worth doing yourself. On 2026-07-27 AAPL.US had close and adjusted_close both equal to 336.91, so on that day every possible column choice gave the same answer and the test revealed nothing. After the next ex-dividend the two columns separated, and re-running SMA(2) over the identical two days returned the mean of the adjusted pair, not the raw one. A split-only series would not have moved; a dividend moved it. That is the proof, and it only became available because time passed.
Try it now
- Pull
/eodforAAPL.USfrom 2020-08-26 to 2020-09-02 and reproduce all three averages above. Getting 278.778 with your own code is the moment the problem stops being theoretical.
- Here is
/technical/AAPL.US?function=splitadjustedover 26 August to 2 September 2020. Compare its closes with the rawclosecolumn above, row by row, and withadjusted_close. You are looking directly at the difference the parameter makes: find the rows where it changed nothing, and check that its 28 August value is the 124.8075 in the lesson.
- Here are nine raw closes across the same split, 25 August to 4 September 2020. Compute a 5-day SMA on them for every day it can be computed, and count how many consecutive values mix pre-split and post-split rows. Then say how many it would be for a 50-day SMA. It heals on its own, which is why nobody notices.