Skip to content

Forecast Balancing

Forecast balancing checks defined relationships in a segment’s projected financial statements. When the two sides of a configured equation differ by more than the allowed tolerance, DeepFinance can add an explicit adjustment under one or more selected statement accounts.

For example, a balance-sheet rule can enforce:

Assets=Liabilities+Equity\text{Assets} = \text{Liabilities} + \text{Equity}

The adjustment is kept as a separate forecast subline. This makes the amount and its rule visible while preserving the original forecast values.

Forecast-balancing settings belong to each business segment. Within a segment, configure rules separately for its:

  • Income statement
  • Balance sheet
  • Cash flow statement

The engine evaluates rules against the statement values for their applicable forecast periods. Each segment and statement has its own rules, so a balancing adjustment in one segment does not directly balance another segment or the consolidated company.

Forecast balancing is different from business-segment reconciliation. Balancing checks an equation within a segment’s projected statement. Reconciliation compares segment values with a company total.

Each rule compares a left expression with a right expression:

Imbalance=Left value−Right value\text{Imbalance} = \text{Left value} - \text{Right value}

Expressions use statement line keys or codes, numeric constants, and + and - operators. For the balance-sheet equation, the expressions could be:

  • Left: TotalAssets
  • Right: TotalLiabilities + TotalEquity

A rule needs both expressions to produce values in a period before it can be applied. If an expression has no value, the engine records an issue for that rule and period.

Tolerance determines which differences are small enough to ignore. The default tolerance is 0.01. No adjustment is made when the absolute imbalance is less than or equal to the tolerance.

The condition controls which direction of imbalance triggers the rule:

ConditionApplies when
Any ImbalanceEither side is larger.
SurplusThe left value is greater than the right value.
DeficitThe left value is less than the right value.

The condition uses the sign of Left value − Right value. It determines whether the rule runs; it does not determine the sign of the adjustment. The selected balancing account’s equation side determines that sign.

Both adjustment modes preserve the original forecast values and add explicit sublines.

ModeHow it works
Create Plug LineAdds one adjustment subline under a selected balancing account. This is the default mode.
Pro-Rata DistributionAdds adjustment sublines under several selected accounts, weighted by each account’s absolute forecast value.

Choose a BalancingAccountKey and set BalancingAccountSide to identify which side of the equation that account affects. A destination can be an existing statement line or a category in the statement schema. If it is a schema category that is not yet present in the forecast output, the engine creates the necessary category path.

The direction follows the equation. If assets are 120 and liabilities plus equity are 100, the imbalance is +20:

  • A left-side account such as cash must decrease by 20.
  • A right-side account such as debt must increase by 20.

In either case, the adjustment closes the 20 difference. BalancingAccountSide defaults to Right, so set it explicitly when the destination is on the left side.

The generated adjustment key is ForecastBalancingAdjustment_{Id}, using the rule’s stable Id. Keep that ID stable when editing a rule that represents the same reconciliation.

Select ProRataDistribution and provide DistributionAccountKeys. For each period, the engine allocates the adjustment according to each destination’s absolute forecast value divided by the sum of the absolute values of all destinations. Each account receives its own adjustment subline.

If every destination has a zero value, the engine cannot calculate weights and records an issue for that period. The final destination absorbs any rounding remainder so the combined effect closes the equation.

Limit the Forecast Years and Set Rule Order

Section titled “Limit the Forecast Years and Set Rule Order”

StartForecastYear and EndForecastYear are one-based indices relative to the first forecast year, not calendar years. The start and end are inclusive. For a model whose first forecast year is 2027, a rule with StartForecastYear: 2 and EndForecastYear: 4 applies from 2028 through 2030. A missing end year means the rule continues through the remaining forecast horizon.

Rules run in ascending Order. Use this when a later rule depends on values changed by an earlier rule. Rules with the same order have no guaranteed dependency sequence.

This example configures the balance-sheet equation to use cash as its left-side plug account in every forecast year:

{
"ForecastBalancingSettings": {
"BalanceSheet": [
{
"Id": "balance-sheet-equation",
"Name": "Balance Sheet Equation",
"LeftExpression": "TotalAssets",
"RightExpression": "TotalLiabilities + TotalEquity",
"Tolerance": 0.01,
"Condition": "AnyImbalance",
"Mode": "CreatePlugLine",
"BalancingAccountKey": "CashAndCashEquivalents",
"BalancingAccountSide": "Left",
"StartForecastYear": 1,
"EndForecastYear": null,
"Order": 1
}
]
}
}

The expression keys and balancing-account key must correspond to lines or categories available in the segment’s balance-sheet schema. To distribute the adjustment instead, set Mode to ProRataDistribution and configure DistributionAccountKeys with the destination line keys.

A rule can produce an issue if its segment definition is missing, its year range contains no forecast periods, an expression cannot be evaluated, its destination is not configured or cannot be found, or an adjustment cannot be calculated. Review these issues when a forecast does not balance as expected.

When tracing is enabled, the expression evaluations and generated adjustment carry forecast-balancing trace references. The generated rows are marked as forecast-balancing output, which helps distinguish them from values produced directly by model expressions.