• No results found

Efficient Marginal Default and Incremental Risk Charge Calculation Algorithms

N/A
N/A
Protected

Academic year: 2021

Share "Efficient Marginal Default and Incremental Risk Charge Calculation Algorithms"

Copied!
58
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

M.Sc. Computational Science

Track: Computational Finance

Master Thesis

Efficient Marginal Default

and Incremental Risk Charge

Calculation Algorithms

Maksim Chistiakov

11103736

August 29, 2017

Supervisor:

Prof. Dr. Drona Kandhai

Second reviewer: Ioannis Anagnostou (M.Sc.) Daily Supervisor:

Alexios Theiakos (M.Sc.)

(2)

1

Abstract

Incremental and default risk charge models (IRC/DRC) were developed to comply with the Basel regulations and serve to report a value characterizing a default or rat-ing migration risk associated with a certain portfolio of financial instruments. This risk is quantified through calculating a quantile of a simulated loss distribution of the portfolio. Computing marginal impacts of issuers on IRC/DRC is a method aiming at identifying the counterparties towards which the financial institution has an exposure that contributes highly to the level of a certain risk charge.

The question we investigate in this research is whether it is possible to overcome a computational complexity of the marginal IRC/DRC problem without introducing approximation errors. We develop a criterion that helps to reduce the space necessary for solving the problem and proof its correctness in a general case. The criterion is then laid as a cornerstone for an efficient algorithm that computes marginal values. Furthermore, we perform a comparative study in order to identify flaws and benefits of the proposed algorithm.

Keywords: Basel, BCBS, FRTB, Risk Charge, DRC, IRC, GPU, CUDA, Monte Carlo.

(3)

2

Acknowledgements

I would like to thank Drona Kandhai for his insightful supervision, and for giving me an opportunity to start my professional endeavour in a field of my deep interest. I thank my daily supervisor Alexios Theiakos for his guidance, support and ideas, and for sharing his vision of the way to build software. I am grateful to Ioannis Anagnostou for reviewing and assessing my work.

I would like to acknowledge all my ING colleagues, especially Thorsten Gragert and Markus Hofer for challenging my understanding of the topic, for their valuable feedback and insights they shared with me. I truly appreciate the friendly and encouraging research atmosphere within the ING quants team.

(4)

CONTENTS 3

Contents

1 Introduction 4

2 Literature Study 6

2.1 Regulatory Framework . . . 6

2.2 The Quantile Function . . . 9

2.3 Incremental Risk Charge . . . 9

2.4 Default Risk Charge . . . 11

2.5 Related Work on Quantile Estimation Algorithms . . . 12

3 Scope of the Problem and the Research Question 15 3.1 Marginal IRC/DRC . . . 15

3.2 Current marginal IRC/DRC algorithms . . . 16

3.2.1 The ”P” algorithm . . . 17

3.2.2 The ”R” algorithm . . . 18

4 Methods 20 4.1 Purpose Of The Algorithm . . . 20

4.2 Design Of The Proposed Algorithm And Its Justification . . . 20

4.2.1 Characteristic Value Of One Scenario . . . 21

4.2.2 Threshold For Matching Characteristic Values . . . 22

4.2.3 Criterion For Choosing Scenarios . . . 23

4.3 Algorithm Formulation . . . 24

4.4 Example Calculation . . . 26

5 Results 29 5.1 DRC Simulations and Monte Carlo Error . . . 29

5.2 Marginal DRC . . . 31

5.2.1 Computing Marginal Values on a Real Portfolio . . . 31

5.2.2 Visualizations Related to the New Algorithm . . . 32

5.2.3 Benchmarking of the Proposed Algorithm on Synthetic Portfolios . 37 5.2.4 Benchmarking on Generated Data . . . 39

5.3 Benchmarking on a Real Portfolio, Comparative Study of ”P”, ”Q” and ”R” Approaches . . . 41

6 Conclusions and Future Directions 46

Appendices 47

A Example of marginal calculations 47

(5)

1 INTRODUCTION 4

1

Introduction

The analysis of risks faced by a financial institution is key to the financial stability of a business unit and the world economy overall. This analysis implies understanding how and when uncertainties arise and estimating the impact of adverse outcomes in quantitative terms. The results of the analysis are then used to steer financial decisions of the organization.

Various mathematical models are designed to understand the influence of the uncer-tain parameters beyond an institution’s control on factors that express the performance of the institution. Reasoning based on the outcomes of such models helps to justify the adequate capital the institution should hold in order to maintain its solvency even in harsh financial environment circumstances. To draw insight from these models it is often necessary to evaluate them on real datasets and portfolio configurations. In this aspect modern risk management methodologies rely on computer experiments through Monte Carlo simulations. With this work we investigate the extensions of Incremental Risk Charge (IRC) and Default Risk Charge (DRC) models that were built to comply with Basel regulations. In essence, the Monte Carlo models to compute DRC/IRC return one value that corresponds to a quantile of a loss distribution of the entire portfolio. In day to day operations, this value is not sufficient for making decisions on preferred portfolio composition. To identify undesirable positions, the total portfolio DRC/IRC must be attributed to contributions of individual issuers. This in turn requires having full Monte Carlo simulation results with one issuer at a time being excluded, thus not providing any contribution to the loss distribution from which we compute DRC/IRC.

In this work such quantiles are called marginal DRC/IRC, or simply marginals. The optimal approach to compute marginals should be efficient in both space and time. In this study we in fact aim to find an algorithm with optimal trade-off between complexity in time and in space. Another requirement in terms of the algorithm design that we have to satisfy is the absence of additional error. Since we are in fact investigating tail effects, any additional error introduced during simulation phase may lead to a dramatic change in the overall output that the model provides. It is known from the literature that there are many algorithms designed to approximate quantiles that also introduce a certain error to mitigate the space requirements. We provide an overview and particular references to such algorithms in Section 2.5.

It might seem reasonable to expect that any algorithm designed to achieve better performance in space will result in some additional approximation error. However, due to the specifics of our problem, namely the requirement to submit the marginal DRC/IRC numbers to the regulator, we can not afford any additional error on top of the Monte Carlo estimate. It is obvious that financial stability is an important issue for a financial institution like a major bank, thus in most cases concerning risk management of the bond and equity portfolio, the exact algorithm would be preferred over the fast one, as the price of the additional error can be too high. Therefore in order to provide a solution that would not only have a theoretical importance, but could also be adopted by the financial industry we have to make sure that the marginals are exactly the same as that

(6)

1 INTRODUCTION 5

computed by conservative algorithms.

To summarize, the question we investigate in this research is whether it is possible to overcome a computational complexity of the marginal IRC/DRC problem without loosing the precision. The condition of not allowing any information loss makes the problem nontrivial. We answer this question by proposing a criterion described in Section 4.2 and justify its applicability by proving that it holds for any possible set of input data. Next, we design an algorithm based on the proposed solution and provide a performance benchmark in a form of a comparative study with respect to the previously used approach. These numerical experiments are conducted on real portfolio datasets. The algorithms are implemented in CUDA C++ in a way that a high parallelization of computational tasks is achieved.

We elaborate more on the idea described by the above mentioned criterion and generalize the principle behind it. In this thesis it is shown to work for any problem of a similar kind. The performance gain of the algorithm however strictly depends on the nature of each individual problem and resulting properties of the input data. Despite the fact that we mostly target the problem of computing marginal IRC/DRC, we also provide the study of the efficiency of the algorithm on the data generated to specifically trigger the worst case performance.

By conducting above mentioned steps we solve a practical problem that arises for many financial institutions under FRTB-related regulations. We thus contribute to the process of efficient position keeping and reporting of the values required by the regulator.

(7)

2 LITERATURE STUDY 6

2

Literature Study

In this chapter we summarize the literature available on several different topics. First, in Section 2.1 we first analyze the historical evolution of Basel regulations. Basel Committee on Banking Supervision develops the regulatory framework for multiple decades, and it is important to see what logic lies behind the initiation of risk charge models. Through conducting a literature study we also place the models in a right context, providing a high-level overview of other related regulations.

In Section 2.2 afterwards follows a brief definition of a quantile function relevant for both models we discuss.

In next section we introduce the models of Incremental Risk Charge (IRC) and the Default Risk Charge (DRC) developed by a financial institution to comply with

Basel II and Basel 2.5 regulations. These models serve as a foundation of this research work, which we will establish in Sections 2.3 and 2.4. We first define a concept of quantile function that is relevant for both models.

Next, the methodology of this research was developed to address the issue of absence of the algorithm that would satisfy our needs. We show that this is indeed the case in Section 2.5. We look at some of state-of-the-art quantile calculation algorithms and mention their properties that are important in the context of the problem we are trying to approach.

2.1 Regulatory Framework

The Basel I commitment in 1988 was the first major step in addressing regulation of internationally active banks [7]. It was enforced by law in the Group of Ten (G-10) countries in 1992 [14]. It primarily focused on credit risk and appropriate risk-weighting of assets. Assets of banks were classified and grouped in five categories according to credit risk. Banks with an international presence are required to hold capital equal to 8% of their risk-weighted assets (RWA). Basel I suffered from its limited scope, excluding market and operational risk. The introduction of capital requirements for market risk was the consequence of the collapse of Barings in 1995 [20]. The result was the 1995/1996 market risk amendment to Basel I.

Basel II commitment began to negotiate in 1999 and is finally published in 2006 [1] and provided a major guideline regulation. Basel II was built on three pillars: minimum capital for credit, market and operational risk, a supervisory process both internal and external, and disclosure of information, letting market discipline to reward banks that carry out a sensible criteria management. Basel II furthered in terms of self-regulation, allowing banks to assess their own risks, as a result of developing an internal approach for banks that require complex and advanced estimation methodologies. One of these risk estimation methodologies was an Incremental Default Risk Charge initiated since 2006.

The review of Basel II arose as a consequence of the series of shortcomings displayed by the 2008 financial crisis [8] in the aftermath of Lehman Brothers collapse [18]. The insufficient capital requirement for trading book exposures prior to the 2007-2008 period

(8)

2.1 Regulatory Framework 7

was in part responsible for the difficulties that some firms suffered. An ambiguous definition of the regulatory boundary between the banking book and the trading book left the way open to regulatory capital arbitrage in order to reduce the financial buffer of capital for unexpected losses fixed by the regulation. The main difference between both books is that banking books consist of portfolios that are supposedly hold until maturity, while trading book instruments are regularly traded. Assets in the trading book are marked-to-market daily, assets in the banking book are held at historic cost.

At Basel II initiation times, the value-at-risk for assets in the trading book is cal-culated at a 99% confidence level based on a 10-day time horizon. The value-at-risk for assets in the banking book are calculated at a 99.9% confidence level on a one-year horizon. This was amended in 2009 by the Basel committee when it was recognized that banks would incur a lower risk charge by holding assets in the trading book rather than in the banking book. It was also recognized that the losses incurred in 2008 were resulting from widening spreads due to credit downgrades and loss of liquidity, and not the result of defaults. An incremental risk charge (IRC) was agreed upon in 2009 to account for this, as part of Basel 2.5 [5]. Due to huge losses that banks suffered in 2008, Basel Committee decided to include migration risk in the regulatory requirements. This regulation became inconsistent with the current model and IRC development was initi-ated. The IRC requires banks to calculate a one-year 99.9% value-at-risk measure for credit-sensitive products in the trading book, and also to account for the risk of credit downgrades. In addition, risk measurement methodologies were not sufficiently robust. Internal models for market risk requirements relied on risk drivers determined by banks, which has not led to sufficient capital for the banking system as a whole. Later, Basel 2.5 introduced stressed value at risk (or SVaR) as an additional capital requirement calculation step. The idea behind SVaR was that under stressed conditions banks may require more capital. SVaR was introduced in order to alleviate the inadequate capital requirement established by the previous regulation. This regulation update also intro-duced standardized charges for securitization and re-securitization positions, which were removed from internal models that were not considered robust enough for these assets. Such exposures were now treated as if held in the banking book.

A market risk framework was revised in Fundamental Review of the Trading Book (FRTB), an initiative of the Basel committee and a set of standards that were finalized in January 2016. FRTB replaces the current incremental risk charge (IRC) with a default risk charge (DRC) as the modeled measure for default risk that projects losses over a one-year capital horizon at a 99.9% confidence level.

Further, FRTB addressed unattended issues and shortcomings of Basel 2.5. The FRTB has stringent rules for internal transfers between trading and banking book with the purpose of eliminating capital arbitrage. It limits the institution’s ability to move illiquid assets from its trading book to its banking book. Before FRTB liquidity was inadequately captured, as the assumption was made that banks can exit or hedge their trading book exposures over a 10-day period without affecting market prices. In FRTB framework, the concept of liquidity horizon is introduced, that can be defined as the time required to exit or hedge a risky position without materially affecting market prices in

(9)

2.1 Regulatory Framework 8

stressed market conditions. Another weakness of Basel 2.5 that was fixed in updated regulation is VaR-type measures, being just percentiles of the profit and loss (P&L) distribution, are criticized for not capturing exposures to some risks fairly. Consequently, the banking sector had entered the crisis with too much leverage and inadequate liquidity buffers.

Overall, Basel regulation pillars are minimum capital requirements (to which DRC and IRC belongs), supervisory review process and enhanced disclosure. The high-level overview of the changes from Basel 2.5 to FRTB in the first pillar [13] are shown on Figure 1.

Figure 1: Minimum capital requirements of FRTB compared to Basel 2.5

Source: Ernst and Young LLP, FRTB: The revised market risk capital framework and its implications [13]

Basel III regulations overall prescribe how to assess risks, and how much capital to set aside for banks in keeping with their risk profile [2]. Regulations aim to provide resilient banking through liquidity regulations and to make financial sector better absorb shocks from economic stress. Basel III is supposed to be implemented until March 31, 2018.

Talking in more details about the first pillar (minimum capital requirements), it can be outlined that main changes from Basel II concern capital conservation buffer. Capital requirements were increased (in terms of its quality and quantity), core capital becomes 7% of risk-weighted assets.

Basel III aims to reduce leverage, while there are also liquidity reforms happening. The new leverage ratio introduces a non-risk based measure to supplement the risk-based minimum capital requirements. The new liquidity ratios ensure that adequate funding is maintained in case there are other severe banking crises.

(10)

2.2 The Quantile Function 9

2.2 The Quantile Function

Given a vector ~A of length NA, the q-th percentile of ~A is the value number dq · 0.01 · NAe

in a copy of ~A sorted in ascending order. Ceiling function is necessary since we do not use any interpolation between values in ~A. Here q is expressed in percentage. In other words, percentile is a measure indicating the threshold below which observations in a certain set would fall q percent of the time.

In this work we denote the q-th percentile of the vector ~A as Qq( ~A). For example,

Qq( ~A) is the same as the median if q = 50, the same as the minimum if q = 0 and the

same as the maximum if q = 100.

2.3 Incremental Risk Charge

In this section a stylized summary of IRC model is provided. The focus of this summary is on explaining specific parts of the model relevant for the problem that is discussed in this work.

The IRC model is used under the Basel 2.5 framework to estimate the one-year financial impact of default and migration risk of unsecuritised credit products with a confidence level of 99.9%. The risk is estimated using simulations. Under the current rules for capital calculations, default and migration risk for credit instruments is captured by Incremental Risk Charge. Migration risk refers to upgrading or worsening ones credit ranking and credit grade over time. The IRC model should cover all positions in the trading book subject to specific interest rate risk.

For the IRC, ING is using the Internal Model Approach. An asymptotic single risk factor model is implemented, as proposed by Basel committee [9], [11].

Next, some important structural aspects of the IRC model are outlined. First, the model is based on the assumption that all the issuers are correlated with one factor, which is common to all issuers. This factor represents the overall state of the economy. Similarly to the model that was previously in use, IRC is based on one-factor Gaus-sian copula, which serves to find credit-change index. This aspect of the model is derived from a publication of CreditMetrics [17]. The overall credit risk of a counterparty in this publication is broken down to systemic and idiosyncratic components. The systemic risk describes the influence of the uncertainty resulting from the global financial situation on all counterparties. In one scenario this is a common factor to all issuers. Their response and the impact on the total performance however varies.Another uncertainty component is the idiosyncratic risk, it corresponds to each issuer’s individual performance.

In the IRC calculation workflow, first a systemic component of credit-change index is modeled. It is drawn from the standard normal distribution. Then the algorithm loops through all the available issuers. For each of them, idiosyncratic risk is likewise drawn from the standard normal distribution. The transition of credit rating or a default of a certain entity is determined by a credit-change index X which follows a standard normal distribution.

The one factor Gaussian Copula Model for credit-change index X is implemented as shown in Equation 1.

(11)

2.3 Incremental Risk Charge 10

X =p1 − ρY +√ρZ (1)

where,

X − credit-change index (before binning), X ∝ N (0, 1);

Y − an idiosyncratic component. Unique to an issuer, Y ∝ N (0, 1); Z − a systemic risk component. Shared by all issuers, Z ∝ N (0, 1); ρ − correlation between an issuer and the state of the economy, ρ > 0.

Both components of the index are assumed to be mutually independent. The cor-relation between the issuer and the overall state of the economy in the IRC model is calculated using the Basel II correlation formula. The equation uses the probability of default of the issuer as input. The probability of default is derived from the transition matrix that depends on the rating provided by the Issuer Risk Report database.

The formula and k-factor parameter (equal to 50) have been derived by analysis of data sets from G10 supervisors. The Basel Committee has analyzed historical time series to determine the correlation. Their research indicates that the correlations decrease with increasing PDs.

Equation 2 is used to compute the correlation.

ρ = 0.12 × (1 − 1 − e

−50×P D

1 − e−50 ) + 0.24 × (1 −

1 − e−50×P D

1 − e−50 ) (2)

The correlation ranges between 0.12 for issuers with a high probability of default and 0.24 for issuers with a low probability of default. The following interpretation applies to the equation; the higher the PD, the higher the idiosyncratic risk component of a borrower, and hence the default risk depends less on the overall state of the economy.

X serves as an input value to the procedure of determining the new rating. The index is divided into bins of corresponding rating transition probabilities. Bin thresholds are derived from transition matrix.

Therefore a new rating either stays in a bin it used to belong to, or switches to a new bin. Based on the new value corresponding to a bin that contains credit change index after simulating the corresponding scenario, the financial impact of the migration or a default can be determined.

The financial impact (FI) depends on the product type of the position (bond or credit default swap). In case of the migration to another rating the FI calculation is based on credit spreads and can be figuratively represented as follows:

F I = CS01 × (Credit Spreadold rating− Credit Spreadnew rating)

FI is zero if the rating stays constant. If the issuer goes into default, F I = EAD − F × (1 − LGD). Here EAD denotes exposure at default, F is the notional and the loss given default is represented as LGD.

After simulating all issuers’ credit indexes and liquidity horizons, the vectors with financial impact of all simulations are added up. The IRC capital value is the 99.9’th percentile of this total vector.

(12)

2.4 Default Risk Charge 11

IRC model therefore can be summarized as follows. In one scenario, for each issuer we estimate the credit-change index. Based on the value of this index, either the migration, default charge or zero is assigned to each issuer’s loss. The total scenario loss is the sum of all the migration/default losses caused by all issuers. 20 million scenarios are simulated. We therefore have a vector of 20 million values as an output, from which the 99.9’th percentile is the IRC.

2.4 Default Risk Charge

We now cover all the relevant aspects of the Default Risk Charge (DRC) model. As a consequence of events described previously in Section 2.1, the new Basel regulations provided a different vision of the appropriate model for risk factors. To adhere to this vision, the DRC model was developed. The design of this model we describe here is in fact an interpretation of the DRC framework as published in BCBS instructions [6]. The model has been refined based on several consultative documents subsequently issued by the Basel committee [3], [4].

As a consequence of the need to increase the number of risk factors for DRC, a multi-factor Gaussian copula model was developed. This is basically an extension of the one factor Gaussian copula model currently adopted for IRC.

To estimate the DRC, we first need to define a set of factors that represent the geographical regions and sectors of the economy. For each of these regional and sectoral factors an index is chosen that encodes their performance e.g. MSCI indices [21]. The correlations between time series corresponding to these factors are then measured. For this a ten year window with a period of market stress is chosen. As an output of this procedure the correlation matrix R is obtained.

The next step is to map all issuers to one region and one sector. For instance, a Dutch bank would be mapped to the regional factor ”Europe” and the sectoral factor ”Financial Sector”. The correlations between the issuer and both factor indices are measured and written into issuer specific correlation matrix as it is shown in the Equation 3. The matrix is then Cholesky decomposed to matrix ˆC and will be used at a later stage.

Ri=

 

1 Rf actors[fi,1, fi,2] ρi,1

Rf actors[fi,1, fi,2] 1 ρi,2

ρi,1 ρi,2 1

 (3)

Rf actors[fi,1, fi,2] − factor-factor correlations

ρi,1, ρi,2 − correlations between the issuer and the factors

Similar to IRC, the DRC value is estimated through a simulation. We will now briefly take a look at the procedure of calculating a total financial outcome of one scenario. First, for each sector and each region, a standard normal random number is generated. We store these generated values and start processing each issuer. For each issuer we generate one more standard normal that represents its idiosyncratic contribution. We

(13)

2.5 Related Work on Quantile Estimation Algorithms 12

find the region and sector that matches this particular issuer and select the corresponding random numbers.

Then, all three random numbers describing the issuer (one for the sector, one for the region and one for the idiosyncratic) are correlated through multiplying ~I by a ˆC matrix.

We thus get the credit-change index Xi of the issuer we are currently evaluating.

Based on matching a threshold obtained from the PD of issuer and Xi we find whether

the financial impact of the default of the issuer should be added to a total scenario loss Ti. In cases were no default occurs the contribution of issuer i is set to zero.

By going through all the issuers and all the scenarios the vector with the cumulative financial impact across all issuers per scenario, ~T , is created and subsequently sorted. From this vector a 99.9% quantile is taken, which is the DRC value.

Note that the scope of the DRC model excludes the migration charge, thus no rating transition events occur.

It is important to underline that the format of the output of the DRC model is thus very similar to the one we had for an IRC model, a vector of the loss distribution. The procedure of finding the quantile from this distribution is exactly the same in both models.

2.5 Related Work on Quantile Estimation Algorithms

In this section we provide an overview of diverse quantile estimation algorithms that were already described in the literature. Since at its core the problem of computing ordinary or marginal IRC/DRC values concerns estimation of a quantile of a certain empirical distribution, we dedicate this section to the analysis of previous work on this topic.

Currently, in many applications the questions of managing and analyzing large amounts of data become increasingly important. Although the nature of the data differs vastly, making insights from it often implies describing data represented in form of distri-butions. If the data follows a known distribution it might be sufficient to approximate it by fitting parameters of this distribution. In case of the distribution of losses originating from DRC/IRC models we are however forced by the regulator to use a non-parametric method of describing a distribution, which is a quantile.

Describing distributions by calculating quantiles is also common in other industrial applications. Telecommunication industry, database management, healthcare informa-tion systems and many others have corresponding interest in computing quantiles. The priority in solving quantile calculation problem is different for all these areas however, as they pursue different goals. Hence, some algorithms were designed with a speed of adding new observations in mind, while others aim for a quick quantile computation. There are algorithms that allow for extraction of several quantiles from different parts of the distribution, and others in contrast are dedicated for extracting only extreme quan-tiles, like 99.9. Finally, the tolerance of algorithms to additional approximation error varies.

(14)

2.5 Related Work on Quantile Estimation Algorithms 13

The discussed problem has show to be not trivial and drew attention of academic researchers as well. This resulted in a work on classification of the algorithms and attempts to develop a general purpose quantile estimation algorithm.

For the purpose of this work we aim to identify possible algorithms that would allow for efficient compression of marginal loss distributions, which are introduced in Section 3.1. No matter which algorithm we would choose for solving marginals problem, it would have to be implemented on a GPU. This imposes significant limitations on the set of acceptable solutions. As a matter of fact this means that all the performance guarantees we see in the literature regarding the algorithms are only partially applicable in our situation, as the implementation of these algorithms on a GPU could imply redesigning their parts due to the fact that some operations might not be directly supported by CUDA/OpenCL, and there are significant limitations on the programming style overall [12]. We aim to find a solution that would be efficient in space or in time, thus solving a problem explained earlier in this section. Therefore, the desired solution would reduce computational complexity of the overall marginal IRC/DRC algorithm from one of these directions. We however do not aim at providing a comprehensive summary of all the algorithms, which could be a topic of a separate research.

A large part of current research is dedicated to a so-called streaming quantile model [19]. This model is characterized by the fact that the algorithm does not store the entire distribution from which the quantile is taken. In some variations of the algorithm, the size of the vector representing the distribution may be not exactly known in advance.

This model is in principle applicable to a marginal DRC/IRC problem. The amount of space dedicated for each of the data structures aimed at storing intermediate values would be defined by multiple factors, like the total available memory, number of issuers in a portfolio or the number of scenarios per simulation.

The intermediate data structure which is used to extract the quantile can either be updated with possible insertions and deletion of elements (turnstile model), or only with insertions (cash register model). The notable example of the latter is an algorithm designed by Greenwald and Khanna in 2001, [16] which is considered to be the best in this category both theoretically and empirically [15].

In case the algorithm is only allowed to compare elements without computing new elements out of them is called the comparison model. The amount of this elements can be limited, this way the fixed universe model is defined. An example is the q-digest algorithm designed by Shrivastava et al. [22].

Within these types there exist deterministic and non-deterministic (randomized) al-gorithms. Even the name of the randomized algorithms suggests that they don’t fit the regulatory framework, with a certain small but non-zero probability that the quantile computed using them can dramatically differ from the true quantile.

A detailed performance overview and a comparative study of leading exemplars of mentioned types of algorithms has previously been conducted [24]. It shows that all investigated algorithms have almost the same update time, while the level of inaccuracy and space requirements vary.

(15)

2.5 Related Work on Quantile Estimation Algorithms 14

introduced by any streaming quantile algorithm that uses less than linear space. This is a major concern regarding this type of algorithms.

Moreover, in many of the algorithms the error is proportional to the size of the data that is allowed to be stored. If the number of issuers included in a portfolio will grow, in order to achieve the same precision in terms of computing quantiles, the algorithm for computing marginals would have to process them in more batches to allow for the same level of error.

Another problem for quantile summary algorithms is that update time is propor-tional to the amount of observations. This makes the marginal DRC/IRC algorithm very inflexible in terms of the number of scenarios that algorithm can overall efficiently process.

Given that additional error would be added to marginal DRC/IRC calculations, the financial institution reporting these values would need to justify the nature of the error towards the regulator. This implies explaining the nature of the error and explaining why it is unavoidable.

Having conducted the review of the current research on the problem we can state that there are no methods that exactly satisfy our requirements. Thus, in search for a method that does not add any approximation error and helps to save significant amount of space we have to analyze the specific details of the problem.

(16)

3 SCOPE OF THE PROBLEM AND THE RESEARCH QUESTION 15

3

Scope of the Problem and the Research Question

In this section, we discuss the main research question of this study. To start, the the definition of the marginal IRC/DRC is given. It is important to note that marginal algorithms rely on a different computational approach than that required to compute single IRC or DRC figures.

We then show how the computational complexity of estimating marginals retains us from solving the problem in practice and motivates us to look for an approach that would be more efficient. Two naive solutions are further discussed together with the corresponding limitations. Subsequently, in Section 4 we propose a novel way of ap-proaching the problem, and explore how it leads to a trade-off between complexity in time and in space.

3.1 Marginal IRC/DRC

In this section we discuss the concept of a marginal risk charge computation, regardless of the model, DRC or IRC.

This concept implies an approach that allows to explain how the total IRC/DRC number builds upon contributions of individual issuers. As we will see in Section 3, this is a problem of outstanding computational complexity. In the context of models developed to comply with Fundamental Review of Trading Book (FRTB) [10], which we discussed in Section 2.1, this is also a problem of exceptional importance in the financial sector, as solving it allows to influence steering of banks’ decisions with respect to how it should manage its financial positions to achieve a certain level of the default or incremental risk charge.

Suppose a matrix of real numbers ˆL. Its dimensions are known in advance. ˆ

L : Li,j ∈ R, i = 1 . . . Nsc, j = 1 . . . Niss (4)

where Nsc is the number of scenarios used in simulation and Nissis the number of issuers

in a portfolio. Matrix ˆL thus contains all individual financial impacts of all issuers across all scenarios. Financial impact can be caused by migration or default of a counterparty, depending on the model used. It can be of deterministic (the FI of default is constant per issuer) or stochastic nature. Finally, it can be obtained over just one period, or aggregated over several periods depending on the model settings. ˆL can be considered as the ”raw output” of the simulation.

Next, we need to calculate a quantile of a profit and loss vector, ~T , which represents the cumulative financial result for each scenario of the simulation across all the issuers. One element of ~T thus matches one scenario and is calculated as the sum of all financial impacts of individual issuers.

~ T : Ti = Niss X j=1 Li,j, (5)

(17)

3.2 Current marginal IRC/DRC algorithms 16

After estimating the total loss per scenario of a certain simulation we can plot ~T in a form of the histogram, where each bin corresponds to a certain interval of losses. Thus the histogram would show the amount of scenarios that had a cumulative loss within this loss interval. We thus can call ~T an empirical loss distribution of the model.

DRC/IRC is therefore a measure defined for the entire portfolio. In addition to this value it is also important to know how the quantile of ~T depends on the contribution of each individual issuer in the portfolio. We define marginal DRC/IRC with this purpose. By analyzing these values it is possible to infer to which extent DRC/IRC would reflect the change in exposure toward a certain counterparty.

DRC/IRC output is directly used to motivate the certain amount of capital that has to be set aside to absorb possible credit risks. With this respect marginals help to explain the nature of this capital value. This information then influences the financial decisions of the institution with regard to managing the portfolio of instruments that fall under the credit risk.

We define the ”marginal” vector ~Mr as follows:

~ Mr = Niss−1 X j=1, j6=r ~ Lj = ~T − ~Lr (6)

We will also further refer to this vector as a marginal loss distribution with respect to issuer r.

Let each element Mr

i, i = 1 . . . Nsc, r = 1 . . . Niss of ~Mr be defined as:

Mir=

Niss−1

X

j=1, j6=r

Li,j = Ti− Li,r (7)

Marginal DRC/IRC is then deduced from each marginal vector in a similar way as DRC/IRC from a full portfolio profit and loss vector, i.e. we calculate quantiles Qq( ~Mr)

of marginal vectors ~Mr.

3.2 Current marginal IRC/DRC algorithms

In Section 3.1 we have shown how marginal IRC/DRC values are computed conceptually. However we did not yet introduce exact algorithms to do so. We will now close this gap by providing the so-called naive algorithms to compute marginals Qq( ~Mr) for both models.

We then focus on the estimation of the requirements for the naive algorithms in terms of space and time.

The problem of computing marginal IRC/DRC by simulation, introduces a high level of computational complexity. We can estimate the total amount of samples across all Monte Carlo simulated scenarios required to compute all marginal contributions to be of the order of 2 · 1010, the explanation of this estimate is given in Equation 8.

(18)

3.2 Current marginal IRC/DRC algorithms 17

There are two obvious options to conduct quantile estimation for this set of data. Next we will cover both of these cases and describe the limitations for each of them.

Note that we require all algorithms to be executed on a Graphics Processing Unit (GPU). Specifically we will be using Nvidia Tesla K20Xm GPU for benchmarking, which has 6144 MB of memory. This sets additional constraints on space requirements of the algorithms that can be considered acceptable in practice. We also aim to avoid large amount of data transfer between host (CPU) to device (GPU), as this is a common bottleneck in parallel algorithms.

3.2.1 The ”P” algorithm

First, we could gain marginal contributions by sequentially computing portfolio loss distribution with respect to each issuer (vector ~Mrdefined in Equation 6) that is simply

excluded from corresponding Monte Carlo run. This would imply that at a time we would need to store only one loss vector and thus can easily estimate the maximal amount of memory required. This memory requirement is equal to that of a simple DRC/IRC algorithm and is calculated in Equation 9. Here and further on we imply that all numbers are stored in a computer memory in double precision format and occupy 8 bytes [23]. We denote space required to store one such number as Fdouble.

Pspace = Nsc· Fdouble≈ 2 · 107 · 8 = 160 (MB) (9)

We would however need to conduct a separate simulation for each issuer. This could be considered inefficient as we do not utilize the data that was already generated for other issuers. The obvious limitation of this approach is high computational cost in terms of time required to process all the Monte Carlo simulations. The time of running a DRC application that efficiently utilizes GPU processing power to parallelize generation of scenarios for Monte Carlo method is 60 seconds. For a set of subsequent marginal simulations the application does not not need to read all the portfolio data repeatedly. Thus, one marginal application run is less demanding than an entire DRC run and takes approximately 50 seconds. Total time requirements are then estimated in Equation 10.

Ptime= Niss· tmarginal ≈ 103 · 50 =

= 50000 (sec) ≈ 14 (h) (10)

For further convenience we label the approach described here as ”P”. This method of computing marginals for IRC model was adopted. However, in industry DRC and all corresponding marginals are computed on daily or even on ad-hoc basis. Financial decisions taken in order to optimize the portfolio with respect to a target IRC/DRC value can therefore be influenced by the latency of an application that computes marginals. Hence, the solution with a high computational time is strictly undesirable.

(19)

3.2 Current marginal IRC/DRC algorithms 18

3.2.2 The ”R” algorithm

Another option would be to store an entire loss matrix as an intermediate result and then to calculate loss distribution for each individual issuer. This would imply that in order to calculate all Qq( ~Mr) the loss matrix is then partially summed, sequentially

excluding one column at a time corresponding to each particular issuer. The result of the summation is the marginal loss distribution ~Mr, from which the quantile Q

q( ~Mr) is

then taken. We will name this approach ”R” henceforth.

The major bottleneck we encounter in this case is the amount of space required to store the entire loss matrix. This data structure has a significant size, having row number equal to the number of simulations and number of columns corresponding to number of issuers. Given similar conditions to the ”P” approach, we compute the exact requirements in Equation 11.

Rspace = Nsc· Niss· Fdouble ≈

≈ 2 · 107 · 103 · 8 = 160 (GB) (11)

It is important to note that the estimation of time complexity of this algorithm is done theoretically as we did not explicitly measure the overhead required to process all the marginals for the ˆL matrix of size Rspace at this step. That is explained by the

fact that the ”R” algorithm is provided here for the purpose of illustrating the overall computational complexity of the problem. In fact an attempt to run this algorithm would hit the objective limitations mentioned below. We thus round the computational time of ”R” algorithm to the very minimum possible and neglect the time overheads toverhead for transferring ˆL from GPU memory to RAM and for processing it.

Recall that to take quantiles of all the marginal loss distributions we need to first sort them. Given the size of the stored matrix, for this approach the sorting overhead becomes significant. This additional computational time heavily depends on the choice of the algorithm.

Sorting could be done sequentially, processing Niss marginal loss vectors on a CPU

with high clock frequency one by one. This approach would benefit from the fact that less data transfer would be required. Low latency here could be achieved by the use of efficient single-threaded algorithms and their optimized library implementations.

Another approach would be to sort all Niss marginal loss distributions in parallel,

thus maximizing the throughput instead of minimizing latency. This would imply using a parallel processing architecture for sorting. The memory of parallel processing solutions is quite limited however, this issue will be further discussed below.

The sparse matrix representation of ˆL turns out not to be practical in this case. The space requirements of the algorithm would be reduced, but the sorting overhead would become even more severe. We will show in our benchmarking exercise further that time to process and sort the full matrix is very significant even for a dense matrix. As any compression algorithm, sparse representation would imply decompression before sorting the marginal loss distributions, thus requiring additional computational effort.

(20)

3.2 Current marginal IRC/DRC algorithms 19

As stated above, this approach imposes significant constraints on the entire applica-tion. Even for 107 simulations the requirements for the infrastructure that executes the application are significant. Since all the simulations are conducted on a GPU, storing ˆL would mean that we have to redesign an algorithm, because there is no single GPU, yet, that could provide the required amount of memory (Rspace). Redesigning the algorithm

in turn would imply that we transfer ˆL in parts into RAM from the GPU memory as we generate it. In fact, this way ˆL will be processed in batches. This process would result in additional overhead in time if not done in a streaming fashion, allowing an overlap of calculations and data transfers. Moreover, the amount of memory we will need to reserve for an algorithm based on ”R” approach depends on input parameters. For ex-ample, the number of scenarios can grow to 108 in future to allow for higher precision, or the portfolio could be expanded with the new issuers. Considering these facts and limitations it should be obvious that the implementation of the algorithm to compute marginals based on ”R” would become not flexible enough to work under real-world requirements.

Ultimately, as a limiting case for the space-time region where we look for a desired algorithm, we imply that this approach has an execution time less then that required for ”P”: Rtime< Ptime.

Space, gigabytes

Time, seconds

Desired Q region

R

P

Figure 2: ”P”,”R” and ”Q” approaches on a space-time complexity plot

On a Figure 2 both approaches are represented on a plot showing space and time requirements of the above mentioned algorithms. The objective of our research is to introduce a certain intermediate approach that would efficiently utilize computational power of the infrastructure and will be as accurate as both ”R” and ”P”, i.e. no approx-imation is allowed.

To conclude, this section introduces two limiting cases in terms of algorithmic com-plexity, which has its origin either in space (”R”) or in time (”P”) requirements. We will further use them as a reference for a performance comparison of the newly designed approaches.

(21)

4 METHODS 20

4

Methods

4.1 Purpose Of The Algorithm

This section briefly summarizes the problem of computing marginals in exact terms and explains the motivation for building an efficient algorithm to solve it.

To recap, when trying to compute marginal IRC/DRC Qq( ~Mr) for all issuers r we

encounter computational limitations either in space required to store full ˆL matrix or in time necessary to conduct a set of simulations equal in size to the number of issuers. More details on this issue were given in Section 3.

The algorithm must use as little information as possible from ˆL to find Qq( ~T ) and

r = 1 . . . Nissvalues Qq( ~Mr) exactly. This necessary information corresponds to a certain

subset of Nk rows of matrix ˆL.

Values Qq( ~Mr) show marginal impact Qq( ~T ) - Qq( ~Mr) of different issuers on total

DRC/IRC value. Computing marginal impacts is the core of the method aimed at identifying the counterparties toward which the bank has an exposure that contributes highly to the level of default risk charge. By targeting and unwinding positions that constitute this exposure, the financial institution is able to reduce the overall level of default risk associated with its portfolio.

4.2 Design Of The Proposed Algorithm And Its Justification

In this part of our work the algorithm to compute Qq( ~Mr) is introduced.

To make it more accessible, the algorithm is introduced in a constructive manner. That is, we start by defining its basic components and explaining the roles they play at the intermediate stages of the algorithm execution. We then build the whole procedure of calculating Qq( ~Mr) from these parts. Then the proof that the algorithm works in a

general case follows. Afterwards the algorithm is illustrated by a small example that is still sufficiently comprehensive to visualize all the important aspects of the algorithm operation. A more detailed example is shown in the Appendix A.

In order to achieve a high efficiency in space, it is required for an algorithm to store only the necessary amount of scenarios from initial matrix ˆL. We therefore need to distinguish rows and corresponding scenarios that are necessary for marginal calculations from all other rows. For this purpose we introduce a subset of rows of ˆL. Elements of these rows are denoted as Lk,j. Let the number of these rows be less or equal to that of

the original matrix: Nk≤ Nsc.

Note that the newly designed, ”Q”, algorithm in its principle differs from the sparse matrix representation. First, from a sparse matrix it would be possible to restore the full

ˆ

L, while we only store part of it that is relevant for computing quantiles we need. For the rest of the matrix we only know the amount of observations, but not their values. Therefore our representation of ˆL is very different from a sparse matrix representation. In a latter case the compression would be necessary. It would imply discarding zero values of each column or row and then storing the numbers of nonzero observations as an overhead. Extracting the quantiles thus would require decompression and hence

(22)

4.2 Design Of The Proposed Algorithm And Its Justification 21

result in extra overhead.

In contrast, in case of our algorithm computing marginal loss distributions and sort-ing them does not imply any extra steps such as decompression. In fact, the calculations of quantiles are done in a similar way as this would be done for a full ˆL. This promises more efficiency for the algorithm in terms of time and space.

4.2.1 Characteristic Value Of One Scenario

We next turn to a discussion of the first of the building blocks of the Q algorithm. For this the highest possible value of a total financial outcome of a scenario is identified for any of the marginals we compute. We could represent this value through elements of marginal vectors defined in Equation 7.

βi = max j M

j

i = maxj [Ti− Li,j] = Ti− minj [Li,j] (12)

Let βi be elements of vector ~β.

Ultimately, our goal is to match each βi value to a certain threshold in order to

identify whether a scenario is relevant for computing any of the marginals or not. But first, we justify why the highest element, max

j M j

i, across all the issuers for a given

scenario i can be chosen as a value representing the entire scenario. This could be clarified through a following example.

Consider a scenario from a simulation of a portfolio with four issuers, where all issuers have defaulted, causing the losses shown in Equation 13.

Li,j = [Li,1, Li,2, Li,3, Li,4] = [3, 12, 2, −10] (13)

Elements of marginal vectors Mij matching this case are shown in Equation 14:

Mij = [Mi1, Mi2, Mi3, Mi4] = [4, −5, 5, 17] (14) Picking the largest one of all Mij yields βi:

βi= max j M

j

i = Mi4 = 17 (15)

The configuration given in this example is visualized on a Figure 3. It shows Ti, βi

and Mij plot next to a certain mocked loss distribution. It is obvious that we can always find a max

j M j

i, no matter what was the composition

of losses in scenario. Since we are concerned with computing extremely high quantiles of the loss distribution, we can treat βi as a boundary of all possible marginal losses per

scenario, i.e. if βi does not contribute to the calculation of a quantile of the marginal loss

distribution for any of the issuers, non of the other values Mij can do so. This explains the choice of the βi as a measure representing the entire scenario.

(23)

4.2 Design Of The Proposed Algorithm And Its Justification 22

Figure 3: βi for a given scenario i and a total scenario loss Ti

This example also serves to illustrate another important observation. Note that the total scenario loss is:

Ti=

X

j

Li,j = 7 (16)

This instance therefore shows how a certain scenario can have a small cumulative loss, but a rather more significant βi. Hence, we need to store all the scenarios with the βi

that contribute to the calculation of at least one of the marginal IRC/DRC values.

4.2.2 Threshold For Matching Characteristic Values

Next, we need to find a certain value to which we could match βi in order to identify

whether for a scenario i the algorithm should store all values Li,j.

We now define a subset of scenarios that are required to compute all marginals. For this we choose one scenario k and analyze possible values Mkrof all marginal vectors ~Mr.

If Mkr < Qq( ~Mr) for all issuers r, then we say that scenario k does not contribute to the

calculation of marginals Qq( ~Mr) and we do not need to store all Lk,r corresponding to

it. Otherwise and all Lk,r are stored and the scenario k belongs to a subset of scenarios

K chosen by the algorithm.

We already defined Qq( ~Mr), a quantile of a marginal vector ~Mr. We can think of a

lowest value that a Qq( ~Mr) can achieve across all issuers r, min r Qq( ~M

r). It is obvious

that if the scenario contributes to the calculation of at least one of Qq( ~Mr), we should

store it.

Since we can not find a minimum of marginals min

r Qq( ~M

r) value before conducting

the simulation without knowing all the other marginal values Qq( ~Mr), we can think

of some other vector that satisfies the desired property. Namely, its quantile should be lower than any of the quantiles of all the marginal vectors. Then, if the scenario contributes to the calculation of a quantile of this vector, it may or may not contribute to quantiles of marginal vectors. But more importantly, there are no scenarios that can

(24)

4.2 Design Of The Proposed Algorithm And Its Justification 23

contribute to calculation of any of the marginals without contributing to the calculation of the quantile of this new vector.

We introduce the new discussed vector as follows. Consider a value αi that is the

lowest of all values Miracross all issuers r = 1 . . . m . . . Nissfor each scenario i. In general

case the vector composed from these values will be denoted as:

αi = min j [M

j

i] = minj [Ti− Li,j] = Ti− max

j [Li,j] (17)

It follows from the definition of the quantile that if we take the quantile of the vector Qq(~α), it will have the lowest value in comparison to all the other quantiles Qq( ~Mr).

Therefore the Equation 18 holds:

Qq(~α) ≤ min r Qq( ~M

r) (18)

4.2.3 Criterion For Choosing Scenarios

By the definition of the quantile, if we keep all the scenarios that have any of the Mir higher or equal to Qq(~α), we can guarantee that we will always have enough data to

compute all the marginals.

Because of the way we define ~α,

Qq( ~Mr) ≥ Qq(~α) (19)

Since Qq( ~Mr) ≥ Qq(~α) and we are interested only in scenarios k such that Mkr ≥

Qq( ~Mr), we can say that for chosen scenarios:

Mkr≥ Qq( ~Mr) ≥ Q

q(~α) (20)

or

Mkr ≥ Qq(~α) (21)

In other words, we keep the scenario k if any of the elements of Mkr exceed the quantile of the new vector we have just introduced. Note that knowing Qq(~α) does not

require knowing Qq( ~Mr) values. But storing all Mir for all the scenarios i would imply

dealing with the same space problem that makes the algorithm ”R” discussed in Section 3 inefficient. Fortunately, we can find just one value that represents the entire scenario i without storing all Mir.

As we’ve earlier shown in a Section 4.2.1, we can choose an upper bound for all marginals of any scenario. Putting this in exact terms, for scenario k, we can find a value βk, which satisfies the condition βk≥ Mkr. Combined with Equation 21 this yields

the criterion that a scenario k has to satisfy in order to contribute to marginals:

βk≥ Qq(~α) (22)

This is a necessary condition for all the scenarios contributing to the calculation of quantiles of marginal loss distributions.

(25)

4.3 Algorithm Formulation 24

It therefore follows that by applying a criterion established in Equation 22 we might end up storing more data than strictly sufficient. Nevertheless, as we will show later through benchmarking of the algorithm based on Criterion 22 on a real portfolio, this excess of data is insignificant for the problem of computing marginal DRC. It is also important to outline that the algorithm will not provide major benefit in terms of space for calculating quantiles close to the median. It is designed to compute extreme quantiles of marginal distributions, and as we show later it fulfills its purpose efficiently.

We can prove that this criterion is valid by considering a following counterexample. Suppose there exists a scenario k for which criterion is violated:

βk< Qq(~α) (23)

But k has a contribution to quantile:

Mkr ≥ Qq( ~Mr) (24)

By definition of βk,

Mkr ≤ βk (25)

Then from Equation 23 we get

Mkr≤ βk< Qq(~α) (26)

or

Mkr < Qq(~α) (27)

We also know that by definition of Qq(~α)

Qq(~α) ≤ Qq( ~Mr) (28)

which, combined with Equation 27 yields

Mkr< Qq(~α) ≤ Qq( ~Mr) (29)

Mkr < Qq( ~Mr) (30)

which violates an earlier defined condition that a scenario must satisfy in order to con-tribute to a marginals (Equation 24) and leads to a contradiction. Thus, no scenarios exist that violate criterion expressed in Equation 22 and still contribute to marginals.

4.3 Algorithm Formulation

The Criterion 22 operates on values ~α and ~β and hence requires that we know these values in advance. A practical algorithm on the basis of the Criterion 22 would therefore require conducting a preliminary simulation to obtain these values. We also keep track of the seed of the random number generator used for the first simulation in order to re-use it for subsequent simulations.

(26)

4.3 Algorithm Formulation 25

After conducting the preliminary simulation we then evaluate condition introduced in Equation 22 on all ~α and ~β values for all the scenarios. Subsequently, we find the numbers matching a subset of chosen scenarios K. We then conduct a second simulation, in which we reproduce all the random numbers generated in course of the first simulation using the same seed. As an output the Mkr values are stored for the chosen scenarios. Values Mkr are then used to compute all the marginals. This procedure is shown more formally on a listing of pseudocode below, see Algorithm 1.

Algorithm 1 IRC/DRC Marginals algorithm Set the seed of random number generator // Conduct simulation 1:

for each scenario ( i = 0...Nsc ) do

Record max [ ~Li], min [ ~Li], Ti and a scenario number i

end for

Compute ~α, ~β, αq as given in Equations 17, 12

// Determine which of scenarios i satisfy criterion as given in Equation 22: for i = 0...Nsc do

i ∈ Nk if βi≥ αq

end for Compute Tq

Estimate M space required to store matrix of floating point numbers of dimensions Nk by Niss

if M is higher than available memory then Fall back to approach P

end if

Preallocate memory of size M for storing ˆLk

Set the seed of random number generator to the same number as in simulation 1 // Conduct simulation 2:

for each k ∈ Nk do

Record Lk,j

end for

Lk,j are written into matrix ˆLk

ˆ

Lk is used to compute all Mr q

(27)

4.4 Example Calculation 26

4.4 Example Calculation

we next attempt to clarify the algorithm by considering a concrete example. We thus consider the case where the largest contribution max

j [Li,j] might be caused

by different issuers in each scenario i = 1 . . . Nsc. We start with a general discussion of

this case.

Since current case contribution of issuer with highest financial impact max

j [Li,j] for

all scenarios i is different, it is convenient to define minimal element αi of corresponding

Mij as it was given in Equation 17.

Values αi can then be represented as a vector ~α. ~α in general case does not have to

match any of the marginal vectorsM~m. We denote a quantile of ~α as Q q(~α).

The input loss matrix and the intermediate values are shown in Table 1

Table 1: Loss matrix, marginals, total loss vector, alpha and beta vectors for a simple example # Lˆ T~ Mˆ α~ β~ 0 2 8 -5 5 3 -3 10 -3 10 1 5 10 -5 10 5 0 15 0 15 2 -10 0 10 0 10 0 -10 -10 10 3 10 0 0 10 0 10 10 0 10 4 -10 -10 0 -20 -10 -10 -20 -20 -10 5 -10 -10 10 -10 0 0 -20 -20 0 6 10 10 -10 10 0 0 20 0 20 7 -5 -5 -5 -15 -10 -10 -10 -10 -10 8 0 -5 -5 -10 -10 -5 -5 -10 -5

We then can re-order the elements of all marginal vectors to compute quantiles, vector of total sums to compute the value of risk charge and the ~α to find the value Qq(~α) necessary to apply the Criterion 22. Original scenario numbers are shown next to

the values of corresponding vector elements. The number of the vector element matching a quantile is denoted with bold.

(28)

4.4 Example Calculation 27

Table 2: Quantiles of all vectors representing the problem

# T~ # M~1 # M~2 # M~3 # α~ 4 -20 4 -10 4 -10 4 -20 4 -20 7 -15 7 -10 7 -10 5 -20 5 -20 5 -10 8 -10 8 -5 2 -10 2 -10 8 -10 3 0 0 -3 7 -10 7 -10 2 0 5 0 1 0 8 -5 8 -10 0 5 6 0 2 0 0 10 0 -3 1 10 0 3 5 0 3 10 1 0 3 10 1 5 6 0 1 15 3 0 6 10 2 10 3 10 6 20 6 0

As it is evident from Tables 2 and 1, we keep full loss matrix data for scenarios 0, 1,2,3,5, and 6 since βi values for these scenarios are larger or equal to Qq(~α).

We next visualize the output of the algorithm.

Figure 4: αi and βi of all the scenarios sorted by ~α

(29)

4.4 Example Calculation 28

of marginal vectors. Values on the plot are sorted according to the magnitude of ~α. Here scenarios 5 and 2 are chosen because in spite of small total scenario loss, if we remove the large negative contribution from any of them (-10), the total scenario value becomes significantly larger. Other group is represented by scenarios 0,1,3 and 6, which are always relevant because they have a large cumulative financial result.

Note that the algorithm input data does not necessarily have to be obtained by running simulations of IRC/DRC models. In fact for this example the loss matrix was generated at random. This way we also illustrate that the method we describe in this section has a general applicability.

Further clarifications regarding the algorithm operation are given in Appendix A. The example there that shows the case where one issuer defaults in each scenario, pro-viding a financial impact that is the largest among all the issuers.

(30)

5 RESULTS 29

5

Results

In this part of the research we measure the performance of the newly developed algo-rithm and benchmark it against earlier known solutions to marginal DRC problem. Our intention is to provide a comprehensive summary of how the algorithm performance could be affected by various input data configurations and to show its actual efficiency in solving real-world problems.

We first study the Monte Carlo error of one simulation depending on the number of scenarios. The reason is twofold. First, we show the convergence of the DRC simulation. Second, we identify the number of scenarios that provides sufficient precision but is less than that required by the regulator. This number of scenarios is chosen for the purpose of convenience, and kept fixed for the remaining numerical experiments shown in Section 5.2. For the final part the benchmarking is also conducted on the a portfolio and under regulatory defined conditions. Later in Section 5.2.2 we provide additional visualizations related to algorithm’s operation. Given the similarity in terms of the representation of the output data between IRC and DRC, the experiments are conducted on the DRC model satisfying latest regulations. We make our benchmarking setup generic enough by considering simulated data. These results should provide an impression of the worst-case conditions under which the new method becomes less efficient given any model. We show through this experiments that such situations are very unrealistic for practice.

We conclude the chapter by showing the performance of the algorithm on real port-folio data. Thereby, the strengths of the industrial solution built on the basis of the newly developed algorithm are made evident.

5.1 DRC Simulations and Monte Carlo Error

We start with the analysis of the error of a Monte Carlo simulation for a DRC model. This analysis is conducted on a model that calculates DRC for a portfolio of 921 issuers.

0 200000 400000 600000 800000 Scenarios 0 10 20 30 40

Monte Carlo error (%)

Relative error

Figure 5: Relative DRC Monte Carlo error

(31)

ap-5.1 DRC Simulations and Monte Carlo Error 30

proximately 200 thousand scenarios. We thus consider 300 thousand scenarios to be a sufficient number that still represents the full complexity of the problem while also being convenient for visualizations.

For this chosen amount of scenarios we show the loss distribution of the DRC model on Figures 6 and 7.

250000 252500 255000

257500 DRC

Simulated loss distribution

0.5 0.0 0.5 1.0 1.5 2.0 Loss 1e9 0 2000 4000 Frequency

Figure 6: Loss distributions along with the DRC value

The tail of the distribution is barely noticeable on Figure 6. Therefore, we plot it separately on Figure 7, as this is the part of the distribution we are mostly concerned with. 0.5 0.0 0.5 1.0 1.5 2.0 Loss 1e9 0 10 20 30 40 Frequency DRC

Simulated loss distribution

Figure 7: Tail of the loss distributions along with the DRC value

Figure 7 illustrates that while the number of the observations that are relevant for DRC calculation on the chosen subset of scenarios is not large, the distribution has a long tail which is typical for the model. However, the scenarios that constitute the tail of the marginal distributions are different in each case, and in the Section 5.2.2 we demonstrate how the newly developed algorithm identifies them.

(32)

5.2 Marginal DRC 31

5.2 Marginal DRC

In this section we use the DRC model with chosen amount of 300 thousand scenarios to visualize the problem of computing marginal values for a real portfolio. As emphasized in previous chapter, these simulations imply a higher level of computational complexity. We will further make this statement more concrete by showing the actual time and space requirements of the corresponding algorithms, but first we provide an overview of marginal loss distributions and their quantiles in comparison to the DRC value.

5.2.1 Computing Marginal Values on a Real Portfolio

The marginal loss distributions for a realistic portfolio are close to the total scenario loss distribution. On Figure 8 marginal loss distributions are plotted in diverse colors around the black line which borders the histogram of the total loss per scenario. We again mention that no matter which method we use the marginal DRC values have to be the same because according to the problem statement, the approximation is not desired. Hence, the red dashes showing Qq( ~Mn) are relevant for all methods P, Q and R discussed

in Chapter 3.

For the purpose of making the Figure 9 more readable we only show 100 marginal loss distributions for which Qq( ~Mn) varies the most from the DRC value.

Figure 8: Marginal distributions for DRC model and corresponding quantile values

These loss distributions demonstrate the problem in general. Storing all of them together would result in an approach R, while calculating one of them at a time and then taking a quantile yields approach P. From the previous chapter we know that not all the information on the distributions is required to compute corresponding quantiles. In the next section we describe how the criteria at the core of the new algorithm makes a choice of a subset of scenarios that are necessary for solving the marginal DRC problem.

(33)

5.2 Marginal DRC 32 0.0 0.5 1.0 1.5 2.0

Loss

1e9 0 5 10 15 20 25 30 35 40

Frequency

Qq

(T)

Qq

( )

T

Q(M

n

)

Figure 9: Marginal distributions for DRC model and corresponding quantile values in a greater detail

5.2.2 Visualizations Related to the New Algorithm

Recall that for illustrative purposes we only work with 300 thousand scenarios on a portfolio of 921 issuers, thus ˆL and ˆM matrices would have dimensions of 921 × 300000. We next apply the algorithm Q to this data set and study how it performs on this problem which is close to a real-world one. For this case, we observe that it is only required by the algorithm Q to store 0.594 percent of the full loss matrix in order to reproduce marginal quantiles exactly.

The memory requirements are made exact in the following Equation 31.

Qspace = Nscchosen· Niss· Fdouble =

= 1782 · (scenarios) · 921 (issuers) · 8 (bytes) = 13 (megabytes) Rspace = Nsc· Niss· Fdouble=

= 300000 · (scenarios) · 921 (issuers) · 8 (bytes) = 2210 (megabytes)

(31)

(34)

5.2 Marginal DRC 33

a) αi and βi of all the scenarios sorted by ~α

b) Different view on the same data: αi and βi of all the scenarios sorted by ~T

Figure 10: Visualization of the proportion of chosen scenarios

Figure 10a) shows how β values of different scenarios relate to the Qq(~α). Figure

Referenties

GERELATEERDE DOCUMENTEN

1 preserves the original size distribution for all three sizes of GNPs evaluated, and no aggregation was observed; although, the hydrodynamic diameter increased for all particle

However, that does not alter the fact that Muslim extremists run less risk when they can fall back on sympathizers of the violent jihad.. The possibilities to do so show a different

A last question regarding the 5 different change perspectives would be to research whether the cooperating organizations should have the same change perspective

The forecast performance mea- sures show that, overall, the CS-GARCH specification outperforms all other models using a ranking method by assigning Forecast Points according to

Ook op de Atlas van de Buurtwegen, kunnen enkele gebouwen gezien worden binnen het onderzoeksgebied (Fig.. De gebouwen hebben echter een andere vorm dan zichtbaar is op

In this paper, we have applied LS-SVM in dual space and 3 variants in primal space (fixed size - ordinary least squares, FS-OLS; fized size ridge regression, FS-RR; and fized

Once it is sent out, the bookkeeping department does not do anything with the invoice until it is either approved and appears in Coda (where it can be paid) or if the supplier sends

The distance the word creates could possibly reduce police officers’ inclination to empathy, reinforcing their perception of potential victims of human trafficking or aggravated form