Does your backtest count dividends correctly?
A backtest counts dividends correctly when it credits each cash distribution after the position opens, keeps prices on a split-consistent basis, and calculates the strategy and benchmark with the same return convention. Check all three. A price-only series can understate what an investor received, while a dividend-inclusive benchmark beside a price-only strategy can manufacture underperformance.
The report should also tell you what “total return” means. Some series reinvest distributions. Others add the cash without compounding it. Taxes may be ignored or estimated. Those choices can all be defensible, but they don't answer the same question. If the convention is missing, the return is missing part of its definition.
Price return and total return answer different questions
Price return measures the change in a security's market price over a period. Total return adds distributions received while the security was held. For a common stock, the important distribution is usually a cash dividend.
MSCI's official index definitions separate three series. Its price return excludes dividend reinvestment. Gross return assumes dividends are reinvested before withholding tax, while net return applies withholding tax first. The labels look close on a report, but each describes a different experience.
The basic audit can be written without a spreadsheet:
price return = ending price / starting price - 1
cash-inclusive return =
(ending price + cash distributions received) / starting price - 1
That second line is a useful check, though it isn't a full reinvested-return calculation. Reinvestment buys more shares when each distribution arrives, so later price moves apply to those extra shares. Adding the cash at the end leaves it uninvested. Over a short holding window or for a modest payer, the difference may be small. Across a long test, the convention becomes part of the result.
Don't use “adjusted close” as a magic phrase. Ask what the vendor adjusted. Some adjusted series account for splits. Some also account for distributions. If you add dividend cash to a series that already includes it, you've counted the same payment twice. If the series only corrects splits and you assume it includes dividends, you've dropped the payment altogether.
A return-basis mismatch can invent excess return
Excess return is the strategy return minus the benchmark return over the same interval. That subtraction only makes sense when both sides use the same basis.
Suppose a thesis tends to select mature cash payers. Its raw price path gives up value when cash leaves each company, while the holder receives that cash. Compare the raw price path with a dividend-inclusive fund series and the benchmark gets credit the thesis doesn't. Reverse the conventions and the thesis receives the free advantage.
This problem can survive every familiar robustness check. Moving a threshold won't repair it. Changing the start date may change the size of the distortion without exposing the cause. A holdout period can reproduce the same mismatch because the calculation follows it into the untouched dates.
Audit the benchmark alongside the selected companies:
- Confirm whether both price inputs are split-adjusted.
- Confirm whether both sides include cash distributions.
- Confirm whether distributions are reinvested, left as cash, or handled some other declared way.
- Confirm that tax treatment is the same.
- Confirm that the interval starts and ends on comparable trading dates.
The last item matters because a benchmark can have a valid price when one selected company doesn't. At each forward horizon, Quantery reads the latest selected-company price at or before the target date and reads the benchmark price independently on the same as-of basis. Those observed dates can differ. A sufficiently stale selected-company quote receives the configured delisting haircut; a smaller gap can remain in the comparison. Inspect coverage and source-price staleness before treating an event's excess return as an exact date-matched pair. Choosing a benchmark that matches the thesis handles the economic comparison. Return-basis parity handles the arithmetic beneath it. You need both.
Stock splits are an audit test, not a return
A stock split changes the number of shares and the price per share in offsetting proportions. It shouldn't create a gain or loss by itself. That makes a known split one of the cleanest tests of a historical-price pipeline.
Apple announced a four-for-one split on July 30, 2020. Shareholders recorded at the close of business on August 24 were due three additional shares for each share held, and split-adjusted trading began on August 31. A return calculation that reads the pre-split and post-split quotes as though one unchanged share existed will report a collapse that no continuing holder experienced.
Split adjustment has to reach more than the return column. Per-share fundamentals from old filings were reported in the units that existed then. If a data source rewrites old prices onto today's share basis while leaving book value per share or earnings per share on the old basis, historical valuation ratios break. The return may look smooth while the thesis selects the wrong companies.
Quantery stores split-adjusted prices for return work and reconstructs date-appropriate units when a historical thesis combines price with a per-share filing value. That's why the same corporate action touches both performance and eligibility. A split isn't just a chart-cleaning detail.
Use the Apple event as a plumbing check if your data covers it. Inspect prices immediately around the effective trading date, then inspect any per-share feature your thesis uses before that date. You're looking for continuity in economic value even though the quoted numbers change. A large discontinuity warrants a stop before you read any equity curve.
Audit one holding by hand
Pick one completed position from the test. A boring dividend payer with a clean entry and exit is better than the largest winner. You aren't trying to explain the whole portfolio yet. You're checking whether the engine's arithmetic can be reproduced from its inputs.
Record the actual entry date and price used by the backtest. Do the same for the exit. Then list every cash distribution whose ex-date falls inside the holding interval. The ex-date is the date on which the shares begin trading without entitlement to that distribution. Use the engine's boundary rule exactly. A payment on the entry date can be included or excluded depending on when the simulated trade occurs, and guessing will create a one-payment disagreement.
Next, inspect any split inside or after the interval. Prices and dividend amounts must share one unit basis before you combine them. A historical cash amount quoted per old share can't be added unchanged to a price series that has been divided by a later split factor.
Recompute the holding return under the report's stated convention. If the report leaves distributions as cash, use the cash-inclusive formula. If it reinvests them, track the additional shares bought at each distribution date. Compare your result with the event row or position result, allowing only for declared rounding.
When the numbers disagree, don't average the error away. Work backward:
- Was the entry the signal-day close or the next available close?
- Did the engine use the ex-date or payment date?
- Was a special distribution present in the corporate-action feed?
- Did the source already adjust for that distribution?
- Did a later split change the units of an earlier cash amount?
Then repeat the check on the benchmark over those exact dates. One reproducible company return beside one reproducible benchmark return is worth more than staring at the aggregate curve and hoping the labels mean what you think.
Quantery states the cash convention in the report
Quantery backtests use split-adjusted price series and add cash distributions whose ex-dates fall inside each measured interval when dividend data is available for that symbol. Whether the benchmark gets the same treatment depends on where its bars came from. A benchmark fetched through a configured market-data vendor is measured the same way as the selected companies. The keyless benchmark fallback supplies split-adjusted prices but no dividend feed, and the run that fetches through it carries the coverage note price-return only (no dividend feed).
That note appears only on the run that does the fetching. A benchmark series already stored in your local data lake gets reused as it is, so one pulled through the fallback before you configured a vendor can stay price-only with no note attached. Vendor configuration alone doesn't prove same-basis returns. Read the run's coverage note, then repeat the hand check from the previous section on the benchmark. If no distributions show up over a window where the benchmark fund paid them, the benchmark is price-only for that run, and the strategy-benchmark gap isn't a same-basis total-return comparison.
For dividend-inclusive runs, cash is credited, but the calculation doesn't pretend it bought fractional shares and compounded afterward. It also doesn't model withholding tax. So the result is cash-inclusive and gross of tax, but it isn't identical to the reinvested gross-return index convention MSCI defines.
When both sides have dividend data, this research model gives strategy variants a consistent yardstick without inventing a reinvestment policy. It can still diverge from an account where distributions were reinvested, swept into cash, taxed at an investor-specific rate, or used to fund other positions. Keep the claim attached to the model.
Every return remains hypothetical and excludes trading costs. Corporate-action correctness fixes one source of distortion. It can't supply bid-ask spreads or prove a simulated close was tradable at the displayed price. Reading coverage before performance and checking the data available to a backtest cover the surrounding evidence.
Keep the return convention fixed across every rerun
Write the convention into the research log before comparing thesis versions: price basis, distribution treatment, reinvestment rule, tax treatment, and interval boundaries. If a data provider changes, rerun a small set of hand checks before joining new reports to old ones.
Then perturb the thesis. Move the gate, change the holding rule, or test another period while the return machinery stays fixed. The rules are yours to change. The ruler shouldn't stretch with them.
Research tooling, not investment advice. Nothing here is a recommendation to buy, sell, or hold any security. Screens, scores, and backtests are informational only; backtested results are hypothetical, exclude costs such as commissions and slippage, and do not guarantee future results. Verify against primary filings and make your own decisions.
Want to try this on your own rules? Quantery is free for 14 days: the full app, no card required.
← All articles