Get started
Learn

Adjusted stock prices,
and why your backtest needs them.

A split or dividend changes a stock's price without changing what a holder owns. Adjusted prices rescale history so returns stay continuous across those events. Here is how the factors are built, with real numbers, and when to use each kind of price.

Why raw prices break at corporate actions

NVIDIA split 10-for-1 effective June 10, 2024. Its raw daily close was 1,208.88 on June 7 and 121.79 on June 10. A naive return calculation sees a 90 percent loss in one session, though every holder simply had ten times as many shares. Dividends cause the same problem on a smaller scale: on the ex-date the price drops by roughly the dividend, which raw history records as a loss even though the shareholder received the cash.

Split adjustment

A split factor is the ratio of shares before to shares after. For a 10-for-1 split it is 1 / 10 = 0.1. Every price before the split is multiplied by the factor, and every volume before the split is divided by it, so share counts stay comparable.

XNAS:NVDA around its June 10, 2024 split, from /v1/eod with adjustment=raw and adjustment=split. Historical end-of-day values.
DateRaw closeSplit-adjusted closeRaw volumeSplit-adjusted volume
2024-06-061,209.98120.99866,469,616664,696,160
2024-06-071,208.88120.88841,238,578412,385,780
2024-06-10121.79121.79314,162,688314,162,688

Dividend (total-return) adjustment

A cash dividend factor is one minus the dividend divided by the close before the ex-date: 1 − dividend / prior close. Prices before the ex-date are multiplied by it, so the adjusted series behaves as if the dividend were reinvested in the stock.

Apple paid $0.27 with an ex-date of August 10, 2026. Its close on the previous session, August 7, was 313.33, so the factor is 1 − 0.27 / 313.33 = 0.999138. The total-return close for August 7 is 313.33 × 0.999138 = 313.06, and that is what /v1/eod?adjustment=total_return returns. The dividend record from /v1/dividends carries the same factor in historical_adjustment_factor.

Cumulative factors

Each bar is adjusted by the product of the factors of every event after it. A bar from ten years ago may carry dozens of dividend factors and a split or two. That is why adjusted history is rewritten whenever a new event arrives: yesterday's adjusted price for a date in 2015 is not today's if a dividend went ex in between. Store the version of the adjustment with any series you cache.

Which price series to use

  • Total-return adjusted for performance: backtests, Sharpe ratios, drawdowns and comparisons between dividend payers and non-payers.
  • Split adjusted for price patterns and technical indicators where you want continuity across splits but not the slow downward drift that dividend adjustment adds to old prices.
  • Raw for anything tied to the prices that actually traded: order sizing, minimum-price filters, option strikes and reconciling with broker statements.

A backtest that buys stocks under $5 using adjusted prices can select stocks that never traded under $5. Filter on raw prices and measure returns on adjusted ones.

How adjustment works in the OHLC API

  1. Pass adjustment on /v1/eod, /v1/intraday or /v1/bars: raw (the default), split for the listing's reconciled splits, or total_return for splits and cash dividends.
  2. Read the mode back from each row. Adjusted rows add adjustment and factor_set_version; raw rows from /v1/eod omit both.
  3. Cache by factor_set_version. When it changes, a new event has been folded in and older adjusted values have moved.
  4. Inspect the events themselves in /v1/splits (split_from, split_to, historical_adjustment_factor) and /v1/dividends (historical_adjustment_factor, split_adjusted_amount).
Split-adjusted daily barscURL
curl 'https://api.ohlc.io/v1/eod?symbols=XNAS:NVDA&from=2024-06-06&to=2024-06-11&adjustment=split' \
  -H "Authorization: Bearer $OHLC_API_KEY"

Each mode needs its own validated factor set. If one is not ready, the request returns 503 adjustments-unavailable instead of silently serving raw prices. split never waits on a dividend; total_return can be briefly unavailable for rows before a dividend that has just gone ex, until the close it is valued against is in. Whole-market date queries and nightly flat files are raw only, and listings whose corporate actions are not collected, such as OTC securities and crypto pairs, have no adjusted series.

Questions, answered.

What is an adjusted stock price?

A historical price rescaled for later splits and, in a total-return series, dividends, so that returns calculated across those events reflect what a holder actually earned.

How is the split adjustment factor calculated?

Shares before divided by shares after. A 10-for-1 split has a factor of 0.1: earlier prices are multiplied by 0.1 and earlier volumes divided by it.

How is a dividend adjustment factor calculated?

One minus the dividend divided by the close before the ex-date. A $0.27 dividend against a 313.33 close gives 0.999138.

Is adjusted close the same as total return?

Usage varies by provider. In OHLC, split adjusts only for splits and total_return adjusts for splits and cash dividends; every adjusted row states which one it is.

Why did historical adjusted prices change?

Because a new split or dividend occurred. Each event multiplies every earlier price by its factor, so adjusted history shifts after every event. factor_set_version tells you when that happened.

A little JSON.
A lot of possibility.

Explore the API