The Aggregate analysis transforms a time series so that the values are summed either periodically (each year for instance) or continuously, starting from a specified date. Aggregate is useful when you are working with 'flow' series.


In this analysis, you can define the following settings to determine how the calculation is done:


The window of the calculation is set by the period you choose. If you select 'All' a continuous sum will be performed and you can set a date at which the sum should start.


Selecting this option will express the result as a percentage, so it will calculate the sum and divide by 100.


If you’ve chosen a period other than 'All', you can select 'rolling' to perform the sum on a rolling basis. The window of the rolling sum is the same as the period you have chosen.


Rolling aggregate

In this example, the aggregate analysis is used to calculate an annual rolling sum of the German current account. In other words, the sum is performed on a rolling window of 1 year.

Aggregate by fiscal year

How to calculate fiscal year rolling aggregate on a series from country which doesn't report it like calendar year?


How do I calculate a rolling sum?

There are two main possibilities to calculate a rolling sum:

  • The Aggregate analysis:

Set the 'Period' to the desired rolling length, and to not forget to tick the setting 'Rolling'.

  • Formula:

You can also use the formula

sum(series, window)


sum(usflof8344, YearsLength(2))

This will calculate a 2-years rolling sum on 'usflof8344'.

For more about formulas and how formula language in Macrobond works see  Formula analysis.