You are here: Building Expressions > Functions > Financial Functions

Financial Functions

Unlike other numeric operations in Analyzer, financial functions are evaluated using floating-point arithmetic. For information on other types of numeric operations, see Fixed-point Arithmetic.

When working with financial functions, you should be aware that as with all financial calculations, there are factors that may have a significant impact on your calculations:

Any function that returns an amount will do so to two decimal places, for example, 1250.00
Any function that returns an interest rate will do so to eight decimal places, for example, 0.01676584 or 1.676584%

Calculating Interest Rates

Financial functions are very sensitive to changes in the interest rate. When doing financial functions, it is very common for the interest rates to be divided by constants such as 12 or 365, to create monthly or daily interest rates, for example, 0.08/365 to get the daily interest factor based on 8% per annum.

The normal Analyzer rules for division would result in significant rounding errors in most situations. For example, 0.08/365 will result in an interest rate of 0.00, instead of the actual rate of 0.000219178.

For this reason, the normal division rules are suspended when evaluating interest rate parameters.

When the interest rate parameter in a financial function is the division of two quantities (for example: .08/365), then the two quantities are evaluated separately. They are then divided, maintaining the full precision of the result. Each of the two sides are still evaluated using the standard Analyzer rules for rounding, so in the case of very complex calculations, this solution may still not provide total protection from rounding errors.

Note: When the interest rate is neither a specific rate, nor the division of two simple quantities, (for example: .08/(1/365)) then a warning message is included in the log (and displayed in an alert dialog, if not in procedure mode) warning that rounding may have affected the interest rate calculation. When this occurs, you should ensure that the result returned has not been rounded excessively.

When the interest rate is calculated in a computed field, Analyzer cannot determine whether the rate has been rounded, so you must ensure that the result is correct.

Invalid Parameters

When obviously invalid function parameters are used in a financial function, such as negative periods, the function handles the invalid parameter in one of the following ways:

If the Stop on Numeric Overflow preference is turned on, Analyzer stops processing
If the Stop on Numeric Overflow preference is turned off, the function returns a value of -1.