Data Aggregation is the process of combining data across multiple model components to produce aggregated or summarized data for further processing, calculations, and reporting purposes.. Data Aggregation occurs at several levels across the SLOPE model structure.
- Individual model points -> Products
- Products -> Portfolio
- Portfolios -> Company
At each level of aggregation, it is possible to define how to aggregation occurs
Model Point Aggregation
Within any given product, the results of calculations from individual model points can be aggregated together. This is controlled by the Aggregation option within the Variable Properties & Documentation section as highlighted below.
This aggregation property determines how the model point results will be aggregated together to create product level aggregated results. The aggregation occurs within each product defined in the Product Set used for a given projection.
There are four types of Product level aggregations as summarized below that can be performed across all model points.
- None - Do not aggregate across model points
- Sum - Add the result across all model points within a product
- Average - Take a straight average of results across all model points (sum of all model point results divided by number of active model points at the current time period)
- First Value - Takes the result from only a single model point, which is the first model point to finish processing. Note that due to the way SLOPE processes multiple model points simultaneously, this may not be the first model point in the model point file.
It is also possible to aggregate subsets of the total model points within each product for reporting purposes. See the Product Output Grouping article to learn about this.
Product Aggregation
The results of multiple product aggregates can also be combined together and fed into a single portfolio level variable. After selecting a portfolio variable, select the product variable aggregate from the Formula Builder by clicking the numbered steps below.
This will add a new formula component that references the results of the product aggregates. Select an available product variable aggregate variable using the drop-down box. Only the names of product variables that have an aggregation property set to something other than None will appear in this dropdown. In the example below, we selected the Cash Flows product variable.
The Timing drop-down box allows data consolidation to be performed either before or after dynamic investment/disinvestment occurs. This only affects aggregation results of Asset products, since Liability products are not affected by the reinvestment logic. Unless you specifically need a result to be after investment, selecting the Before Investment option will typically result in a more optimal run time.
The Operator field allows you to select the type of aggregation to be done across Product Aggregate results. You can select to either add up all results with the SUM operation or take the average across products using the AVG operator.
The Time field allows you to select the Time Index of results to be aggregated. Generally, it is advisable to only select time periods that are before or equal the current time index.
Aggregate Relationships
Portfolio variables that reference the results of Model Point Aggregation do not have an explicit relationship to any one explicit product. Instead, the portfolio variable contains a reference to a Variable Name. This means that the Portfolio Variable that references the name will attempt to find an aggregate calculation result from each underlying product that matches the specific name. If that Variable Name does not exist in the product aggregate results, it will assume a value of zero.
This can lead to some unusual results. For example, if a Portfolio contains two products (as in the example below), and both of these products contain a variable named Cash Flows, but one of the product has an aggregation property set to Sum, while the other product is set to None, then only the results of the first product will be included when read from the Portfolio variable.
The example below shows how changing the aggregation properties of product variables will affect the results at higher levels that rely on these aggregations.
Furthermore, it is possible to have products with different aggregation properties that all feed up to a single portfolio. The results of such a relationship may not produce sensible results though.
Portfolio Aggregation
Portfolio results across multiple portfolios can also be aggregated up to the Company level.
After selecting a company variable, select an available portfolio variable aggregate from the Formula Builder by clicking the numbered steps below.
This adds a Portfolio Aggregate formula component. Select an available portfolio variable aggregate variable using the drop-down box. In the example below, we selected the Cash Flows portfolio variable.
The Operator field allows you to select the type of aggregation to be done across Product Aggregate results. You can select to either add up all results with the SUM operation or take the average across products using the AVG operator.
The Time field allows you to select the Time Index of results to be aggregated. Generally, it is advisable to only select time periods that are equal to or before the current time index..