4.5 QUEUES AND STATUS FLAGS

The business unit that checks and validates the trade inputs uses a queue paradigm to visualized trades. This unit is usually named the treasury control or business control unit, or simply the middle office. To facilitate their job, they have to get a list of trades that demand their attention. Furthermore, they would like to collect trades into separate lists depending on the actions to be performed.

It is natural for them to think of trades awaiting actions as a queue. The validation queue, for instance, can become longer as more and more trades are booked at the trading desks. The validating professionals, attacking the queue from the other end, try to make the queue shorter. By the end of the day, prior to the daily batch processing, the queue has to be cleared.

An in-house trading system has to place all trades waiting for market operations to be performed on them on appropriate queues to enable the middle-office people to locate and process them easily. Market operations can be complicated, with multiple stages of approvals and full audit trails. Figure 4.4 shows a typical process flow as seen by the middle office.

How do we implement the queues? If the trading platform works with a trade-centric paradigm, the queues are merely collections of trades. However, we have to add on status flags as properties of the trade objects to handle queues. Since the trade status is something that needs to be historized and timestamped for audit purposes, it may ...

Get Principles of Quantitative Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.