Clearing and Settlement infrastructure
First and foremost, it is worth reviewing a typical clearing system infrastructure: there is a number of internal components, where each one is responsible for a variety of tasks, or possibly incorporates several tasks at a time. There is a significant amount of connections to the third-party systems, or in-house external systems, such as markets, market data providers, CSD, payment systems, and, of course, there is connectivity with clearing members. Having a lot of experience dealing testing such systems, the Exactpro team is used to encountering challenges on a daily basis. This paper focuses on the ones that are most prominent, and on the way Exactpro addresses them.
Participant structure complexity
Participant structure complexity is a challenge that cannot be avoided: a company may be represented by various entities: these entities might trade at different markets, trade different asset classes and even their margining process can be done in a consolidated way or in segregated currencies. Links between Non-Clearing Members (NCM) and Clearing Members (CM), their changing roles in different markets, the array of accounts, all add obstacles to the picture.
Another point of paramount importance is that the full position lifecycle needs to be taken into account. One lifecycle could span multiple days and include dozens of steps. It would be wrong to focus on a specific point of the clearing process, such as trade input or a settlement session, avoiding the other processes. It is vital to consider all the stages of a position lifecycle to complete the scenario. For instance, to test a Collateral Deficit scenario, we need to input trades, initiate risk computation, receive a margin call, simulate collateral delivery from the member, and then invoke the next round of risk management computation, to be able to see how well the scenario worked. Even more complex is a Delivery Default scenario, which is also a multi-day one: it is necessary to wait until the Settlement Date to perform all the necessary steps involved in the trade, that is called a pre-settlement period, and to simulate delivery failure to initiate the buying process, the cash settlement and so on. The implementation of Corporate Action also requires several days to make sure that all the necessary steps are covered before and after the execution of corporate action.
Risk computation, which is the heart of every clearing system, requires real time and historical data, and is normally based on complex mathematical models. It uses powerful computation algorithms, such as, among others, VaR and Expected Shortfall, yield curve shifts, SPAN, etc. Risk calculation is time-consuming and requires a high degree of knowledge from the tester.
Clearing different asset classes involves different processes in the CCP and different algorithms, with cross-asset-class margining adding even more complexity to the challenge.
Upstream / Downstream systems
There is also the challenge of upstream/downstream systems dependency on the clearing system environment. Such systems have limited availability during testing, so it is extremely important to be able to properly simulate them during testing.
Access to a variety of API endpoints such as FIX, MQ, SWIFT, FPML, as well as custom interfaces, should be supported by test tools during testing.
Innovation in QA. ClearTH
If you combine all the previous points, you will inevitably get a huge test library. That is why Exactpro has come up with solutions to deal with such challenges. We offer the Holistic Integrated Automated Test Framework as one of them. ClearTH is an original Exactpro tool, able to simultaneously execute multiple end-to-end test scenarios. Most of them span days and involve a large number of steps. Moreover, these steps should be aligned with the CCP processes. Using ClearTH, the aforementioned examples of test scenarios (Collateral Deficit, Delivery Default, and Corporate Action), as well as many others, can be performed in batches. Test execution is split into Global Steps, and each scenario is aligned with these Global Steps. This way, we can execute as many scenarios as possible at a time and make sure that we incorporate them into the CCP schedule.
Another case study is verification of RM computation, which usually involves quite complex algorithms. In some cases, we can create a model and perform calculations using our software and then compare the results with the ones achieved by the system under test. In more difficult cases, a number of tests can be run and used as a baseline for future versions of the system. The tool, used by Exactpro to implement this, is called Risk Analyzer. It can represent a separate tool as well, but in this context it is referred to as an essential part of the ClearTH solution.
HiVAT - High Volume Automated Trading
In conclusion, a case study of High Volume Automated Testing is offered for review. Sometimes, it is not enough to have a set of predefined test cases, as certain issues may only arise when the system is under a high load. So, in the first testing round, we input a random load, make snapshots of all the valuable points, aligned with the CCP lifecycle, check logs and verify the consistency, monitor the GUI and the API. During the next round, we execute the test with the new software version or under different conditions (such as failover) and compare those snapshots. If any discrepancy is detected, there is a possible bug in the system.