Balance Forecast
The Balance Forecast report.
A line chart of the balance of the selected accounts over time that includes the transactions your scheduled
transactions will make. Use it to see whether an account will run low before the next pay day. It can draw a reserve
line and a target line above it (Display/Show reserve line, Display/Reserve amount, Display/Target amount above reserve) and the lowest balance still to come (Display/Show future minimum). In GnuCash: Reports ▸ Assets &
Liabilities ▸ Balance Forecast.
The options that matter are Accounts/Accounts (at least one is needed, or the report says No accounts selected),
General/Start Date, End Date and General/Interval. Scheduled transactions are not entered by the report; they
come from scheduledTransaction.create.
Examples
Example: with a copy of the reports/test-data example book open as book.gnucash, at 2024-03-15T12:00:00Z.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"report.run","params":{"report":"Balance Forecast","options":{"Accounts":{"Accounts":["a0000000000000000000000000000003"]},"General":{"Start Date":{"absolute":"1978-01-01"},"End Date":{"absolute":"1978-12-31"},"Interval":"MonthDelta"}}}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"title": "",
"sections": [
{
"blocks": [
{
"kind": "chart",
"type": "line",
"title": [
"Balance Forecast",
"01/01/78 to 12/31/78"
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
}
}
Command line
red-ale exec --book book.gnucash report.run '{"report":"Balance Forecast","options":{"Accounts":{"Accounts":["a0000000000000000000000000000003"]},"General":{"Start Date":{"absolute":"1978-01-01"},"End Date":{"absolute":"1978-12-31"},"Interval":"MonthDelta"}}}'
It prints:
{
"title": "",
"sections": [
{
"blocks": [
{
"kind": "chart",
"type": "line",
"title": [
"Balance Forecast",
"01/01/78 to 12/31/78"
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
}
MCP tool call
Tool call:
{"name":"report.run","arguments":{"report":"Balance Forecast","options":{"Accounts":{"Accounts":["a0000000000000000000000000000003"]},"General":{"Start Date":{"absolute":"1978-01-01"},"End Date":{"absolute":"1978-12-31"},"Interval":"MonthDelta"}}}}
Result:
{
"structuredContent": {
"title": "",
"sections": [
{
"blocks": [
{
"kind": "chart",
"type": "line",
"title": [
"Balance Forecast",
"01/01/78 to 12/31/78"
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
}
}
Template GUID: 321d940d487d4ccbb4bd0467ffbadbf2 · Script: standard/balance-forecast.rhai
Options
Accounts
- Accounts (accountList, default
[]): Report on these accounts.
Display
- Plot Width (plotSize, default
{"percent":100}): Width of plot, 10 - 100 in percent, above in pixels. - Plot Height (plotSize, default
{"percent":100}): Height of plot, 10 - 100 in percent, above in pixels. - Data markers? (boolean, default
false): Display a mark for each data point. - Show reserve line (boolean, default
false): Show reserve line - Reserve amount (numberRange, default
0): The reserve amount is set to a minimum balance desired - Show target line (boolean, default
false): Show target line - Target amount above reserve (numberRange, default
0): The target is used to plan for a future large purchase, which will be added as a line above the reserve amount. - Show future minimum (boolean, default
false): The future minimum will add, for each date point, a projected minimum balance including scheduled transactions.
General
- Report name (string, default
"Balance Forecast"): Enter a descriptive name for this report. - Stylesheet (multichoice, default
"Default"): Select a stylesheet for the report. - Add options summary (multichoice, default
"never"): Add summary of options. - Start Date (date, default
{"relative":"start-accounting-period"}): Start of reporting period. - End Date (date, default
{"relative":"end-accounting-period"}): End of reporting period. - Interval (multichoice, default
"DayDelta"): The amount of time between data points. - Report's currency (currency, default
"CURRENCY::USD"): Select the currency to display the values of this report in. - Price Source (multichoice, default
"pricedb-nearest"): The source of price information.