The structure of the equity markets has witnessed major changes due to budget pressures, new market regulations, and emerging technology advancements, leading to the evolution of new private exchanges to compete with established exchanges. The exchanges were swift in adopting these regulations and building new technologically robust and functionally advanced trading systems.
Typically, trading systems employ a set of complex rules within their matching engines in an attempt to match buy and sell-side orders on top of handling cancel and replace requests. Depending on the combination of order types, attributes, away market quotes, and rules governing priority and parity, these rules can be very complex. Innovations such as automated trading, 24 X 7 trading, market fragmentation, and changes in underlying technologies such as algorithmic trading have further added to the complexity. In addition, the major challenge driving organizations is the demand for reduced timelines and costs, while simultaneously achieving the desired quality. This has led to the emergence of testing in trading systems.
Testing plays a pivotal role in the efficient functioning of trading systems. As trading systems deal with numerous processes, identifying a range of risks relating basic activities to technical risks would help organizations reduce the chances of failure. To mitigate the risks facing trading systems, a framework for the approach is required, which should include different types of testing such as functional, interface, performance and security. They help in reducing the complexity of the trading systems in terms of technology, speed, functionality, security, and system performance. The approach should focus on the accurate exchange of data, security of data, data flow speed, and storage and backup capabilities.
As trading applications are multi-product and cater to multi-user, end-to-end functionality testing of the application is required. Smoke and unit test cases for each functionality have to be created. The functional or unit test ideally deals with a single piece of the overall functionality and a bundle of such test cases would suffice as a check point. However, for testing the complexity of multiple simultaneous real-time order interactions, a smoke test should be implemented. In addition, regression testing must be implemented on a continual basis so as to ensure that the existing functionalities are not affected when a new functionality is introduced to a system.
Trading systems process vast amounts of data in real-time and accuracy is crucial to avoid huge losses in terms of money and reputation. Interface testing is one of the key tests conducted in order to ensure the quality of software products. In trading applications, interface testing focuses on the data accuracy needs of the system and functioning of the interfaces. Here, the test environment has to be similar to that of the real-time scenario, as the feeds have to function error-free in real-time. This type of testing involves front end test runs as well as back end log verifications.
Needless to say that the loss incurred by stock exchanges due to data leakage would be huge - so testing around the network and interfaces would prove beneficial. Security testing of the exchange includes threat analysis and vulnerability analysis under which threat models are created by taking into consideration all the interfaces and leak points. Threats are identified through security code reviews, network-level, and application-level assessments. The review of the application source code, which is one of the sources of security defects, should be undertaken while the network used to access the application is not vulnerable to any leaks or threats. All the internal and external interfaces of the application must be thoroughly tested so as not to leave any leakage point unattended.
The far-flung usage of electronic trading has elevated the importance of speed in trading applications. The new generation systems work at very high speeds and so response times are critical and must be accurate enough to meet industry standards. It is a given that if functional defects are found earlier in the software development life-cycle (SDLC), this will result in reduced cost and effort in the long term. This principle applies for testing the performance of trading applications, as the loss incurred due to the application downtime or orders not executed in time could be much more than the cost of fixing applications. For example, a one-millisecond advantage in trading applications can be worth $100 million a year to a major brokerage firm. Hence, it has become imperative that trading applications are able to cope with increasing demand for reduced latency while also having the ability to handle peak trade volumes. Performance testing ensures that the right infrastructure to handle huge volumes is put in place by taking into account all the critical drivers, business needs, risks, and performance objectives as well as implementing various workload analysis techniques.
Performance testing would involve testing of the main trading application, its subsystems, and the several interfaces connecting these subsystems. Due to various technological advancements, there might be the demand for running parallel systems or changing the complete trading application. Failover recovery testing, which is a part of performance testing, focuses on verifying the backups provided along with checking the main systemâs performance. Failover recovery testing ensures that the backup to all the elements in a trading application is available all the time, so that the standby can be replaced in case the primary fails. Here, recovery timing should also be taken care of, as in general the backup systems would not be devised to handle too much load.
Ultimately, organizations need to appropriately implement testing to identify numerous bugs and issues, as well as to mitigate any risks and to ensure a trustworthy system is in place. They must ensure that the error-free user-friendly trading systems are available at all times.