Navigation: FXLV4SpeedTools > Array totalling and arithmetic functions >

ACCUMULATE Function

 

 

 

ACCUMULATE Function

Accumulates carry-forward values column-by-column or row-by-row, optionally adding a set of constants and factors times the brought-forward value to the brought-forward value to produce the next carry-forward value.
The function is designed to allow this type of calculation with dynamic arrays without the use of circular references/iterative calculation.

This function is based on a suggestion made by Peter Bartholomew.

The ACCUMULATE function calculates recurrence relationships of the form:

Where a is the AddValues parameter and b is the Factors parameter

ACCUMULATE is a non-volatile multi-threaded array function

ACCUMULATE Syntax

ACCUMULATE( [Range_Array] [,StartValue] [,Factors] [,Closing] )

Range_Array (Optional. Default zero)

A range or array of values to be added to the closing balances.

StartValue (Optional. Default zero)

The initial opening value.

Factors (Optional. Default zero)

A range or array giving the multiplying factors to be applied to the opening values and the result added to the closing value.
If only a single factor is given it will be propagated across or down.
The results will be added to the closing balances.

Closing (Optional. Default TRUE)

True returns the closing values of the accumulation, False returns the opening values

 

ACCUMULATE examples

Cumulative Sum

 

Cash Balance with Interest

Starting with a value of 100, an interest rate of 5% each period and a year by year net cashflow, this example uses two ACCUMULATE functions to separately calculate the opening cash balance and the closing cash balance.

 

 

 

 

Copyright © 2024 Decision Models Ltd