Run a retirement plan
run_planRuns a full Foresight Planner retirement plan for a person or couple living in Canada (outside Quebec) or the US, on the person's Foresight Planner account. It returns the chance the money lasts, from simulations on global market history; income tax in the first retirement year and over the whole plan (federal, provincial or state, and the OAS clawback; the whole-plan figure is each path's total, as a mean over the paths); each government benefit (CPP and OAS, or Social Security) and employer pension with its start age and yearly amount from each year a claim starts or a pension ends, as household totals for a couple; spending in the first retirement year and the cash flow that adds up to it: benefits and pensions, employment and other income, dividends and interest, and withdrawals from accounts, less tax and any amount reinvested (withdrawals alone are not the spending), with withdrawals split by account and the year's taxable income before credits; and portfolio value percentiles at key ages (at the end of life on a life-expectancy horizon), all in today's dollars. Use it when a question turns on benefit start ages, pensions, taxes or account types; to compare start ages, call it once per option. If the person hasn't said their age, province or state, savings or spending, ask; don't guess. Pass only what the person said: inputs left out take the plan's defaults, which the result lists as assumptions. Each call uses one of the account's plan runs (the same inputs again within 15 minutes are free), and the result says how many are left. A plan that takes longer than about 40 seconds returns a run_id instead: get its result with get_plan_result. The result links the saved plan on https://foresightplanner.com, where the person sees the year-by-year detail and can change any input.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tax | Yes | ||
| person1 | Yes | ||
| person2 | No | ||
| accounts | Yes | ||
| essential | No | floor_ceiling and yale only: the yearly spending that never flexes, in today's dollars a YEAR, at most withdrawal_amount; the rest can be cut in bad years. Left out, it is the plan builder's default, the smaller of $35,000 and withdrawal_amount. Null is the only value for constant_dollar; under floor_ceiling or yale null makes the WHOLE spending the floor, so none of it flexes. | |
| floor_pct | No | floor_ceiling only: the largest yearly cut in real spending, as a FRACTION 0-1 (0.025 means spending can fall at most 2.5% a year below inflation). | |
| plan_name | No | A short name for this scenario as the person would recognise it, e.g. 'CPP at 70' or 'Retire at 60'. Name each option differently when comparing. | |
| allocation | No | ||
| ceiling_pct | No | floor_ceiling only: the largest yearly raise in real spending, as a FRACTION 0-1 (0.05 means spending can rise at most 5% a year above inflation). | |
| life_events | No | ||
| random_seed | No | Seed for the simulated market paths. A fresh plan fixes it, so runs and comparisons use the same market paths; null draws fresh paths on each new run (the same run_plan call again within 15 minutes returns the earlier run). | |
| block_length | No | Length in MONTHS of each run of consecutive market history the simulation samples (120 means 10 years). Longer blocks keep more of history's long good and bad spells. | |
| yale_smoothing | No | yale only: the weight, as a FRACTION 0-1, on last year's spending grown with inflation; the rest follows the portfolio's value. 1 behaves like constant_dollar, 0 like a fixed percentage of the portfolio. | |
| resident_country | Yes | ||
| withdrawal_amount | Yes | Annual spending in today's dollars, after tax, from all sources (benefits, pensions, other income, investment income and withdrawals); not the portfolio withdrawal. Under floor_ceiling and yale it is the first year's spending, which then moves with the portfolio. | |
| withdrawal_strategy | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | ||
| benefits | Yes | ||
| end_ages | Yes | Fixed horizon: each person's age at the end of their own horizon, by person label. Null under life expectancy. | |
| plan_url | Yes | Link to the saved plan on the site, with the year-by-year detail: give it to the person. | |
| runs_left | Yes | ||
| runs_used | Yes | ||
| start_age | Yes | ||
| not_advice | Yes | ||
| runs_limit | Yes | ||
| assumptions | Yes | ||
| plan_to_age | Yes | Fixed horizon, one person: their age at plan end. Null for a couple, whose partners plan to their own ages (see end_ages), and under life expectancy, where each path ends at its own sampled death. | |
| runs_window | Yes | The period runs_used and runs_limit count over: a year on the Free plan, a calendar month on Pro. | |
| horizon_mode | Yes | ||
| horizon_stats | Yes | Life expectancy: the spread of simulated lifetimes. Null on a fixed horizon. | |
| horizon_years | Yes | Fixed horizon: the plan's length in years (a couple's longer horizon). Null under life expectancy; see horizon_stats. | |
| n_simulations | Yes | ||
| plan_end_year | Yes | Fixed horizon: the calendar year the plan ends, at the end of the longest horizon. Null under life expectancy. | |
| lifetime_taxes | Yes | Income tax over the whole plan: each path's total, as a mean over the paths (not a median), in today's dollars, the OAS clawback included as its own line. | |
| taxes_modelled | Yes | ||
| wealth_at_ages | Yes | Fixed horizon: portfolio value at retirement, each year the first person's age is a multiple of 10, and plan end. Null under life expectancy; see wealth_at_end_of_life. | |
| data_attribution | Yes | ||
| household_totals | Yes | True for a couple: benefit and pension amounts cover both partners together. | |
| median_failure_age | Yes | The first person's age in the median year money ran out; null when no path ran out. | |
| success_probability | Yes | ||
| first_retirement_year | Yes | ||
| reused_run_started_at | Yes | Set when this answer reused an identical run of the same inputs from this assistant in the last 15 minutes: when that run started. Nothing was charged for this call, so runs_used is unchanged by it. Null for a run of its own. | |
| wealth_at_end_of_life | Yes | Life expectancy: portfolio value when each path ends (the last person's death, or a fixed-horizon partner's plan end if later). Null on a fixed horizon. | |
| benefits_after_plan_end | Yes |