The record, month by month
return_historyWhat one portfolio returned over its record: growth per year, before and after inflation, best and worst months and years, the range of any 12 months in a row, returns by month and year, and how far the weights drift between rebalances. Use it for 'how did this do?'; for crises only use past_crises, for money put in every month monthly_plan. Base sets the currency the growth is measured in (default USD), which changes the result for holdings priced in other currencies. Past record only, not a forecast.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Currency every figure is expressed in (USD, EUR, GBP, CAD…). Default USD. | |
| holdings | Yes | What is held: {ticker: weight or amount}. Weights need not sum to one; amounts in the base currency are also accepted (then the crises are shown in money). 1 to 100 holdings. Tickers as the exchange lists them (VOO, VWCE.DE, XAW.TO; 'CASH.USD' for cash). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cagr | No | Growth per year over the record. | |
| data | No | Where the prices came from and what was missing or repaired. | |
| grid | No | Monthly returns: one row per year, null where the record has no month. | |
| drift | No | Per holding: target weight and how far it drifted between rebalances. | |
| stats | No | best_month, worst_month, best_year, worst_year, pct_positive, n_months, var95, cvar95, real_cagr (after inflation). | |
| years | No | Calendar years. | |
| _fence | Yes | What these figures are and are not: descriptive, no forecast, no advice. Repeat its sense when presenting the result. | |
| months | No | Month names, aligned with each row of `grid`. | |
| yearly | No | Return per calendar year, aligned with `years`. | |
| distribution | No | Histogram of monthly returns: centers, counts. | |
| rolling_stats | No | Any 12 months in a row: min, max, percentiles, share negative. |