Skip to content

Variable library

The variable library defines the formulas Autory evaluates for each projection node. Each row assigns a variable to a variable set. The entry points then decide which variable set is used for each hierarchy node and valuation type.

Required columns

In an Excel model workbook, Autory reads variable formulas from these tables:

  • userVarLib
  • masterVarLib
  • GlobalProjectionVariables

The user and master variable library tables need these columns:

VariableSetName
The name of the variable set that contains the formula.
VarName
The name of the variable being defined.
Formula
The formula to evaluate for that variable.

A minimal variable library looks like this:

VariableSetName VarName Formula
Pricing Premium 100
Pricing Commission Premium * 0.1
Pricing NetPremium Premium - Commission

Variable settings

The Variables table stores settings for variables, including:

VarName
The variable name.
VarType
The dimensionality of the variable. The available options are TimeVector and Scalar. See types of variables below.
Format
The output formatting to use in result workbooks.
ResolveAggregation
The aggregation method used when a variable is calculated over multiple loopTable iterations. See loopTable.

If a variable is used in userVarLib or masterVarLib but is missing from the Variables table, Autory treats it as a TimeVector and logs a warning.

Types of variables

Scalar

A scalar formula must produce a single value and must not depend on the time axis. It has a dimensionality of 0.

TimeVector

A time vector may produce a different value for each time step t. It has a dimensionality of 1.

A time vector may be indexed like VarOne[N] to produce a scalar. This gets the value of VarOne at t=N.

An expression such as VectorA[t] is still a time vector, and so is VectorA[t-N], which shifts the values in the time axis by N steps.

Master and user libraries

Autory reads the user library before the master library. If the same VariableSetName and VarName pair appears in both places, the userVarLib row is used. This lets a model override selected formulas without copying the whole master library.

Variable set inheritance

Variable sets can inherit formulas from other variable sets. Autory reads inheritance from these tables:

  • userVariableSetInheritance
  • masterVariableSetInheritance

The tables use these columns:

VariableSet
The child variable set.
InheritFrom
The parent variable set.

For example:

VariableSet InheritFrom
Pricing Common

The Pricing variable set receives formulas from Common, unless Pricing defines the same variable itself. Every variable set also inherits from the built-in global variable set.