6. Building Formulae

This chapter contains the following sections:

6.1 Formula Wizard Screen

To apply interest or charges on an account, you require certain data. For example, to calculate interest for an account you would require the following data:

When you want to apply charges on an account, you may have to specify the conditions for which you would need to apply charges. The amount that is charged may be different for different conditions. For example, you may want to apply charges on every extra account statement that has to be given to the customer.

When you define a ‘Rule’, you specify exactly how such data is to be picked up for calculating either the interest or charge. A ‘Rule’ identifies the method in which interest or charges have to be calculated.

The data required to calculate interest and charges are broadly referred to as ‘data elements’. Data elements are of two types:

Using the System Data Elements and the User Data Elements that you define for a rule, you can create formulae. Formulae connect SDEs and UDEs to give a result. The result of a formula is the interest or charge that has to be applied on an account.

To use a metaphor, SDEs and UDEs are the pillars on which an arch called formula rests. Many arches combine to form a dome called Rule. The things that you choose to put under a dome correspond to account classes (or accounts themselves) to which the rule applies.

You can build arches (formulae) to complete the domes (rules) that you are creating in the ‘Formula Wizard’ screen.

Note

You can define any number of formulae for a rule.

6.2 Building Blocks of Formulae

Element

To build a formula you require certain building blocks. These blocks could be SDEs, UDEs or (the result of) other formulae that you have previously created.

Operators

Operators are symbols that you would use to build mathematical expressions while defining a formula. The following is a list of symbols that you would require to build a formula.

Operator

Description

+

Plus

-

Minus

/

Divide by

*

Multiply

Logical Operators

Logical Operators are indicators of certain conditions that you specify while building a formula. The following is a list of logical operators that you would require to build a formula: ‘AND’ ‘OR’ and:

Operator

Description

AND

the conjunction ‘and’

OR

the conjunction ‘or’

>

greater than

>=

greater than or equal to (please note that there is no space between the two symbols)

<

less than

<=

less than or equal to (please note that there is no space between the two symbols)

< >

Not equal to (please note that there is no space between the two sym­bols)

=

equal to

Functions

The following are the functional operators available while defining a formula:

Operator

Description

ABS

Absolute value of

LEAST

minimum of

GREATEST

maximum of

SUM

the total value of

ROUND

round to

TRUNC

integer part of

FLOOR

round off to the (lower) nearest

CEILING

round off to the (higher) nearest

POWER

to the power of

MOD

the remainder

6.3 Building Formulae

Using the building blocks discussed earlier, you can create or build formulae. You can build any number of formulae for a rule using the SDEs, UDEs and the results of formulae that you have defined for the rule.

The following example illustrates the procedure to create a formula.

Formula to Calculate Interest on Overdraft Account

IC rule is created with formula given below to calculate interest on overdraft account based on value dated balance.

Formula no

Case

Result

Type

Cr/Dr

1

DLY_NET_VD_BAL <0

(OD_INTEREST_­CALC/100)*(DAYS/YEAR)

Booked

Dr

Interest product is created with the above mentioned IC rule and interest is applied on the overdraft account based on rate of interest maintained.