Stock Splits & Dividends Historical Data for Backtesting
Stock splits and dividends change share counts or cash payouts, so historical prices must be adjusted to reflect true returns. Without adjustment, backtests show fake losses or gains. Accurate backtesting requires dated corporate action events or pre-adjusted price series.
What Are Stock Splits and Dividends?
A stock split increases the number of shares while reducing the price per share proportionally. For example, in a 2-for-1 split, each share becomes two shares, and the price halves. The total value of your holding stays the same.
A dividend is a cash payment to shareholders. On the ex-dividend date, the stock price typically drops by roughly the dividend amount because new buyers no longer receive that payment. Again, your total value (shares plus cash) is preserved.
Both events change the raw price series without changing the actual economic value of a position. This is why historical price data must account for them.
Why Unadjusted Prices Break Backtests
If you feed raw, unadjusted prices into a backtest, every split looks like a massive overnight loss. A 2-for-1 split appears as a 50% drop. Your strategy will trigger stop-losses, short signals, or margin calls that never actually happened.
Dividends cause a subtler problem. The price drops on the ex-date look like small losses. Over years, these add up and make a solid dividend-paying stock look like it underperformed, when in reality shareholders collected cash along the way.
Momentum indicators, moving averages, and volatility calculations all break when applied to unadjusted series. You end up testing a strategy on price moves that no trader ever experienced.
Price Return vs Total Return
A price-return series tracks only the share price, adjusted for splits but not dividends. It tells you how the stock price alone moved over time.
A total-return series assumes all dividends are reinvested into more shares on the ex-date. It reflects the actual compound growth of an investment, including both price appreciation and dividend income.
For long-term backtests, total return is usually the correct choice. Ignoring dividends can understate returns significantly, especially for dividend-heavy stocks or multi-decade tests. Price return is useful when you specifically want to isolate price movement or compare against benchmarks quoted on a price basis.
How Split and Dividend Adjustment Works
Adjustment rewrites historical prices so that splits and dividends no longer create artificial jumps. The most common method is backward adjustment: you keep recent prices as-is and scale older prices downward to account for splits and dividend drops.
For a split, you divide all pre-split prices by the split ratio. For a dividend, you multiply pre-ex-date prices by a factor that accounts for the cash payout, typically (1 - dividend / price_before_ex_date).
The result is a smooth series where every price move reflects real market activity, not corporate mechanics. Volume is also adjusted for splits (multiplied by the ratio) so that share counts stay consistent.
How to Rebuild Adjusted Prices Yourself
Start with raw OHLC prices and a list of corporate actions: each event should have a date, ticker, type (split or dividend), ratio (for splits), amount (for dividends), and ex-date.
Work backward from the most recent date. For each split, divide all earlier prices by the ratio and multiply earlier volumes by the ratio. For each dividend, multiply all earlier prices by (1 - amount / close_on_day_before_ex_date).
Apply events in chronological order, compounding the adjustment factors. Keep a running multiplier per ticker so you can apply the same factor to every historical bar in one pass.
FinzData delivers splits and dividends as dated events with fields for date, ticker, type, ratio, amount, and ex_date, covering US-listed equities including delisted names on the look-back plan. You can apply adjustments yourself or let the API do it on read. In Python: `import finzdata as yf; acts = yf.Client().actions("AAPL"); print(acts)`.
Survivorship Bias and Delisted Stocks
If your historical data only includes stocks that still trade today, your backtest is biased upward. You are testing only on winners that survived, ignoring all the companies that were delisted, acquired, or went bankrupt.
Survivorship-bias-free data includes delisted equities with their full price history and corporate actions up to the delisting date. This lets your backtest experience the real distribution of outcomes, including total losses.
When rebuilding adjusted prices, make sure your corporate actions feed covers delisted names too. Otherwise, you will have clean data for survivors and broken or missing data for the stocks that failed.
Practical Checklist for Backtesting with Corporate Actions
First, decide whether you need price return or total return. Total return is the default for most strategy research.
Second, confirm your data source provides dated corporate action events with all necessary fields: date, ticker, type, ratio, amount, and ex_date. Avoid sources that only give you pre-adjusted prices without the underlying events, because you cannot verify or customize the adjustment.
Third, check whether delisted stocks are included. If not, your results will be overly optimistic.
Fourth, test your adjustment logic on a known example. Pick a stock with a well-documented split and dividend history, apply your method, and confirm the adjusted series is smooth with no artificial jumps on event dates.
Finally, version your adjusted data. If you re-download or re-adjust later, small differences in corporate action handling can change backtest results. Keep a snapshot so your research is reproducible.
Frequently asked questions
What is the difference between price return and total return?
Price return tracks only the share price, adjusted for splits. Total return assumes dividends are reinvested, so it includes both price gains and dividend income. Total return is the better choice for most long-term backtests.
Why do unadjusted prices break backtests?
Unadjusted prices show splits as huge overnight losses and dividend ex-dates as small losses. These fake moves trigger false signals, break indicators, and make your strategy behave as if events happened that no trader actually experienced.
How do I adjust historical prices for splits?
Divide all prices before the split date by the split ratio, and multiply volumes by the ratio. Work backward from the most recent date, applying each split in order.
How do I adjust historical prices for dividends?
Multiply all prices before the ex-dividend date by (1 - dividend_amount / close_price_on_day_before_ex_date). This removes the artificial price drop and reflects reinvested dividends.
Where can I get split and dividend data for backtesting?
FinzData provides splits and dividends as dated events for US-listed equities, including delisted stocks on the look-back plan. Each event includes date, ticker, type, ratio, amount, and ex_date. You can apply adjustments yourself or let the API adjust on read.