Exactpro Test Automation Approaches: A Case Study in Risk Management

Introduction

This is a case study about challenges of testing Risk Management systems and our test automation and testing approach developed and implemented for our client, a Central Counterparty responsible for clearing and risk management of CCP-eligible transactions on a leading European exchange.

Challenges

  1. Functional Area:

    the underlying mathematical concepts are quite complex, and large volumes of data are used;

  2. Calculation of Margins:

    Margins are calculated using:

    • the MVP (Method for Portfolio Valuation) methodology for Governments Bonds;
    • the MARS (Margining System) methodology for Equity Derivatives and Equity Cash products;
  3. The Aim of Initial Margin (IM):

    Initial Margin is called on a daily basis to cover theoretical costs of liquidation in order to close the open positions in the worst possible market scenario, within a maximum price variation range called “Margin Interval”. The “Margin interval” is specific for each financial instrument;

  4. Intraday Margin:

    intraday margins are called by the margining system if sudden sharp price variations occur or in the case of a Member’s excessive overall risk exposure;

  5. Default Fund:

    a Default Fund is managed by the system as additional protection aimed at covering risks associated with sharp price/interest rate movements. The Default Fund amounts are calculated as a result of periodic stress tests.

Exactpro Test Automation Approaches: A Case Study in Risk Management

Test Automation Approach

Our Solution is to test by using a model based on simplified assumptions, but replicating the algorithms and calculations done by the system under test, and compare the actual results taken from the system under test with expected test results computed by our model.

Exactpro Test Automation Approaches: A Case Study in Risk Management

A Risk Simulator was developed and integrated with our test harness created to replicate Margin Run activities, including message flows and margin values.

Smart Actions were developed to calculate margin values and perform default fund verification and reporting.

Risk Engine Log Parser and Risk Parameters Analyzer were created to analyze and verify margin and risk parameters based on input data from both Margining and Clearing systems. It provides the user with a possibility to check the actual margin values received in the systems against the calculated expected values.

Case Study: An End-to-End Scenario to Verify the Process and Parameters of Margin Calculation for All Cleared Instruments by Using a ‘Risk-Based Margining’ Algorithm

Exactpro Test Automation Approaches: A Case Study in Risk Management