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, every 12-month stretch, returns by month and year, and weight drift between rebalances. Typical questions: 'How did this portfolio do over the years?'; 'What was its worst year?'; 'Returns after inflation, please.'. Instead: for crises only, past_crises. For money put in every month, monthly_plan. Past record, not a forecast. It does not recommend, predict or calculate tax.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Currency code every figure is expressed in: USD, EUR, GBP, CAD… Default USD. | |
| units | No | What the holdings' numbers are: 'money' (amounts in the base currency) or 'weights' (percentages or fractions). Omitted: holdings adding up to 1 or 100 are read as percentages, anything else as money, and the answer says so. | |
| holdings | Yes | What is held: {ticker: number}, 1 to 100 holdings. Weights in any scale (60/20/20 or 0.6/0.2/0.2) or money amounts in the base currency (60000/20000/20000): `units` says which; without it, holdings adding up to 1 or 100 are read as percentages, anything else as money, which makes the falls come out in money. Tickers as the exchange lists them (VOO, VWCE.DE, EQQQ.DE, XAW.TO; 'CASH.USD' for cash). Example: {"VTI": 60, "VXUS": 20, "BND": 20}. |
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. |