Abstract

Total-return indices and executable portfolio ledgers represent distinct economic processes. An index applies a specified reinvestment convention; a portfolio ledger records security quantities, marked values, dividend claims, available cash, and transactions. Substituting one representation for the other can misstate return attribution or imply financing that the simulation has not modeled.

This note specifies a close-reinvested gross-return index and a cash-funded raw-share ledger, derives their behavior around ordinary dividend and split events, and examines the consequences for execution timing and transaction-cost funding. The distinction is between valuation and executable funding, not between two interchangeable price-adjustment formulas.

1. Valuation identity and dividend entitlement

For a long-only portfolio without borrowing, let C denote available cash, qᵢ the quantity of security i, Pᵢ its raw mark, and A the face value of outstanding dividend receivables. Portfolio equity is:

E = C + Σᵢ qᵢ Pᵢ + A

Consider one share carried into an ordinary ex-dividend date. The previous close is $100, the ex-date price is $98, and the gross dividend is $2 per share. Taxes, transaction costs, interest, and other corporate actions are excluded from this initial case.

One existing share; dividend payment remains pending
ComponentBefore ex-dateOn ex-date
Share value$100$98
Dividend receivable$0$2
Spendable cash$0$0
Portfolio value$100$100

Equity is unchanged: the $2 reduction in marked share value is offset by a $2 receivable. Available cash remains zero. The receivable contributes to valuation but cannot fund a purchase under the cash-only specification.

Under the ordinary entitlement convention modeled here, selling at the ex-date open preserves the carried holder’s claim; purchasing at that open creates no claim to this dividend. Payment changes the composition of assets from receivable to cash and produces no second increment to equity. This treatment assumes the claim remains payable at its declared gross face value.

2. Close-reinvested total-return index

Let Iₜ be the index level, Pₜ the raw closing price, dₜ the dividend per post-split share on its ex-date, and rₜ the new-shares/old-shares split ratio. For an explicit initial close and base level, subsequent levels satisfy:

Iₜ = Iₜ₋₁ × rₜ × (Pₜ + dₜ) / Pₜ₋₁

On non-event dates, rₜ = 1 and dₜ = 0. The recurrence represents notional ex-date-close reinvestment of gross distributions. It does not assert that a broker delivered cash before reinvestment.

For the $100/$98/$2 case, the growth factor is (98 + 2) / 100 = 1. If the following close is $107.80, with no further event, the index reaches 110. A non-reinvesting raw-share portfolio instead holds one share worth $107.80 and a $2 claim or cash balance, for total equity of $109.80. The difference follows from the reinvestment policy rather than an inconsistency in valuation.

Our legacy approximation scaled the price return by a dividend yield computed against the previous close. In this example, (98 / 100) × (1 + 2 / 100) = 0.9996, inconsistent with the specified flat-wealth outcome. This counterexample identifies a discrepancy in the dividend convention; it does not quantify cumulative error in a historical strategy.

Split treatment requires dimensional consistency between the ratio and the dividend amount. A same-session 2:1 split, $49 close, and $1 dividend per post-split share produce 2 × (49 + 1) / 100 = 1. Applying a pre-split dividend amount without conversion would overstate the distribution.

3. Execution timing and return attribution

Consider an ex-date open of $98, a close of $108, and a $2 dividend. A pre-existing holder who retains the share has closing equity of $110. A holder who sells at the open has $98 in proceeds and a $2 receivable, for equity of $100, assuming zero subsequent cash interest and no fees.

The close-index observation does not identify the seller’s realized return interval or opening execution price. Using that observation as an executable mark would assign price changes and reinvestment assumptions to a position that no longer exists.

Our close-index interface therefore exposes dated close levels, not synthetic executable OHLC prices. Adjusted series remain useful for analysis, provided that return units and execution units are distinguished explicitly. Raw-price execution requires its own holdings and cash ledger.

4. Event sequencing and funding constraints

The raw-share reference applies the following before-open ordering: accrue interest on prior cash under the declared convention; apply splits to carried quantities and inverse-scale prior marks; establish ex-date entitlement from the resulting carried quantities; deliver previously declared available cash; and execute the preceding decision at the raw open.

This ordering preserves entitlement through an ex-date sale and excludes entitlement for an ex-date buyer. Subsequent splits alter share quantities but do not change the fixed dollar amount of an already accrued receivable. Undelivered claims remain part of terminal equity when the evaluation window ends.

Funding constraints are evaluated separately from target portfolio value. A book with $98 available cash and a $2 receivable cannot execute a $100 purchase without financing. The cash-funded reference rejects that target; it does not substitute accrued income for available funds or introduce implicit borrowing.

Transaction costs must also be funded from the portfolio. For an initially all-cash book with equity E, proportional purchase cost c, no receivables, and a fully invested post-fee target, the executable holding notional H satisfies:

H + cH = E
H = E / (1 + c)

At E = $100 and c = 0.01, the solution is approximately $99.0099 of holdings and $0.9901 in fees. Purchasing the full pre-fee equity instead would require an additional dollar of funding. More general rebalances must account for existing holdings, traded notional, outstanding claims, and the resulting cash balance.

5. Event evidence and cash availability

The ex-date, issuer payable date, and broker cash-availability time have distinct roles. Entitlement follows the supported event convention. The payable date alone does not establish when proceeds became available for a particular account’s next trade.

The close-only index permits explicitly unknown cash availability because the recurrence does not consume that field. The raw cash-book calculation requires an availability declaration. Provided dates still require calendar and ordering validation. This separation avoids imposing an irrelevant funding prerequisite on an index while preserving the prerequisite for executable accounting.

Likewise, valid arithmetic does not authenticate historical security identity, dividend amount basis, source-price accuracy, or information availability. Those input qualifications remain independent requirements.

6. Verification scope and implementation limits

Recorded offline verification covers ex-date entry and exit, payment after liquidation, simultaneous and subsequent splits, reverse splits, duplicate and conflicting event records, transaction-cost funding, terminal unpaid claims, and unfunded-target refusal. Daily ledger outputs distinguish dividend income, receivable balances, and cash delivery.

The reference supports ordinary gross USD dividends and fractional long shares in a cash-funded portfolio. Taxes, shorts, margin, due bills, special distributions, cash-in-lieu, and impaired or canceled claims are outside its modeled scope. Passing the stated cases does not establish support for these additional event classes.

Historical outputs retain their original convention identifiers. A corrected implementation does not retroactively certify previously generated stores or strategy results. Adoption requires a versioned accounting migration, qualified inputs, and new comparisons under a fixed evaluation protocol.

7. Conclusion

Close-reinvested indices and executable portfolios should be evaluated against different invariants. The former must implement the declared return recurrence with consistent share units. The latter must reconcile marked holdings, claims, available cash, fees, and event-dependent entitlement while respecting funding constraints. Separating these representations makes discrepancies attributable to explicit assumptions rather than implicit price transformations.

Run the accounting example

Start with the one-share case above: a $100 previous close, a $98 ex-date price, and a $2 dividend that is not yet cash. The companion follows the balances through payment and compares holding, buying, selling, purchase fees, and splits.

Download the Python example (ZIP, version 1.0.0)

Extract the ZIP and open a terminal in its portfolio-accounting-v1 folder. You need Python 3.10 or later. No additional packages, account, or data subscription are needed.

python accounting.py --check
python -m unittest -v
python accounting.py

Use python3 instead of python on systems that require it. The first command should report: PASS: 7 synthetic scenarios, 15 rows match expected.csv. The second runs 11 tests; the third prints the balances as CSV.

Selected synthetic results, before any claim about real markets
CaseExpected result
Hold on the ex-date$98 share value + $2 receivable; $0 available cash.
Later close at $107.80$109.80 portfolio equity; close-reinvested index level 110.
Sell at the ex-date open$98 proceeds + $2 receivable; the claim survives the sale.
Try buying with $98 cash and a $2 claimA $100 purchase is rejected until the cash is delivered.
Invest $100 with a 1% purchase feeAbout $99.0099 of holdings and $0.9901 in fees.

The index starts at 100 and has no dollar units. It is not the portfolio's cash balance. The code uses exact fractions and rounds only the displayed CSV to four decimal places.

To explore payment timing, copy scenarios.json, move the first scenario's cash-availability date one day later, and run with --input my-scenarios.json. The final row should retain the unpaid claim. The README explains how to check that change by hand.

You can also inspect the individual files: instructions and assumptions, Python code, sample inputs, expected output, tests, and MIT license.

This example assumes one security, fractional long shares, explicit cash-availability dates, and immediately available sale proceeds. It does not model settlement accounting, taxes, interest, borrowing, spreads, slippage, special distributions, or real trading constraints. Its prescribed actions are not a trading strategy. AI tools assisted with the code, tests, and explanation.

References and data availability

Nasdaq’s ex-date explanation provides context for ordinary dividend dates. Security-specific event terms, applicable settlement rules, and account-level cash availability require separate evidence. All numerical examples in this note are illustrative; no vendor price archive or private trading record is redistributed.

Related technical note: Faster BPE Without Changing a Single Token.

Revisions and error reports

: added the version 1.0.0 teaching example, downloadable inputs and expected results, evidence summary, and error-report link. The original publication date and historical findings are unchanged.

Report an error in this article or example. Include the section or example version, the scenario, and the result you expected. We will record substantive corrections here and explain whether they change a conclusion.