November 20, 2026 · research

Your First ETF Backtest Bought the Wrong Shares: A Letter About Reinvestment

Your First ETF Backtest Bought the Wrong Shares: A Letter About Reinvestment

You’re backtesting a monthly ETF rotation strategy, and your first chart looks tidy: buy the strongest fund at each month-end, hold until the next rebalance, compare the result with a benchmark. Then you notice the strategy trails a simple buy-and-hold series by several percentage points over a few years. You suspect the signal.

Before you rewrite it, check what your portfolio did with distributions. If your price series excludes dividends and your account never receives the cash, you haven’t backtested total return. If the series already reinvests them and your ledger also credits cash, you’ve counted them twice.

Start with what the account actually owns

Keep three quantities distinct: the ETF’s quoted price, distributions owed to your account, and shares held. A fund can trade lower on its ex-dividend date while your account acquires a claim to the distribution. The price move alone is not the whole economic event.

Suppose you hold 100 shares through an ex-date for a $0.40 distribution per share. Your entitlement is $40. If the fund’s price was $50 before the ex-date, a simplified price adjustment might take it near $49.60, all else equal. The account has roughly the same pre-tax value: 100 shares worth $4,960 plus $40 receivable.

The market needn’t make that neat adjustment. Prices move for other reasons, and distributions can be taxable depending on the account and jurisdiction. But the ledger still needs to represent the entitlement consistently.

100shares held through ex-date
$0.40distribution per share
$40cash claim to track

Use the event dates for different jobs

Distribution records commonly include several dates. The ex-date determines whether a trade carries entitlement under the applicable market rules. The record date identifies the fund’s holder-of-record process. The payable date is when cash is scheduled to arrive. These dates are related, but they don’t mean the same thing in a simulation.

DatePortfolio treatmentBacktest mistake
Ex-dateEstablish entitlement for eligible holdingsCrediting only shares still held on payment day
Record dateReference the fund’s recordkeeping processUsing it as a substitute for every trading rule
Payable dateMove the receivable into cashReinvesting before cash is available

For a close-to-close strategy, be explicit about when its holdings are measured. A buy executed at the ex-date close generally shouldn’t receive the same treatment as shares held before the ex-date under standard US equity conventions. Your data vendor may encode adjusted prices for convenience, but those prices don’t tell you which shares your simulated account held.

Choose one reinvestment policy and implement it once

Your strategy needs a clear rule for distributions. You can hold them as cash until the next scheduled rebalance, reinvest them on the payable date, or use a vendor’s total-return series for performance analysis. Each choice answers a different question.

If you reinvest on the payable date, buy only the fractional or whole shares your account supports at an executable price, and account for fees if the venue or broker charges them. If you hold cash, include it in portfolio value and decide whether it earns interest. If you use a total-return series, don’t also add the same distributions to the account ledger.

One useful invariant: after a distribution event, the account should reconcile across shares, cash, and receivables. A price adjustment and a cash credit must never both represent the same dollars.

Here’s the small implementation detail that tends to get missed: payment calendars can put cash on a day when your strategy is already making a rebalance decision. Decide whether the rebalance sees the newly paid cash before it calculates order sizes. That convention can affect trades, costs, and later holdings even when the distribution itself is modest.

Make the backtest answer the question you asked

Compare like with like. A price-only benchmark against a portfolio that reinvests distributions understates the benchmark. A total-return benchmark against a portfolio that leaves distributions idle gives the benchmark a reinvestment policy your strategy didn’t have.

Keep a small audit around each event: shares entitled, per-share amount, receivable created, payment date, cash credited, and any reinvestment order. Then reconcile the account value immediately before and after, allowing for the market move and transaction costs.

You can still discover that your rotation signal was weak. But first give it a fair ledger. Your backtest should show whether the strategy chose the wrong ETF, or whether it simply forgot the cash the ETF paid you.

ETF backtestingdividendstotal returnportfolio accountingdata engineering
← All posts