Calculating TWR from ledger flows and your valuations
The ledger supplies flow membership and clocks; you supply total valuations. Return is conditional on those values, not a source-verified market result.
1. Choose exact opening and closing
In Portfolio’s Model tab open Time-weighted return · your valuations. Enter Opening · exact UTC instant and Closing · exact UTC instant as YYYY-MM-DDTHH:mm:ss.sssZ. Closing cannot exceed the verified ledger cutoff. Review recorded flows prepares that exact window; Verify current ledger rechecks the source, not your historical prices.
The interval is (opening, closing]: opening value already includes flows at opening, and closing includes flows exactly at closing. Flow review reads the existing server-owned ledger projection at exact closing once and verifies its binding to the same complete currently recorded ledger. Calculation, detail and export use that retained server projection without reading it again. This does not establish that every record was known then. All recorded flows, exclusions and reversals distinguishes included, opening/prior, later, reversed and internal-transfer records.
2. Enter total values at every boundary
Your total valuations include all investments and cash of the same portfolio in its base currency. Enter opening/closing values after flows at their respective instants and values before/after every actual flow group. Simultaneous flows are grouped, including zero net flows; at most 50 instants and 51 segments. You enter both values: after flow must equal before flow plus recorded net flow.
If a flow occurs exactly at closing, its after value must equal your closing value. Without a closing flow, a final segment reaches closing valuation; with no flows there is one segment. Use nonnegative decimal amounts with a point, up to 24 integer and 18 fractional digits. Zero is an actual input, but zero starting capital makes return unavailable rather than neutral.
3. Review values and explicitly calculate
Review all valuations opens Exact review before calculation with window, currency, revision and every boundary. Review does not calculate return. Calculate TWR from reviewed values rechecks the same account, ledger and membership and uses exactly the reviewed values. Draft edits or cancelling a wait do not recalculate the preceding result or overwrite valuations.
Included foreign-currency flows, securities receipts, missing base amount or valuation mismatches may make return unavailable. Unsupported members are not dropped and a null flow is not zero. The model substitutes no historical FX, cost basis or current price. Correct and complete valuations, including income/costs, and ledger coverage remain your assumptions.
4. Read segments and cumulative TWR
The result uses the unchanged exact-flow-boundary-twr-v1 kernel with 48 significant digits HALF_EVEN. Segments are linked geometrically, not by adding percentages. Whole-period return is not annualized and is neither XIRR, Modified Dietz, a benchmark nor tax result. Cumulative points and the complete table share one calculation; selecting a point or Inspect opens exact valuations and original flow members without recalculation.
Unavailable return remains a gap with a reason, never filled with zero. Long values marked ≈ are shortened only for presentation; exact values remain in detail and files. Contributions and withdrawals are not investment profit, and an actual −100% return is not a neutral segment.
5. Retain the whole conditional model
Whole TWR model · JSON/CSV freshly verifies account/ledger and includes the same complete result, all segments, original financial inputs and all your valuations once. A detail or flow page never narrows the file; authentication/session proofs are excluded. Results and drafts stay only in page memory and may not survive a reload. The model writes no ledger, saves no Snapshot and publishes no financial share.
This is a guide to Datisto. Private features require sign-in and access to your own data. Personal models use your assumptions; availability and permitted use of source data are checked with the particular result. This is not investment advice.