calculate_mwr
Compute money-weighted return (IRR) for XP Investimentos portfolios, accounting for cash flow timing. Returns annualized MWR, cash flow breakdown, and diagnostics from XPerformance.
Instructions
Money-weighted return (MWR / IRR) — the rate that reflects when you put money in vs. out. Computed via bisection over signed cash flows including synthetic initial/terminal NAV. Requires ≥ 2 XPerformance imports. Returns mwr_period, mwr_annualized, cash_flow_breakdown, convergence diagnostics, and warnings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period_to | No | ||
| period_from | No |