Why does every analysis start by throwing the prices away?
A price series is the thing you download and the thing you never analyse. The first move in every serious piece of market statistics is to convert it into returns, and the reason is not convention. Prices have properties that break the tools; returns mostly do not.
Three reasons
Prices are not comparable. A $5 move in a $50 share and a $5 move in a $500 share are different events, and a $5 move in the same share in 2006 and 2026 is a different event too. Divide by the starting price and the move becomes a percentage, which compares across shares, across time and across markets.
Prices trend; returns do not. A series that trends has a mean that depends on where you start counting, a standard deviation that grows with the window, and a correlation with anything else that trends — which is nearly everything. Measured on 2026-09-04, the correlation between SPY.US's adjusted close and a simple day counter over the ten years to 3 September 2026 was 0.95; between USDTRY.FOREX and the same counter, 0.95. The lira fell from 2.95 to 48.32 per dollar in that decade and the S&P 500 fund tripled, and a price-level statistic would call them near-perfect partners. Their daily changes correlated at −0.11: weakly, and the other way round. The stationarity lesson is this fact with its name.
Prices carry the corporate actions. A share that splits four for one drops 75% overnight in the raw close; a fund that pays a dividend drops by the dividend. Neither is a return to the holder. The price-data course's raw versus adjusted lesson showed the two series; this course computes on adjusted_close only, and the computing-returns lesson measures what using the wrong one costs.
Simple or log
Two definitions, one choice. The simple return is today's price over yesterday's minus one: what a holder actually earned. The log return is the natural logarithm of the same ratio. For daily moves the two are nearly identical — a 1% simple return is a 0.995% log return — and they diverge at large moves: a fall of 50% is a log return of −0.69, and a rise of 100% is +0.69, which is the log return's charm. It is symmetric, it adds across days instead of compounding, and the statistical tools that assume normality are slightly less wrong on it.
The rule this course uses: log returns for statistics, simple returns for anything a holder is told. Add log returns across a year and exponentiate to recover the simple return; never add simple returns.
In the data
/eod/SPY.US?from=2026-08-01&to=2026-09-03&fmt=json returns one row per trading day with close and adjusted_close. Returns are the ratio of consecutive adjusted_close values; nothing in the response is a return, because the return depends on the row before it. The quant-coding domain's prices-to-returns lesson is the code; this lesson is why the code exists.
Try it now
- Here is
/eod/SPY.US?from=2026-08-29&to=2026-09-03&fmt=json, four sessions. Compute the simple and the log return for each of the three pairs of consecutive days by hand. Write the largest gap between the two definitions you find; on ordinary days it is a few thousandths of a percentage point.
- Decide: which of the three reasons above would still apply if every share in the world cost exactly $100 today?