calculate_twr
Calculate your portfolio's time-weighted return (TWR) from XPerformance import history, removing contribution and withdrawal effects to show pure investment performance.
Instructions
Time-weighted return (TWR) over the XPerformance import history. Removes the effect of when you contributed/withdrew — pure portfolio performance metric, GIPS-compliant. Uses Modified Dietz between consecutive imports and chains sub-periods geometrically. Requires ≥ 2 XPerformance imports. Returns period_return, annualized return, per-sub-period breakdown, and quality warnings (sparse history, large cash flows, stale tail).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period_to | No | ||
| period_from | No |