Aspects of Financial Modelling

Looping Structures

The Fetch/Change/Store Cycle

Creating and Destroying Objects

Reverting to Initial Conditions

Flexibility

Speed of Operation

Looping Structures

There are many applications for controlled loops in simulation models and other models where repeated attempts are to be made. Specialised network operators provide the logical equivalent of the FOR and WHILE loops of programming. The equivalence is almost exact, as logical control of inputs and outputs provides similar functionality to the Break and Continue statements in a program. An animated diagram of the interaction of a FOR and GETPUT operator illustrate the behaviour of a logical network.

The Fetch/Change/Store Cycle

A program spends most of its time getting values from a specific location in memory, operating on them and putting them back in the same location. Statements like

A = A + 1
or
MarketValue = MAX(CurrentValue, MarketValue)

are common. These are just the statement that a logical network has most problem with, as it operates directly on the value of the object A. We have introduce the GETPUT operator to handle the process of updating a variable. When a value flows into the operator, it is prompted to obtain the value of a variable and place it on one of its links. The value can then flow out into arbitrarily complicated logic. Only when it flows back into the operator again through another link is the variable updated, without change to the value first outputted. This value is only reset when the initial prompt is removed. To enable correct sequencing, a logical value is output after the variable has been updated. As an example, a cash position needs to be updated for the coupon of a bond and maturity of the bond.

NewCash = OldCash + Coupon

CouponCashed@ EQV GETPUT(NewCash, OldCash, CashCoupons@,  {CashPosition})

When it is time to cash in the coupons, CashCoupons goes true, which prompts the value of CashPosition to flow to OldCash. NewCash obtains a value, which flows in to the GETPUT operator, causing the new value to be set for CashPosition. Only then does the operator put out a logical value to set CouponCashed, allowing the next phase, of maturing the bond, to occur.

Creating and Destroying Objects

A bond portfolio can be represented as a number of bonds, each having a particular maturity date and coupon rate. Each bond is represented as a subnet invocation in the model. The subnet provides the logic that links the attributes of the invocation. Bonds will be bought and sold during the course of a simulation, so new bonds need to be created dynamically. A CREATENET operator creates the bonds, and a script destroys them.

Reverting to Initial Conditions

The DFA model begins with an initial bond portfolio - a collection of objects - and ends with a different portfolio. If the model is to be re-run with a different set of interest rates, it is necessary to recover the starting position. This could be done by reloading the model, which would be time-consuming, or it can be done by backtracking. Using change storage, the starting position of the model can be recovered by undoing the changes made. This same backtrack mechanism can be used to search for successful strategies during operation.

Flexibility

The model has three ways of capturing analytic knowledge

Direct expression of statements in the network
Statements used in scripts
Compiled statements held in operators

Each has advantages and disadvantages. Statements in the network make every element visible and modifiable, but for complex calculations needing to be carried out many thousands of times, the response can be slow. Statements in scripts conceal some of the calculation, but can still be changed relatively quickly, and the network can be used to handle the phasing of calculations. Compiled statements in operators provide the fastest response, with the least flexibility.

Speed of Operation

Speed of operation really covers two different speeds - the speed of carrying out a calculation and the speed of modifying that calculation. Programs are fast when it comes to calculation, slow when it comes to changing them. A halfway house is the use of a spreadsheet framework, with plugins for the major computing tasks. The network approach provides a visibility that the spreadsheet cannot offer, together with a speed approximating that of a program. The comparison in speed of structural change of the model is ridiculous -the program taking weeks, the spreadsheet days, the network seconds or minutes.

Other so-called knowledge based tools have their own algorithm which somehow needs to be distorted or subverted to carry out the task - here, the network assumes the shape of the problem, and can run very much faster, because it is not dragging along a lot of baggage that has no place in resolution of the particular problem. Because it assumes the same shape as the problem, the network is very much easier to think about and to enhance.

The ease of identification of components of the financial model with the financial entity it is modelling is crucial for the acceptance of the results - running a model and obtaining results is of no use if no-one will accept what it says. If the model cannot represent complex strategies, or is only even slightly out of date, then the results are for a non-existent financial entity and can be ignored. Speed of response to structural change and fidelity of modelling are critical issues in producing credible financial models.

Technical Discussion