# Forecast

## What is a Forecast?

In &kmymoney;, a Forecast is a prediction of the balances of Accounts during a specified future period of time.

Forecasts can be predicted using one of two methods.

Scheduled and Future Transactions

- &kmymoney; uses a combination of future transactions already entered into the ledgers and the entries in the Schedule.

History-based

- &kmymoney; uses values from past transactions.

The Forecast View shows the predicted balances at account cycle dates and the expected difference between the starting and ending balances. The summary also displays messages about significant predicted changes to the accounts during the forecast period. In addition to the summary, you can also view day-by-day balances and the minimum and maximum balances for each forecast account cycle.

The next section describes how you can configure the forecast method and other parameters used to calculate a Forecast. Following that is a section with more details on the Forecast View.

## Configuring the Forecast

The parameters used to calculate a Forecast, including the forecast method, can be set in the Forecast view configuration dialog. Since the forecast functionality is implemented as a &kmymoney; plugin, you can reach this dialog by invoking the Settings Configure &kmymoney;... menu item, selecting Plugins on the left pane, and clicking the configure icon next to Forecast view.

forecast configuration forecast configuration

Number of Days to Forecast

- The forecast will be calculated up to this far into the future.

Number of Days of Account Cycle

- A Forecast is not based on actual months, but repeating periods of the number of days set in this field. The most common values used are 30 or 31.

Day of Month to start Forecast

- This sets the day of the current month which is used as the starting point of counting both cycles and the number of days to forecast. A value of 0 means to use the current day.

Forecast Method

- As mentioned in the previous section, you can choose whether &kmymoney; uses scheduled and future transactions or historical transactions to calculate a Forecast.

History-based settings

- The settings in this section of the dialog are only applicable if the Forecast Method is set to History-based

  Number of Cycles to use in Forecast

- This sets the number of cycles of historic data to use for predicting future values.

History Forecast Method

- Selecting one of the three radio buttons, Simple Moving Average, Weighted Moving Average (this is the default setting,) and Linear Regression, sets the mathematical formula &kmymoney; will use for a history based Forecast.

The Forecast Method set here applies to all Forecasts. The other settings become defaults, which can be changed when actually calculating and viewing a forecast on the Forecast View.

At the bottom of the dialog, the Defaults resets all values to their default values. The OK and Cancel have their usual meanings.

## Viewing the Forecasts

You can display the Forecast View by clicking the appropriate icon in the navigation pane at the left hand side of your &kmymoney; window.

forecast view forecast view

The top area of the Forecast View is the Forecast Settings. At the left are several fields to control the forecast calculations. The defaults for these values are set on the Forecast View configuration dialog, as described in the preceding section. The values (with the name used on the configuration dialog shown in parentheses if it differs) are:

- Days to Forecast (Number of Days to Forecast)

- Days of Accounts Cycle (Number of Days of Account Cycle)

- Day of Month to start Forecast

- Historic Cycles (Number of Cycles to use in Forecast)

- Chart Detail: This item is not set on the configuration dialog. Choose one of the following values to control the results as displayed in the Chart tab.

  - All

  - Top-Level

  - Groups

  - Total

To the right of these items, &kmymoney; shows the Current Forecast Method. To the right of this is a Forecast button. When you click this button, &kmymoney; calculates the forecast based on the settings to the left, and displays the results in the lower part of the window. Just below these is the History Forecast Method, which is only enabled if the current forecast method is set to History.

The bottom area of the Forecast View has five tabs.

### Summary Tab

The Summary tab has two sections.

#### Account Summary

On the left is the Account Summary, displaying one row of information for each Asset and Liability, with the columns shows below. Note that if the Forecast is based on Scheduled and Future Transactions, there will only be rows for accounts referenced in such transactions.

Account

- The name of the Asset or Liability account

Current

- The current balance of the account

Account Cycle Balance

- The Forecast period is split into account cycles. The default account cycle length is 30 days, but can be set by the user.

  The first account cycle date is the first Forecast date. By default this is the current date plus one account cycle, but this can change depending on the "Day of Month to start Forecast" setting.

  The remaining account cycle dates are determined by adding the account cycle length to the previous account cycle date. This is continued until the calculated account cycle date would be beyond the Forecast period,or Days to Forecast.

  For each account cycle date the predicted balance is displayed.

Total Variation

- The rightmost column displays the predicted difference in value between the balances at the start and end of the forecast. If the predicted end value of the account (in terms of net worth) is less than the start value the whole row is highlighted in red.

#### Key Summary Information

The right portion of the Summary tab displays noteworthy information about accounts. This includes:

Assets below zero

- A message is displayed (in red) for any asset account for which the value starts or will drop below zero during the forecast period.

Liabilities above zero

- A message is displayed for any liability account for which the value starts or will rise above zero during the forecast period. Note that the value of a liability is the negative of its ledger balance, since a positive balance indicates money owed.

### Details Tab

The Details tab also displays one row for each Asset and Liability account, but the columns displayed differ from the Summary Tab.

Account

- The name of the Asset or Liability account

Dates

- For each date in the Forecast period a column displays the predicted balance of the account on that date. The date columns are in ascending order from left to right.

Total Variation

- The rightmost column displays the predicted difference in value between the balances at the start and end of the forecast. If the predicted end value of the account (in terms of net worth) is less than the start value the whole row is highlighted in red.

### Advanced Tab

The Advanced tab also displays one row of information for each Asset and Liability account. The information is split into columns as follows:

Account

- The name of the Asset or Liability account

Minimum Account Cycle Balance Information

- For each account cycle number <n> in the Forecast period the following columns are displayed:

  Min Bal <n>

- The minimum predicted balance during the account cycle

Min Date <n>

- The date on which the balance reaches its predicted minimum.

Max Bal <n>

- The maximum predicted balance during the account cycle

Max Date <n>

- The date on which the balance reaches its predicted maximum.

Note that all the minimum balances and dates are shown before all the maximum balances and dates.

Average

- The average balance of the account during the forecast period

### Budget Forecast Tab

The Budget tab displays a forecast calculation for all Income and Expense categories. Unlike the Summary Tab, there is one column per month, starting with January of the current year, and ending with the month which includes the end of the Forecast period. The final column is a total, rather than a predicted value or a value calculated based on any predicted value.

### Chart Tab

This displays the Forecast in a chart or graphical form. The level of detail varies depending on the detail level selected on the option above.