How it works
How adjustment works
Adjustment rewrites past prices so that a return computed across a corporate action matches what a holder actually earned. It works backwards from today: the most recent prices stay as traded, and every older price is multiplied by a factor.
Splits. For an N-for-1 split, every price before the ex-date is divided by N (factor 1/N), and every volume before it is multiplied by N. A 4-for-1 split turns a $500 close into $125.
Cash dividends. On the ex-dividend date the price drops by about the dividend, because new buyers no longer get it. The usual factor is:
factor = 1 - dividend / close on the day before the ex-date
Every price before the ex-date is multiplied by that factor. Factors from several events multiply together, which is why the adjusted close of a stock that has paid dividends for 30 years can be far below what it traded at back then.
Worked example (illustrative numbers)
A stock closes at $80.00 the day before its ex-date and pays a $0.80 dividend. The next day it closes at $79.60.
- Raw return: 79.60 / 80.00 - 1 = -0.50%.
- Factor: 1 - 0.80 / 80.00 = 0.99. Adjusted prior close: 80.00 × 0.99 = 79.20.
- Adjusted return: 79.60 / 79.20 - 1 = +0.51%.
The holder got $0.80 in cash and saw the price fall $0.40, so they were up about half a percent. Only the adjusted series shows that; the raw series shows a loss.
Pricing
Rebuild adjusted prices in Python
Our daily bars carry close (split adjusted), unadjusted_close (as traded), adjusted_close, dividend and split_factor, so you can check the vendor's work or rebuild it.
"""Example: build split and dividend adjusted closes from raw data."""
import pandas as pd
d = pd.read_csv("daily_bars.csv", parse_dates=["date"]).sort_values("date")
d = d.set_index("date")
d["split_factor"] = d["split_factor"].fillna(1.0) # e.g. 4.0 on a 4-for-1 ex-date
d["dividend"] = d["dividend"].fillna(0.0)
prev_close = d["unadjusted_close"].shift(1)
div_f = 1 - d["dividend"] / prev_close
split_f = 1 / d["split_factor"]
event_f = (div_f * split_f).fillna(1.0)
cum = event_f[::-1].cumprod()[::-1].shift(-1).fillna(1.0)
d["my_adj_close"] = d["unadjusted_close"] * cum
diff = (d["my_adj_close"] / d["adjusted_close"] - 1).abs().max()
print("max difference vs vendor:", f"{diff:.6%}")
The trick is the reverse cumulative product: each day's factor is the product of every event that happens after it. shift(-1) makes sure an event applies to prices before its ex-date, not on it. If the difference against the vendor's adjusted_close is more than a tiny fraction of a percent, one of you missed an event or used a different dividend method.
Watch out
Common mistakes
Using adjusted prices for order levels. An adjusted price from five years ago never traded. Use it for returns and signals; use raw prices for anything tied to real levels, like a past high or a limit price.
Storing adjusted data and appending to it. Every new dividend changes every earlier adjusted price. If you append new rows to an old adjusted file, the history and the new rows disagree. Re-download or re-adjust the full series after each event.
Adjusting for dividends when you want price return. Index price returns and many charting tools use split-only adjustment. Total return uses both. Pick one on purpose and label it.
Forgetting volume. Split-adjust volume too, or volume filters and VWAP on old data will be off by the split ratio.
Details
Get the data
Raw and adjusted prices side by side, plus the events behind them. What you'll get:
adjusted_close,unadjusted_close,dividendandsplit_factorin every daily bar, and a separate corporate actions feed with ex-dates, split ratios and adjustment factors.
- Stock splits and dividends data, available in early access. Suggested price: $49 one-off for the full US history file, included free with any bar dataset.
- Historical daily stock data with both price series.
- A free stock sample file is available on request.
FAQ
Frequently asked questions
What is adjusted close?
Adjusted close is the closing price rewritten to account for splits and dividends that happened later. It lets you compute returns across those events as if you had held the stock and reinvested. Recent prices match what traded; older ones are scaled down.
Why does adjusted close history change?
Every new split or dividend changes the factor applied to all earlier prices. So the adjusted close for a date ten years ago can be different today than it was last month. The raw close for that date never changes.
Should I backtest on adjusted or unadjusted prices?
Use adjusted prices for signals and returns, so splits and dividends don't create fake moves. Switch to unadjusted prices for anything tied to the real trading price, such as order sizing by price or round-number levels.
Are splits adjusted for volume too?
They should be. After a 4-for-1 split there are four times as many shares, so older volumes are multiplied by four to stay comparable.
Keep reading