Forecasting
forecast_balance projects the balance of your accounts month by month, up to 24 months
ahead. It separates what recurs, placed on its day, from what varies, spread over
the days, and returns every assumption.
Accounts and starting point
Section titled “Accounts and starting point”The accounts are those given in account_ids, or else every open on-budget account. The
starting balance is the sum of their balances today; the history is their transactions,
without transfers or deleted ones.
Recurring charges and income
Section titled “Recurring charges and income”Over the last 4 full months (the current month is incomplete and left out), transactions are grouped by normalised payee and direction. A group recurs when:
- it appears in at least 3 of the 4 months, and
- each month’s total is within 20 % of the median monthly total.
It is then projected every month for its median monthly amount, on the median day it fell on (the last day of a shorter month when needed).
Scheduled transactions
Section titled “Scheduled transactions”The scheduled transactions of the projected accounts, from tomorrow to the end of the
horizon, fall on their dates, repeated at their YNAB frequency — a yearly insurance
included. A payee with a schedule is projected by it alone: it leaves the recurring
charges and the averages, so it is never counted twice. A transfer between two projected
accounts is left out, since it changes neither total; a transfer to another account
counts as money out. They are returned in assumptions.scheduled.
Everything else
Section titled “Everything else”| Assumption | Default | Override |
|---|---|---|
| Other spending | the average of the last 3 full months’ outflows, recurring charges excluded | variable_monthly |
| Income | the average of the last 3 full months’ inflows, recurring income excluded | monthly_income |
| One-off amounts | none | one_offs: {date, amount, label} |
When you give monthly_income, it replaces the income found in the history and the
scheduled inflows, salary included, so a salary is never counted twice.
The projection
Section titled “The projection”Month by month, day by day from tomorrow:
- Recurring amounts fall on their day; in the current month, only those still to come.
- Other spending and income are spread evenly over the days left, in whole cents. For the current month, what was already spent or received since the 1st (outside recurring payees) is deducted from the monthly averages: only what is left is projected.
- Scheduled transactions and one-off amounts fall on their date, if it is after today and within the horizon.
For each month the answer gives start, inflows, outflows, end and lowest, the
lowest balance of any day in the month. first_shortfall is the first month whose
lowest is below zero.
Limits
Section titled “Limits”The horizon until is a month, YYYY-MM, from the current month to 24 months ahead.
Unofficial project. We are not affiliated, associated, or in any way officially connected with YNAB or any of its subsidiaries or affiliates. YNAB and You Need A Budget are registered trademarks of YNAB. avenir-mcp is provided as is, without warranty, and is not financial advice. Legal notice