Before and after a proposed change
test_a_changeAny change to one portfolio, measured before it is made: current and proposed holdings side by side on the same prices. In: two sets of holdings. Out: structure, share of the risk, falls in past crises, and what the change adds or removes; the figures are in the structured result. Typical questions: 'What happens if I sell half my QQQ and buy BND?'; 'Compare my portfolio now with this rebalanced version.'; 'I want to swap VXUS for VWO: before and after?'. Instead: for adding ONE new holding (how much of it is already owned, and a 'kept as cash' column) use check_before_you_buy. For one holding at every weight, sweep_holding. For separate unrelated portfolios, compare_portfolios. It does not recommend, predict or calculate tax.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Optional window end, YYYY-MM-DD. | |
| base | No | Currency code every figure is expressed in: USD, EUR, GBP, CAD… Default USD. | |
| start | No | Optional window start, YYYY-MM-DD. | |
| current | Yes | What is held now, {ticker: weight}. | |
| proposed | Yes | What would be held after the change, {ticker: weight}. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| axes | No | Per axis: label, the question it answers, before, after. | |
| data | No | Where the prices came from and what was missing or repaired. | |
| kind | No | Kind of figures (counterfactual). | |
| _fence | Yes | What these figures are and are not: descriptive, no forecast, no advice. Repeat its sense when presenting the result. | |
| deltas | No | Per measure: label, before, after, direction, unit. | |
| window | No | The shared window: start, end, years, which holding set it, crises inside. | |
| similar | No | Measures that barely moved. | |
| summary | No | One sentence on what the change moves. | |
| improved | No | Measures that moved one way. | |
| worsened | No | Measures that moved the other way. | |
| historical | No | Per past crisis: before and after. | |
| introduces | No | Risk the proposed holdings add that the current ones did not carry. | |
| kind_means | No | What that kind means. | |
| limitations | No | What this comparison cannot show. |