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.
| Date | Raw close | Split-adjusted close | Raw volume | Split-adjusted volume |
|---|---|---|---|---|
| 2024-06-06 | 1,209.98 | 120.998 | 66,469,616 | 664,696,160 |
| 2024-06-07 | 1,208.88 | 120.888 | 41,238,578 | 412,385,780 |
| 2024-06-10 | 121.79 | 121.79 | 314,162,688 | 314,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
- Pass
adjustmenton/v1/eod,/v1/intradayor/v1/bars:raw(the default),splitfor the listing's reconciled splits, ortotal_returnfor splits and cash dividends. - Read the mode back from each row. Adjusted rows add
adjustmentandfactor_set_version; raw rows from/v1/eodomit both. - Cache by
factor_set_version. When it changes, a new event has been folded in and older adjusted values have moved. - Inspect the events themselves in
/v1/splits(split_from,split_to,historical_adjustment_factor) and/v1/dividends(historical_adjustment_factor,split_adjusted_amount).
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.