scieee AI-readable full text Open interactive document viewer

Importance sampling in the presence of PD-LGD correlation

Metzler, Adam,Scott, Alexandre

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

Metzler, Adam; Scott, Alexandre Article Importance sampling in the presence of PD-LGD correlation Risks Provided in Cooperation with: MDPI – Multidisciplinary Digital Publishing Institute, Basel Suggested Citation: Metzler, Adam; Scott, Alexandre (2020) : Importance sampling in the presence of PD-LGD correlation, Risks, ISSN 2227-9091, MDPI, Basel, Vol. 8, Iss. 1, pp. 1-36, https://doi.org/10.3390/risks8010025 This Version is available at: https://hdl.handle.net/10419/257980 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by/4.0/ risks Article Importance Sampling in the Presence of PD-LGD Correlation Adam Metzler 1,* and Alexandre Scott 2 1Department of Mathematics, Wilfrid Laurier University, Waterloo, ON N2L 3C5, Canada 2Department of Applied Mathematics, University of Western Ontario, London, ON N6A 3K7, Canada; [email protected] *Correspondence: [email protected] Received:20 January 2020; Accepted: 5 March 2020; Published: 10 March 2020   Abstract: This paper seeks to identify computationally efficient importance sampling (IS) algorithms for estimating large deviation probabilities for the loss on a portfolio of loans. Related literature typically assumes that realised losses on defaulted loans can be predicted with certainty, i.e., that loss given default (LGD) is non-random. In practice, however, LGD is impossible to predict and tends to be positively correlated with the default rate and the latter phenomenon is typically referred to as PD-LGD correlation (here PD refers to probability of default, which is often used synonymously with default rate). There is a large literature on modelling stochastic LGD and PD-LGD correlation, but there is a dearth of literature on using importance sampling to estimate large deviation probabilities in those models. Numerical evidence indicates that the proposed algorithms are extremely effective at reducing the computational burden associated with obtaining accurate estimates of large deviation probabilities across a wide variety of PD-LGD correlation models that have been proposed in the literature. Keywords: importance sampling; acceptance-rejection sampling; portfolio credit risk; tail probabilities; large deviation probabilities; stochastic recovery; PD-LGD correlation; credit risk; loss probabilities 1. Introduction This paper seeks to identify computationally efficient importance sampling (IS) algorithms for estimating large deviation probabilities for the loss on a portfolio of loans. Related literature assumes that realised losses on defaulted loans can be predicted with certainty, i.e., that loss given default (LGD) is non-random. In practice, however, LGD is impossible to predict and tends to be positively correlated with the default rate and the latter phenomenon is typically referred to as PD-LGD correlation (here PD refers to probability of default, which is often used synonymously with default rate). There is a large literature on modelling stochastic LGD and PD-LGD correlation, but there is a paucity of literature on using importance sampling to estimate large deviation probabilities in those models. This gap in the literature was brought to our attention by a risk management professional at a large Canadian financial institution, and filling that gap is the ultimate goal of this paper. Problem Formulation and Related Literature Consider a portfolio of N exposures of equal size. Let L1 , L2 , . . . , LN denote the losses on the individual loans, expressed as a percentage of notional value. The percentage loss on the entire portfolio is: ¯ LN:=1 N N ∑ i=1 Li. (1) Risks 2020,8, 25; doi:10.3390/risks8010025 www.mdpi.com/journal/risks Risks 2020,8, 25 2 of 36 We are interested in using IS to estimate large deviation probabilities of the form: px:=P(¯ LN≥x), (2) where x>> E[Li] = E[¯ LN]is some large, user-defined, threshold. In practice the number of exposures is large (e.g., in the thousands) and prudent risk management requires one to assume that the individual losses are correlated. In practice, then, ¯ LN is the average of a large number of correlated variables. As such, its probability distribution is highly intractable and Monte Carlo is the method of choice for approximating px . As the probability of interest is typically small (e.g., on the order of 10 −3 or 10 −4 ), the computational burden required to obtain an accurate estimate of px using Monte Carlo can be prohibitive. For instance if px is on the order of 10 −3 and N is on the order of 1000 then, in the absence of any variance reduction techniques, the sample size required to reduce the estimator’s relative error 1 to 10% is on the order of one hundred thousand. Since each realisation of ¯ LN requires simulation of one thousand individual losses, a sample size of 100, 000 requires one to generate one hundred million variables. If the desired degree of accuracy is reduced to 1%, the number of variables that must be generated increases to a staggering 10 billion. Importance sampling (IS) is a variance reduction technique that has the potential to significantly reduce the computational burden associated with obtaining accurate estimates of large deviation probabilities. In the present context, effective IS algorithms have been identified for a variety of popular risk management models, but most are limited to the special case that loss given default (LGD) is non-random. The seminal paper in the area is (Glasserman and Li 2005), other papers include (Chan and Kroese 2010) and (Scott and Metzler 2015). It is well documented empirically, however, that portfolio-level LGD is not only stochastic, but positively correlated with the portfolio-level default rate as seen, for instance, in any of the studies listed in (Kupiec 2008) or (Frye and Jacobs 2012). This phenomenon is typically referred to as PD-LGD correlation. (Miu and Ozdemir 2006) show that ignoring PD-LGD correlation when it is in fact present can lead to material underestimates of portfolio risk measures. There is a large literature on modelling PD-LGD correlation (Frye 2000); (Pykhtin 2003); (Miu and Ozdemir 2006) ; (Kupiec 2008); (Sen 2008); (Witzany 2011); (de Wit 2016); (Eckert et al. 2016) ; and others listed in (Frye and Jacobs 2012), but there is a much smaller literature on using IS to estimate large deviation probabilities in such models. To the best of our knowledge only (Deng et al. 2012) and (Jeon et al. 2017) have developed algorithms that allow for PD-LGD correlation (the former paper considers a dynamic intensity-based framework, the latter considers a static model with asymmetric and heavy-tailed risk factors). The present paper contributes to this nascent literature by developing algorithms that can be applied in a wide variety of PD-LGD correlation models that have been proposed in the literature, and are popular in practice. The paper is structured as follows. Section 2outlines important assumptions, notation, and terminology. Section 3theoretically motivates the proposed algorithm in a general setting, and Section 4discusses a few practical issues that arise when implementing the algorithm. Section 5 describes a general framework for PD-LGD correlation modelling that includes, as special cases, many of the models that have been developed in the literature and Section 6describes how to implement the proposed algorithm in this general framework. Numerical results are presented and discussed in Section 7and demonstrate that the proposed algorithms are extremely effective at reducing the computational burden required to obtain an accurate estimate of px. 1 Relative error is the preferred measure of accuracy for large deviation probabilities. If b px is an estimator of px , its relative error is defined as SD(b px)/px, where SD denotes standard deviation. Risks 2020,8, 25 3 of 36 2. Assumptions, Notation and Terminology We assume that individual losses are of the form Li=L(Z , Yi) , where L is some deterministic function, Z= (Z1 , . . . , Zd) is a d -dimensional vector of systematic risk factors that affect all exposures, and Yi is a vector of idiosyncratic risk factors that only affect exposure i . We assume that Z , Y1 , Y2 , . . . are independent, and that the Yi are identically distributed. The primary role of the systematic risk factors is to induce correlation among the individual exposures, and it is common to interpret the realised values of the systematic risk factors as determining the overall macroeconomic environment. It is worth noting that the we do not require the components of Z to be independent of one another, etc. for the components of Yi. 2.1. Large Portfolios and the Region of Interest In a large portfolio, the influence of the idiosyncratic risk factors is negligible. Indeed, since individual losses are conditionally independent, given the realised values of the systematic risk factors, we have the almost sure limit: lim N→∞ ¯ LN=µ(Z), (3) where µ(z):=E[Li|Z=z] = E[¯ LN|Z=z]. (4) Since µ(Z)≈¯ LN for large N by Equation (3) , the random variable µ(Z) is often called the large portfolio approximation (LPA) to ¯ LN . The LPA is often used to formalise the intuitive notion that, in a large portfolio, all risk is systematic (i.e., idiosyncratic is “diversified away”). We define the region of interest as the set: {z∈Rd:µ(z)≥x}. (5) The region of interest is “responsible” for large deviations in the sense that: lim N→∞ P(µ(Z)≥x|¯ LN≥x) = 1 (6) for most values 2 of x . Together, Equations (3) and (6) suggest that for large portfolios, it is relatively more important to identify an effective IS distribution for the systematic risk factors, as compared to the idiosyncratic risk factors. 2.2. Systematic Risk Factors We assume that Z is continuous and let f(z) denote its joint density. We assume that f is a member of an exponential family (see Bickel and Doksum 2001 for definitions and important properties) with natural sufficient statistic S:Rd7→ Rp. Any other member of the family can be put in the form: fλ(z):=exp(λTS(z)−K(λ)) ·f(z), (7) where K(·) is the cumulant generating function (cgf) of S(Z) and λ∈Rp is such that K(λ) is well-defined. The parameter λ is called the natural parameter of the family in Equation (7) . Appendix B embeds the Gaussian and multivariate tfamilies into this general framework. 2 In light of the almost sure limit in Equation (3) , we have that ¯ LN converges to µ(Z) in distribution, which implies that Equation (6) is valid for all values of x such that P(µ(Z) = x) = 0. If µ(Z) is a continuous random variable (which it is in most cases of practical interest) then Equation (6) is satisfied for every value of x. Risks 2020,8, 25 4 of 36 We will eventually be using densities of the form in Equation (7) as IS densities for the systematic risk factors. The associated IS weight is: f(Z) fλ(Z)=exp(−λTS(Z) + K(λ)) , (8) and it will be important to know when the variance of the IS weight is finite. The following observation is readily verified. Remark 1. If Z∼fλ , then Equation (8) has finite variance if and only if both K(λ) and K(−λ) are well defined. A standard result in the theory of exponential families is that: ∇K(λ) = Eλ[S(Z)] , (9) where ∇denotes gradient and Eλdenotes expectation with respect to the density fλ. 2.3. Individual Losses We assume that Li takes values in the unit interval. In general Li will have a point mass at zero (if it did not, the loan would not be prudent) and the conditional distribution of Li , given that Li> 0, is called the (account-level) LGD distribution. We allow the LGD distribution to be arbitrary in the sense that it could be either discrete or continuous, or a mixture of both. This contrasts with the case of non-random LGD, where the LGD distribution is degenerate at a single point. We let `max ∈( 0, 1 ] denote the supremum of the support of Li . Individual losses will therefore never exceed `max but could take on values arbitrarily close (and possibly equal) to `max. Remark 2. Despite the fact that Li is not a continuous variable, in what follows we will proceed as if it was and make repeated reference to its “density." This is done without loss of generality, and in an interest of simplifying the presentation and discussion. Nothing in the sequel requires Li to be a continuous variable, and everything carries over to the case where it is either discrete or continuous, or has both a discrete and continuous component. For z∈Rd we let g(`|z) denote the conditional density of Li , given that Z=z . We assume that the support of g(·|z) is identical to the unconditional support, in particular it does not depend on the value of z. Note that µ(z)is the mean of g(·|z). In practice (i.e., for all of the PD-LGD correlation models listed in the introduction) g(·|z) is not a member of an established parametric family, and direct simulation from g(·|z) using a standard technique such as inverse transform or rejection sampling is not straightforward. Simulation from g(·|z) is most easily accomplished by simulating the idiosyncratic risk factors, Yi , from their density, say η(y) , and then setting Li=L(z , Yi) . In other words, in order to simulate from g(·|z) we make use of the fact that Li=L(z,Yi)is a drawing from g(·|z)whenever Yiis a drawing from η(·). For θ∈Rand z∈Rdwe let: k(θ,z):=log(E[exp(θLi)|Z=z]) and k0(θ,z):=∂k ∂θ (θ,z). Then k(· , z) is the conditional cgf of Li , given that Z=z , and k0(· , z) is its first derivative. In practice, neither k(· , z) nor k0(· , z) is available in closed form. In the examples we consider later in the paper each can be expressed as a one-dimensional integral, but the numerical values of those integrals must Risks 2020,8, 25 5 of 36 be approximated using quadrature. This contrasts with the case of non-random LGD, where the conditional cgf can be computed in closed form3. For x∈( 0, `max) and z∈Rd we let ˆ θ(x , z) denote the unique solution to the equation k0(θ , z) = max(x , µ(z)) . We often suppress dependence on x and z , and simply write ˆ θ instead of ˆ θ(x , z) . That ˆ θ is well-defined follows immediately from the developments in Appendix A.1. Based on the discussion there we find that ˆ θis zero whenever zlies in the region of interest, and is strictly positive otherwise. Remark 3. In practice, the value of ˆ θ cannot be computed in closed form and must be approximated using a numerical root-finding algorithm. Since each evaluation of the function k0(· , z) requires quadrature, computing ˆ θ is straightforward but relatively time consuming. This contrasts with the case of non-random LGD, where ˆ θ can be computed in closed form at essentially no cost. For z∈Rdwe let q(·,z)denote the Legendre transform of k(·,z)over [0, ∞). That is, q(x,z):=max θ≥0(θx−k(θ,z)) = ˆ θx−k(ˆ θ,z). (10) That ˆ θ is the uniquely defined point at which the function θ7→ θx−k(θ , z) attains its maximum on [ 0, ∞) follows from the developments in Appendix A.2. Based on the discussion there, we find that both ˆ θ and q are equal to zero whenever z lies in the region of interest, and that both are strictly positive otherwise. 2.4. Conditional Tail Probabilities Given the realised values of the systematic risk factors, individual losses are independent. Large deviations theory can therefore provide useful insights into the large- N behaviour of the tail probability P(¯ LN≥x|Z=z). For instance, Chernoff’s bound yields the estimate: P(¯ LN>x|Z=z)≤exp(−Nq(x,z)) , (11) and Cramér’s (large deviation) theorem yields the limit: lim N→∞ log(P(¯ LN>x|Z=z)) N=−q(x,z). (12) Together these results are often used to justify the approximation: P(¯ LN>x|Z=z)≈exp(−Nq(x,z)) , (13) which will be used repeatedly throughout the paper. The approximation in Equation (13) is often called the large deviation approximation (LDA) to the tail probability P(¯ LN>x|Z=z) . Note that since q(x , z) = 0 whenever µ(z)≥x , the LDA suggests that P(¯ LN>x|Z=z)≈ 1 whenever z lies in the region of interest. 2.5. Conditional Densities Let L= (L1 , . . . , LN) , noting that L takes values in [ 0, `max]N . For z∈Rd and `= (`1 , . . . , `N)∈ [ 0, `max]N , we let hx(z , `) denote the conditional density of (Z , L) , given that ¯ LN>x . Then hx is given by: hx(z,`) = f(z)·∏N i=1g(`i|z) px·1{`∈AN,x}, (14) 3 In the case of non-random LGD we have k(θ , z) = log( 1 + (e(1−R)θ− 1 )·P(Li> 0 |Z=z)) , where R is the known recovery rate on the exposure. Risks 2020,8, 25 6 of 36 where AN,xis the set of points `∈[0, `max]Nfor which N−1∑N i=1`i>x. We let fx(z) denote the conditional density of the systematic risk factors, given that ¯ LN>x , noting that: fx(z) = P(¯ LN>x|Z=z) P(¯ LN≥x)·f(z). (15) In the examples we consider the mean of fx tends to lie inside, but close to the boundary of, the region of interest. And relative to the unconditional density f , the conditional density fx tends to be much more concentrated about its mean. Finally, we let gx(`|z)denote the conditional density of an individual loss, given that Z=zand ¯ LN>x, noting that: gx(`|z) = P(¯ LN−1>x+x−` N−1|Z=z) P(¯ LN>x|Z=z)·g(`|z). (16) If the realised value of z lies inside the region of interest, the conditional density gx(·|z) tends to resemble the unconditional density g(·|z) . Intuitively, for such values of z the LDA informs that the event {¯ LN>x} is very likely, and conditioning on its occurrence is not overly informative. If the realised value of z does not lie in the region of interest then gx(·|z) tends to resemble the exponentially tilted version of g(·|z)whose mean is exactly x. See Appendix A.3 for more details. Neither hx , fx , nor gx are numerically tractable, but as we will soon see they do serve as useful benchmarks against which to compare candidate IS densities. In addition, it is worth noting here that the representations of Equations (15) and (16) lend themselves to numerical approximation via the LDA in Equation (13). 3. Proposed Algorithm In practice, the most common approach to estimating px via Monte Carlo simulation in this framework is summarised in Algorithm 1below. Algorithm 1 Standard Monte Carlo Algorithm for Estimating px 1: Simulate M i.i.d. copies of the systematic risk factors. Think of these as different economic scenarios and denote the simulated values by z1, . . . , zM. 2: For each scenario m: (a) Simulate the idiosyncratic risk factors for each exposure. Denote the simulated values y1,m, . . . , yN,m. (b) Set `i,m=L(zm,yi,m)for each exposures i, and ¯ `m=1 N∑N i=1`i,m. 3: Return b px=1 M∑M m=11{¯ `m>x}. Algorithm 1consists of two stages. In the first stage one simulates the systematic risk factors, and in the second stage one simulates the idiosyncratic risk factors for each exposure. Mathematically, the first stage induces independence among the individual exposures, so that the second stage amounts to simulating a large number of i.i.d. variables. Intuitively, it is useful to think of the first stage as determining the prevailing macroeconomic environment, which fixes economy-wide quantities such as default and loss-given-default rates. The second stage of the algorithm overlays idiosyncratic noise on top of economy-wide rates, to arrive at the default and loss-given-default rates for a particular portfolio. Relative error is the preferred measure of accuracy for estimators of rare event probabilities. The relative error of the estimator b pxin Algorithm 1is: 1 √Ms1−px px, Risks 2020,8, 25 7 of 36 and the sample size required to ensure the relative error does not exceed some predetermined threshold eis: M(e) = 1 e2 1−px px. (17) The number of variables that must be generated in order to achieve the desired degree of accuracy e is therefore (N+d)·M(e) , which grows without bound as px→ 0. For instance if px= 10 −3 , N= 10 3 , d= 2, and e= 5 · 10 −2 then the number of variables that must be generated is approximately four hundred million, which is an enormous computational burden for a modest degree of accuracy. In the next section we discuss general principles for selecting an IS algorithm that can reduce the computational burden required to obtain an accurate estimate of px. 3.1. General Principles For practical reasons, we insist that our IS procedure retains conditional independence of individual losses, given the realised value of the systematic risk factors. This is important because it allows us to reduce the problem of simulating a large number of dependent variables to the (much) more computationally efficient problem of simulating a large number of independent variables. In the first stage we simulate the systematic risk factors from the IS density fIS(z) . The IS weight associated with this first stage is therefore: Λ1(z):=f(z) fIS(z). In the second stage we simulate the individual losses as i.i.d. drawings from the density gIS(`|z) . The IS weight associated with this second stage is: Λ2(z,`) = N ∏ i=1 g(`i|z) gIS(`i|z), and the IS density from which we sample (Z,L)is therefore of the form: hIS(z,`) = fIS(z)· N ∏ i=1 gIS(`i|z). (18) The so-described algorithm, with as-yet unspecified IS densities, is summarised in Algorithm 2. Algorithm 2 IS Algorithm for Estimating px 1: Simulate M i.i.d. copies of the systematic risk factors from the density fIS(z) . Think of these as different economic scenarios and denote the simulated values by z1, . . . , zM. 2: For each scenario m: (a) Independently simulate `1,m,`2,m, . . . , `N,mfrom the density gIS(·|zm). (b) Set ¯ `m=1 N∑N i=1`i,m. 3: Return b px=1 M∑M m=1Λ1(zm)·Λ2(zm,`m)·1{¯ `m>x}, where `m= (`1,m, . . . , `N,m). It is important to note that in the second stage, we will not be simulating individual losses directly from the (conditional) IS density gIS . Rather, we will simulate the idiosyncratic risk factors Yi in such a way as to ensure that for a given value of z , the variable Li=L(z , Yi) has the desired density gIS . Risks 2020,8, 25 8 of 36 Focusing on the “indirect" IS density of Li , as opposed to “direct" IS density of Yi , allows us to identify a much more effective second stage algorithm4. The estimator b pxproduced by Algorithm 2is demonstrably unbiased and its variance is: EIS[(Λ(Z,L)·1{¯ LN>x}−px)2] = p2 x·EIS[(Λx(Z,L)·1{¯ LN>x}−1)2], (19) where EIS denotes expectation under the IS distribution, Λ(z,`):=Λ1(z)·Λ2(z,`)and Λx(z,`):=Λ(z,`) px. Note that Λx is the ratio of (i) the IS density in Equation (18) to (ii) the conditional density in Equation (14). The estimator’s squared relative error can then be decomposed as: EIS[(Λx(Z,L)−1)2·1{¯ LN>x}]+[1−PIS(¯ LN>x)] , (20) where PIS denotes probability under the IS distribution. Inspecting Equation (20) we see that an effective IS density should (i) assign a high probability to the event of interest and (ii) should resemble the conditional density in Equation (14) as closely as possible, in the sense that the ratio Λx should deviate as little as possible from unity. Clearly, an estimator that satisfies (ii) should also satisfy (i), since hx assigns probability one to the event that ¯ LN>x . The task now is to identify a density of the form in Equation (18) that resembles the ideal density in Equation (14), in some sense. 3.2. Identifying the Ideal IS Densities Our measure of similarity is Kullback–Leibler divergence (KLD), or divergence for short. See Chatterjee and Diaconis (2018) for a general discussion of the merits of minimum divergence as a criteria for identifying effective IS distributions. We begin by writing: hx(z,`) hIS(z,`)=fx(z) fIS(z)·˜ gx(`|z) ˜ gIS(`|z), (21) where for fixed z, ˜ gx(`|z) = ∏N i=1g(`i|z) P(¯ LN>x|Z=z)·1{`∈AN,x} is the joint density of N independent variables having marginal density g(·|z) , conditioned on their average value exceeding the threshold x, and ˜ gIS(`|z) = N ∏ i=1 gIS(`i|z). is the joint density of Nindependent variables having marginal density gIS(·|z). Using Equation (21) it is straightforward to decompose the divergence of hIS from hxas: D(hIS||hx) = D(fIS||fx) + E[D(˜ gIS(·|Z)||˜ gx(·|Z))|¯ LN>x], (22) where D(ξ||η) denotes the divergence of the density ξ from the density η . The first term in Equation (22) is the divergence of fIS from fx , and is therefore minimised by setting fIS =fx . In other words, the best 4 In the earliest stages of this project we focused directly on an IS density for Yi and had difficulties identifying effective candidates. Risks 2020,8, 25 15 of 36 4.4. Computing ˆ θ Repeated evaluations of ˆ θ(x , ·) are necessary when computing ˆ λx at the outset of the algorithm, as well as during the second stage of the two-stage algorithm. Recall that in order to compute ˆ θ(x , z) “exactly” one must numerically solve the equation k0(θ , z) = x , which requires a non-trivial amount of CPU time. As each evaluation of ˆ θ is relatively costly, repeated evaluation would, in the absence of any further approximation (over and above that inherent in numerical root-finding), account for the vast majority of the algorithm’s total run time. In order to reduce the amount of time spent evaluating ˆ θ we fit a low degree polynomial to the function ˆ θ(x , ·) that can be evaluated extremely quickly, considerably reducing total run time. Specifically, suppose that we must compute ˆ θ(x , zn) for each of n points z1 , . . . , zn (either the sample points from the pilot simulation, or the first-stage realisations that did not land in the region of interest). We identify a small set C⊂Rd that contains each of the n points, construct a mesh of m<< n points in C , evaluate ˆ θ exactly at each mesh point, and then fit a fifth degree polynomial to the resulting data. Letting ¯ θ(x , ·) denote the resulting polynomial, we then evaluate ¯ θ(x , z1) , . . . , ¯ θ(x , zn) instead of ˆ θ(x , z1) , . . . , ˆ θ(x , zn) . If m is substantially smaller than n , then the reduction in CPU time is considerable. 5. PD-LGD Correlation Framework All of the PD-LGD correlation models listed in the introduction are special cases of the following general framework—an observation that, to the best of our knowledge, has not been made in the literature. The systematic risk factors take the form Z= (ZD , ZL) , where ZD and ZL are bivariate normal with standard normal margins and correlation ρS . Idiosyncratic risk factors take the form Yi= (Yi,D , Yi,L) , where Yi,D and Yi,L are bivariate normal with standard normal margins and correlation ρI . Associated with each exposure is a default driver Xi,Dand a loss driver Xi,L, defined as follows: Xi,D=αDZD+q1−α2 DYi,D, (35) Xi,L=αLZL+q1−α2 LYi,L. (36) The factor loadings αD and αL are constants taking values in the unit interval, and dictate the relative importance of systematic risk versus idiosyncratic risk. The correlation between default drivers of distinct exposures is ρD:=α2 D and the correlation between loss drivers of distinct exposures is ρL:=α2 L . The correlation between the default and potential loss drivers of a particular exposure is: ρDL :=αDαLρS+q1−α2 Dq1−α2 LρI, which can be positive or negative (or zero). Note that if ρS and ρI have the same sign then, since both factor loadings are positive, ρDL inherits this common sign. The realised loss on exposure iis Li=Di·Li, where: Di=1{Xi,D≤Φ−1(P)} is the default indicator associated with exposure iand Li=h(Xi,L) is called the potential loss (our terminology) associated with exposure i . Here P denotes the common default probability of all exposures and h is some function from R to [ 0, `max] . It is useful (but not necessary) to think of potential loss as Li=max( 0, 1 −Ci) , where Ci is the value of the collateral pledged to exposure iexpressed as a fraction of the loan’s notional value. Risks 2020,8, 25 16 of 36 Models in this framework are characterised by (i) the correlation structure of the risk factors, specifically restrictions on the values of ρI and ρS , and (ii) the marginal distribution of potential loss. For instance: • Frye (2000) assumes perfect systematic correlation ( ρS= 1) and zero idiosyncratic correlation (ρI=0); • Pykhtin (2003) assumes perfect systematic correlation ( ρS= 1) but allows for arbitrary idiosyncratic correlation (ρIunrestricted); • Witzany (2011) allows for arbitrary systematic correlation ( ρS unrestricted) but insists on zero idiosyncratic correlation (ρI=0); • Miu and Ozdemir (2006) allow for arbitrary systematic correlation ( ρS unrestricted) and arbitrary idiosyncratic correlation (ρIunrestricted). Note that if ρS=± 1 then the systematic risk factor is effectively one-dimensional. Indeed if ρS= 1 then Z= (Z , Z) from some standard Gaussian variable Z , and if ρS=− 1 then Z= (Z , −Z) . We refer to the case |ρS|= 1 as the one-factor case, and the case |ρS|< 1 as the two-factor case. In the one-factor case we use Z , and not Z , to denote the systematic risk factor. The first two models listed above are one-factor models, the last two are two-factor models. The marginal distribution of potential loss is determined by the specification of the function h . For instance: • Frye (2000) specifies h(x) = max( 0, 1 −a( 1 +bx)) for constants a∈R and b> 0. Potential loss takes values in [ 0, ∞) . Its density has a point mass at zero and is proportional to a Gaussian density on ( 0, ∞) . Since Li is not constrained to lie in the unit interval, this specification violates the assumptions made in Section 2.3; • Pykhtin (2003) specifies h(x) = max( 0, 1 −ea+bx) for constants a∈R and b> 0. Potential loss takes values in [ 0, 1 ) . Its density has a point mass at zero, and is proportional to a shifted lognormal density over (0, 1); • Witzany (2011) and Miu and Ozdemir (2006) both specify h(x) = B−1 a,b(Φ(x)) , where a , b> 0 and Ba,b denotes the cdf of the beta distribution with parameters a and b . Potential loss takes values in (0, 1). It is a continuous variable and follows a beta distribution. The sign of ρDL and the nature of the function h (increasing or decreasing) will in general determine the sign of the relationship between Di and Li . If ρDL > 0 then the relationship will be positive [negative] provided his decreasing [increasing], and vice versa if ρDL <0. 5.1. Computing µ(z) Here vectors z∈R2 take the form z= (zD , zL)T . In order to obtain an expression for µ(z) = E[Li|Z=z], we begin with the observation that: E[Li|Z] = E[LiDi|Z] = E[LiE[Di|Xi,L,Z]|Z] = E[LiP(Di=1|Xi,L,Z)|Z]. Thus, µ(z) = ZRh(xL)·Φ(d,m(xL,z),v)·φ(xL,αLzL, 1 −α2 L)dxL, (37) where m(xL,z):=αDzD+ρI·s1−α2 D 1−α2 L·(xL−αLzL) and v=v(xL,z):= (1−α2 D)(1−ρ2 I) Risks 2020,8, 25 17 of 36 are the conditional mean and variance of Xi,D , respectively, given that (Xi,L , Z) = (xL , z) . In general µ(z) must be evaluated using quadrature, and doing so is straightforward 6 . On average (across parameter values and points z∈R2) a single evaluation of µ(·) requires approximately one millisecond. In the one-factor case with ρS= 1 [ ρS=− 1] the expression for µ(z) = E[Li|Z=z] is obtained by plugging z= (z,z)[z= (z,−z)] into Equation (37). 5.2. Computing k(θ,z)and ˆ θ(x,z) Here again, vectors z∈R2 take the form z= (zD , zL)T . In order to derive an expression for k(θ , z) we begin with the observation that: eθLi=1(Di=0) + eθLi1(Di>0) = 1+ (eθLi−1)·1(Di>0), and since k(θ,z) = log(E[eθLi|Z=z]), we get that: k(θ,z) = log 1+ZR(eθh(xL)−1)·Φ(d,m(xL,z),v)·φ(xL,αLzL, 1 −α2 L)dxL, (38) where m(xL , z) and v are given in the previous section. In the one-factor case with ρS= 1 [ ρS=− 1] the expression for k(θ , z) = log(E[exp(θLi)|Z=z]) is obtained by plugging z= (z , z) [ z= (z , −z) ] into Equation (38) . As with µ(z) , k(θ , z) must in general be evaluated using quadrature, which is straightforward. The time required for a single evaluation of k(θ , ·) is comparable to that required for a single evaluation of µ(·). In order to compute ˆ θ we must solve the equation k0(θ , z) = x with respect to θ . Differentiating Equation (38) we get: k0(θ,z) = ∂k(θ,z) ∂θ =RRh(xL)·eθh(xL)·Φ(d,m(xL,z),v)·φ(xL,αLzL, 1 −α2 L)dxL exp(k(θ,z)) , (39) which is straightforward to compute using quadrature. A single evaluation of k0(θ , z) requires approximately twice as much time as a single evaluation of k(θ , z) . As the root of k0(θ , z) = x must be evaluated numerically, evaluating ˆ θ is much more time consuming than evaluating k or k0 . Across parameter values and points z∈R2 , and using θ= 0 as an initial guess, the average time required for a single evaluation7of ˆ θ(x,·)is slightly less than one tenth of one second. The right panel of Figure 1illustrates the relationship between expected losses and the rejection constant employed in the second stage, ˆ c=exp(ˆ θ−k(ˆ θ , z)) . We see that ˆ c is essentially a decreasing function of µ(z) , such that ˆ c→ 1 as µ(z)→x and ˆ c→∞ as µ(z)→ 0. The left panel of Figure 1illustrates the graph of the LDA approximation P(¯ LN>x|Z=z)≈exp(−Nq(x , z)) . The approximation is identically equal to one inside the region of interest, and decays to zero very rapidly outside the region. In other words, most of the variability in the function q(x,·)occurs along, and just outside, the boundary of the region of interest. 6 All calculations are carried out using Matlab 2018a on a 2015 MacBook Pro with 6.8 GHz Intel Core i7 processor and 16 GB (1600 MHz) of memory. Numerical integration is performed using the built-in integral function. 7We use the Matlab function fzero for the root-finding. Risks 2020,8, 25 18 of 36 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 100 101 102 103 104 Expected Losses and Rejection Constant 0 4 0.2 0.4 2-2 0.6 -2.5 LDA Approximation to Conditional Tail Probability 0 0.8 -3 1 -2 -3.5 -4 -4 Figure 1. The left panel of this figure illustrates the relationship between expected losses µ(z) and the second-stage rejection constant ˆ c=ˆ c(x , z) , in the two-factor model. The right panel illustrates the graph of the LDA approximation of Equation (13) . Parameters (randomly selected using the procedure in Section 5.3) in both panels are (P , ρD , ρL , ρI , ρS , a , b , N) = (0.0063, 0.3964, 0.2794, − 0.3356, − 0.7599, 0.6497, 0.5033, 134) and the threshold is x = 0.1575. Mean losses are E[Li] = 0.0029, and the probability that losses exceed the threshold x is on the order of 50 basis points. Points in the left panel were obtained by generating 1000 realizations of the systematic risk factors from their actual distribution (as opposed to the first-stage IS distribution) using the indicated parameter values. 5.3. Exploring the Parameter Space The model contains five parameters, in addition to any parameters associated with the transformation h . We are ultimately interested in how well the proposed algorithms perform across a wide range of different parameter sets. As such, in our numerical experiments we will randomly select a large number of parameter sets according to the procedure described below, and assess the algorithms’ performance for each parameter set. • Generate the default probability P uniformly between 0% and 10%, and generate each of the correlations ρD=α2 Dand ρL=α2 Luniformly between 0% and 50%; • In the one-factor model, generate ρS uniformly on {− 1, 1 } , i.e., ρS takes on the value − 1 or + 1 with equal probability. If ρS= 1 we generate ρI uniformly between 0% and 100%, and if ρS=− 1 we generate ρI uniformly between − 100% and 0%. This allows us to control the sign of ρDL , which we must do in order to ensure a positive relationship between default and potential loss. In the two-factor model we randomly generated ρS uniformly on [− 1, 1 ] . If ρS is positive, randomly generate ρIuniformly on [0, 1], otherwise randomly generate ρIuniformly on [−1, 0]; • We choose the transformation h(·) to ensure that (i) potential loss is beta distributed and (ii) there is a positive relationship between default and loss. The paramters a and b of the beta distribution are generated independently from an exponential distribution with unit mean. If ρDL < 0 we set h(x) = B−1 a,b(Φ(x)) and if ρDL > 0 we set h(x) = B−1 a,b(Φ(−x)) , where Ba,b(·) is the cumulative distribution function for the beta distribution with parameters a and b . Note that under these restrictions, in the one-factor model the expected loss function µ(z)is monotone decreasing. In order to ensure that we are considering cases of practical interest, we randomise the portfolio size and loss threshold as follows. •Generate the number of exposures randomly between 10 and 5000; • In the one-factor model we generate the threshold x by setting x=µ(Φ−1( 10 −q)) , where q is uniformly distributed on [1, 5]. The LPA suggests that px=P(¯ LN>x)≈P(µ(Z)>x) = P(Z<µ−1(x)) = 10−q. Risks 2020,8, 25 19 of 36 This means that log(px) , the order of magnitude of the probability of interested, is approximately uniformly distributed on [− 5, − 1 ] . In the two-factor model we set x=µ(zq) , where zq= (Φ−1(q),ρSΦ−1(q)) and qis uniformly distributed on [−5, −1]. 6. Implementation In this section we discuss our implementation of the algorithm proposed in Section 3in the general framework outlined in Section 5. As the general framework encompasses many of the PD-LGD correlations that have been proposed in the literature, this section effectively discusses implementation of the proposed algorithm across a wide variety of models that are used in practice. 6.1. Selecting the IS Density for the Systematic Risk Factors The systematic risk factors here are Gaussian. When constructing their IS density we could either shift their means and leave their variances (and correlations) unchanged, or shift their means and adjust their variances (and correlations). Recall that the ultimate goal is to choose an IS density that closely resembles the ideal density fx given in Equation (15) . As illustrated 8 in Figure 2, the ideal density fx tends to be very tightly concentrated about its mean, and adjusting the variance of the systematic risk factors leads to a much better approximation to the ideal density for “typical values” of the ideal density. The left tail of the ideal density is, however, heavier than the variance-adjusted IS density, an issue that can be resolved by trimming large IS weights. -5 -4.5 -4 -3.5 -3 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Normal Approximation to Optimal Density -4 -3.5 -3 -2.5 -2 0 0.5 1 1.5 2 2.5 Normal Approximation to Optimal Density Figure 2. This figure illustrates fx (in fact, the approximation of Equation (40) ) for two randomly generated sets of parameters. Each panel superimposes (i) a normal density with the same mean and variance as fx (dashed blue line), and (ii) a normal density with the same mean as fx and unit variance (dash-dot red line). The mean and variance of fx are computed via (computationally inefficient) quadrature. The mean and variance of fx are computed using quadrature. Parameters in the right panel are (P , ρD , ρL , ρI , ρS , a , b , N) = (0.02, 0.33, 0.27, 0.96, 1, 2.47, 4.32, 454), and for the left panel they are (P , ρD , ρL , ρI , ρS , a , b , N) = (0.03, 0.13, 0.12, 0.85, 1, 1.81, 1.90, 271). In both cases, the transformation his taken to be h(x) = B−1 a,b(Φ(x)). The downside to adjusting the variance of the systematic risk factors is that it can lead to first-stage IS weights with infinite variance, but numerical evidence suggests that this issue can be mitigated by 8 In the one-factor model, a tractable approximation to the ideal density can be obtained by using the LDA of Equation (13) to approximate both probabilities appearing in Equation (15). The result is: fx(z)≈exp(−Nq(x,z)) ·φ(z) RRexp(−Nq(x,w)) ·φ(w)dw , (40) and the right-hand side of Equation (40) can be approximated via quadrature. As the integrand involves ˆ θ , the approximation is computationally very slow. Risks 2020,8, 25 20 of 36 trimming large weights. Indeed, numerical experiments 9 suggest that adjusting variance and trimming large weights leads to substantially more accurate estimators of px . Intuitively, it is more important for the IS density to mimic the behaviour of the ideal density over its “typical range”, as opposed to faithfully representing its tail behaviour. In addition to improving statistical accuracy, adjusting variance has the added benefit of making the second stage of the algorithm more computationally efficient in terms of run time. Indeed, as discussed in more detail in Section 6.3, adjusting variance tends to increase the proportion of first-stage simulations that land in the region of interest (thereby reducing the number of times the rejection sampling algorithm must be employed in the second stage) and reduces the average size of the rejection constants employed in the second stage (thereby making the rejection algorithm more effective whenever it must be employed). 6.2. First Stage In this section we explain how to efficiently approximate the parameters of the optimal IS density for the systematic risk factors, in both the one- and two-factor models. We also explain how we trim large IS weights, and demonstrate that the resulting bias is negligible. 6.2.1. Computing Parameters in the Two-Factor Model In the two-factor model the systematic risk factors are bivariate Gaussian with zero mean vector and covariance matrix: Σ="1ρS ρS1#. The mean vector and covariance matrix that satisfy the criteria of Equation (25) are:10 µIS :=E[Z|¯ LN>x](41) and ΣIS :=E[(Z−µIS)(Z−µIS)T|¯ LN>x], (42) respectively. In order to approximate the suggested mean vector and covariance matrix we use Equation (27) to get: µIS ≈E[exp(−Nq(x,Z)) ·Z] E[exp(−Nq(x,Z))] (43) and ΣIS ≈E[exp(−Nq(x,Z)) ·(Z−µIS)(Z−µIS)T] E[exp(−Nq(x,Z))] . (44) The expected values appearing on the right-hand sides of Equations (43) and (44) are both amenable to simulation, and we use a small pilot simulation of size Mp<< M to approximate them. In our numerical examples, the size of the pilot simulation is 10% of the sample size that is eventually used to estimate px. 9 Whether or not we adjust the variance of the systematic risk factor, the standard error of the resulting estimator is of the form ν/√M , where ν depends on the model parameters and is easily estimated via simulation. Using 100 randomly selected parameter sets from the one-factor model, selected according to the procedure described in Section 5.3, we find that for the one-stage estimator νMS/νVA ≈ 1.54 p−0.03 x , where νMS denotes the value of ν assuming we only shift the mean of the systematic risk factor and do not adjust its variance and νVA denotes the value when we do adjust variance. For probabilities in the range of interest, then, adjusting the variance of the systematic risk factor leads to an estimator that is nearly four times as efficient, in the sense that the sample size required to achieve a given degree of accuracy (as measured by standard error) is nearly four times larger if we do not adjust variance. 10 As discussed in Appendix B, the natural sufficient statistic here consists of the components of Z plus the components of ZZT . As such, in order to satisfy Equation (27) we must ensure that EIS[Z] = E[Z|¯ LN>x] and EIS[ZZT] = E[ZZT|¯ LN>x] , where EIS denotes mean under the IS distribution. These conditions are clearly equivalent to Equations (41) and (42).. Risks 2020,8, 25 21 of 36 In order to implement the approximation we must first simulate the systematic risk factors and then compute q(x , z) for each sample point z . The most natural way to proceed is to (i) sample the systematic risk factors from their actual distribution (bivariate Gaussian with zero mean vector and covariance matrix Σ ) and (ii) numerically solve the equation k0(θ , z) = x in order to compute compute ˆ θ(x , z) for each pilot sample point z that lies outside the region of interest. In our experience this leads to unacceptably inefficient estimators, in terms of both (i) statistical accuracy and (ii) computational time. We deal with each issue in turn. As most of the variation in q(x , ·) occurs just outside the boundary of the region of interest (recall the right panel of Figure 1), we suggest using an IS distribution for the pilot simulation that is centered on the boundary of the region. Specifically, we suggest using that point on the boundary at which the density of the systematic risk factors attains its maximum value (i.e., the most likely point on the boundary): zx:=arg min{zTΣ−1z:µ(z) = x}. (45) The non-linear minimisation problem appearing above is easily and rapidly solved using standard techniques. We used fmincon function in Matlab. As zx lies on the boundary of the region of interest, roughly half the pilot sample will lie outside the region. In Section 5.2 we noted that it takes nearly one tenth of one second to numerically solve the equation k0(θ , z) = x . As such, if we are to compute ˆ θ exactly (i.e., by numerically solving the indicated equation) for each sample point that lies outside the region of interest, the total time required (in seconds) to estimate the first-stage IS parameters will be at least Mp/ 20. In our numerical examples we use a pilot sample size of Mp= 1000, which means that it would take nearly one full minute to compute the first-stage IS parameters. This discussion suggests that reducing the number of times we must numerically solve the equation k0(θ , z) = x could lead to a dramatic reduction in computational time. We suggest fitting a low degree polynomial to the function ˆ θ(x , ·) , over a small region in R2 that contains all of the pilot sample points that lie outside the region of interest. Specifically, we determine the smallest rectangle that contains all of the pilot sample points, and discretize the rectangle using a mesh of n2 g points, equally spaced in each direction. Next, we identify those mesh points that lie outside the region of interest and compute ˆ θ(x , z) exactly (i.e., by solving k0(θ , z) = x numerically) for each such point. Finally, we fit a polynomial to the resulting (z , ˆ θ(x , z)) pairs and call the resulting function ¯ θ(x , ·) . Numerical evidence indicates at using a fifth-degree polynomial and a mesh with 15 2= 225 points leads to a sufficiently accurate approximation to ˆ θ(x , ·) over the indicated range (the intersection of (i) the smallest rectangle that contains all sample points and (ii) the complement of the region of interest). Note that ¯ θ could be an extremely inaccurate approximation to ˆ θ outside this range, but that is not a concern because we will never need to evaluate it there. It remains to compute q(x , z) for each of the pilot points z . For those points z that lie inside the region of interest, we set q(x , z) = 0. For those points that lie inside the region, we set q(x , z) = ¯ θx−k(¯ θ , z) , where ¯ θ=¯ θ(x , z) . Evaluating ¯ θ(x , ·) requires essentially no computational time (it is a polynomial), and if the mesh size and degree are chosen appropriately the difference between ˆ θ and ¯ θ is very small. In total, the suggested procedure reduces the number of evaluations of ˆ θ from Mp/ 2 to ng/ 2, for a percentage reduction of n2 g/Mp . In our numerical examples we use ng= 15 and Mp=1000, which corresponds to a reduction of 75% in computational time. To summarise, we estimate the optimal first-stage IS parameters as follows. First, we compute zx . Second, we draw a random sample of size Mp from the Gaussian distribution with mean vector zx and covariance matrix Σ . Third, we construct ¯ θ(x , ·) , the polynomial approximation to ˆ θ(x , ·) , as described Risks 2020,8, 25 22 of 36 in the previous paragraph. Fourth, for those sample points z that lie outside the region of interest we compute q(x,z)using ¯ θinstead ˆ θ. The estimates of the optimal first-stage IS parameters are then: ˆ µIS =∑Mp m=1w(Zm)exp(−Nq(x,Zm))Zm ∑Mp m=1w(Zm)exp(−Nq(x,Zm)) and ˆ ΣIS =∑Mp m=1w(Zm)exp(−Nq(x,Zm))(Zm−ˆ µIS)(Zm−ˆ µIS)T ∑Mp m=1w(Zm)exp(−Nq(x,Zm)) , where Z1, . . . , ZMpis the random sample and w(z) = φ(z;0,Σ) φ(z;zx,Σ) is the IS weight associated with shifting the mean of the systematic risk factors from 0 to zx . The upper left panel of Figure 3illustrates a typical situation where the mean of the IS distribution lies “just inside” the region of interest. -2.95 -2.9 -2.85 -2.8 -2.75 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Region of Interest Figure 3. This figure illustrates the locations of (i) the importance sampling (IS) mean used for the pilot simulation and (ii) the IS mean used for the actual simulation, relative to the region of interest. Parameters (randomly selected using the procedure in Section 5.3) in both panels are (P , ρD , ρL , ρI , ρS , a , b , N) = (0.0063, 0.3964, 0.2794, -0.3356, -0.7599, 0.6497, 0.5033, 134) and the threshold is x= 0.1575. Mean losses are E[Li]= 0.0029. 6.2.2. Computing Parameters in the One-Factor Model The procedure described in the previous section specialises in the one-factor case as follows. First, under the parameter restrictions outlined in Section 5.3, the expected loss function µ(z) is a strictly decreasing function of z . As such, the region of interest is the semi-infinite interval (−∞ , zx) , where zx:=µ−1(x) , and its boundary is the single point zx . In general zx must be computed numerically, which is straightforward. Second, we draw a random sample of size Mp from the Gaussian distribution with mean zx and unit variance. Third, the polynomial approximation to ˆ θ is constructed by evaluating ˆ θ exactly (i.e., by numerically solving the equation k0(θ , z) = x ) at each of ng equally-spaced points z in the interval [z− , z+] , where z− and z+ are the largest and smallest values obtained in the pilot simulation, respectively, and then fitting a polynomial to the resulting (z , ˆ θ(x , z)) pairs. Fourth, we Risks 2020,8, 25 23 of 36 evaluate q(x , z) for each pilot sample point z as follows—if z lies inside the region of interest we set q(x , z) = 0, otherwise we compute q(x , z) by replacing the exact value ˆ θ(x , z) with the approximate value ¯ θ(x , z) , where ¯ θ is the polynomial constructed in the previous step. Note that a single evaluation of ¯ θ requires far less computational time than a single evaluation of ˆ θ . Finally, the approximations to the first-stage IS parameters are: ˆ µIS =∑Mp m=1w(Zm)exp(−Nq(x,Zm))Zm ∑Mp m=1w(Zm)exp(−Nq(x,Zm)) and ˆ σ2 IS =∑Mp m=1w(Zm)exp(−Nq(x,Zm))(Zm−ˆ µIS)2 ∑Mp m=1w(Zm)exp(−Nq(x,Zm)) , where Z1, . . . , ZMpis the random sample and w(z) = φ(z; 0, 1) φ(z;zx, 1). is the IS weight associated with shifting the mean of the systematic risk factor from 0 to zx. 6.2.3. Trimming Large Weights In the one-factor model the first-stage IS weight will have infinite variance whenever σ2 IS < 0.5 (see Remark A1 in Appendix B). In a sample of 100 parameter sets, randomly selected according to the procedure in Section 5.3, the largest realised value of σ2 IS was 0.38, and the mean and median were 0.11 and 0.09, respectively. It appears, then, that the first-stage IS weight in the one-factor model will have infinite variance in all cases of practical interest. We trim large weights as described in Section 4.2, using the set: A={z∈R:|z−ˆ µIS| ≤ Cˆ σIS} for some constant C . In the numerical examples that follow we use C= 4, in which case we expect to trim less than 0.01% of the entire sample. Specialising Equation (34) to the present context, we get that an upper bound on the associated bias is given by: ZACexp(−Nq(x,z))φ(z)dz , (46) which is straightforward (albeit slow) to compute using quadrature. Figure 4illustrates the relationship between the probability of interest px and the upper bound of Equation (46) for the 100 randomly generated parameter sets, and clearly demonstrates that the bias associated with our trimming procedure is negligible. For instance, for probabilities on the order of 10 −3 the bias is no larger than 10−5, or 1% of the quantity of interest. In the two-factor model the first-stage IS weight will have infinite variance whenever det( 2 Σ−1− Σ−1 IS )< 0. In a random sample of 100 parameter sets, this condition occurred 96 times. As in the one-factor model, then, the first-stage IS weight in the two-factor model can be expected to have infinite variance in most cases of practical interest. We trim large weights using the set: A=nz∈R2:(z−ˆ µIS)Tˆ Σ−1 IS (z−ˆ µIS)| ≤ C2o for some constant C, and use C=4 in the numerical examples that follow. Risks 2020,8, 25 24 of 36 10-1 10-2 10-3 10-4 10-5 10-7 10-6 10-5 10-4 10-3 Figure 4. This figure illustrates the bias introduced by trimming large weights (vertical axis) as a function of the probability of interest (horizontal axis), for 100 randomly generated parameter sets in the one-factor case. For each set, we compute bias (in fact, an upper bound on the bias) by using quadrature to approximate Equation (46) and estimate the probability of interest using the full two-stage algorithm. 6.3. Second Stage The first stage of the algorithm consists of (i) computing the first-stage IS parameters, (ii) simulating a random sample of size M from the systematic risk factors’ IS distribution, and (iii) computing the associated IS weights, trimming large weights appropriately. Having completed these tasks, the next step is to simulate individual losses in the second stage. In the remainder of this section we let z= (zD , zL) denote a generic realisation of the systematic risk factors obtained in the first stage. 6.3.1. Approximating ˆ θ Before generating any individual losses first construct the polynomial approximation to ˆ θ , using the same procedure described in Section 6.2.1. The basic idea is to fit a relatively low degree polynomial to the surface of ˆ θ(x , ·) , over a small region that contains all of the first-stage sample points. The values of z obtained in the pilot sample are invariably different from those obtained in the first stage, so it is essential that the polynomial is refit to account for this fact. In what follows we use ¯ θ to approximate ˆ θ whenever the numerical value of ˆ θ is required, but since the difference between the two is small we do not distinguish between the two (i.e., we write ˆ θin this document, but use ¯ θin our code). 6.3.2. Sampling Individual Losses In this section we describe how to sample individual losses in the two-factor model. The procedure carries over in an obvious way to the one-factor model, so we do not discuss that case explicitly. If z lies inside the region of interest then the second stage is straightforward. For a given exposure i , we first simulate the exposure’s idiosyncratic risk factors Yi= (Yi,D , Yi,L) , from the bivariate normal distribution with standard normal margins and correlation ρI. Next, we set: (Xi,D,Xi,L) = (αDzD+q1−α2 DYi,D,αLzL+q1−α2 LYi,L). Risks 2020,8, 25 31 of 36 the parameter set used to produce the figure, they are representative of other parameter sets. In other words, the behaviour illustrated in Figure 8is representative of the general framework overall. 8. Concluding Remarks This paper developed an importance sampling (IS) algorithm for estimating large deviation probabilities for the loss on a portfolio of loans. In contrast to existing literature, we allowed loss given default to be stochastic and correlate with the default rate. The proposed algorithm proceeded in two stages. In the first stage one generates systematic risk factors from an IS distribution that is designed to increase the rate at which adverse macroeconomic scenarios are generated. In the second stage one checks whether or not the simulated macro environment is sufficiently adverse—if it is then no further IS is applied and idiosyncratic risk factors are drawn from their actual (conditional) probability distribution, if it is not then one indirectly applies IS to the conditional distribution of the idiosyncratic risk factors. Numerical evidence indicated that the proposed algorithm could be thousands of times more efficient than algorithms that did not employ any variance reduction techniques, across a wide variety of PD-LGD correlation models that are used in practice. Author Contributions: Both authors contributed equally to all parts of this paper. Both authors have read and agreed to the published version of the manuscript. Funding: This research was funded by NSERC Discovery Grant 371512. Acknowledgments: This work was made possible through the generous financial support of the NSERC Discovery Grant program. The authors would also like to thank Agassi Iu for invaluable research assistance. Conflicts of Interest: The authors declare no conflict of interest. Appendix A. Exponential Tilts and Large Deviations Let X1 , X2 , . . . , be independent and identically distributed random variable with common density f(x) , having bounded support [xmin , xmax] , and common mean µ=E[Xi] . For θ∈R we let m(θ) = E[exp(θXi)] and k(θ) = log(m(θ)) denote the common moment generating function (mgf) and cumulant generating function (cgf) of the Xi, respectively. Note that µ=m0(0) = k0(0). Appendix A.1. Properties of k(θ) Elementary properties of cgfs ensure that k0(·) is a strictly increasing function that maps R onto (xmin , xmax) . One implication is that, for fixed t∈(xmin , xmax) , the graph of the function θ7→ θt−k(θ) is ∩ -shaped. The graph also passes through the origin, and its derivative at zero is t−µ . If this derivative is positive (i.e., if µ<t ) then the unique maximum is strictly positive and occurs to the right of the origin. If it is negative (i.e., if µ>t ) then the unique maximum is strictly positive and occurs to the left of the origin. If it is zero (i.e., if µ=t ) then the unique maximum of zero is attained at the origin. For a given t∈(xmin , xmax) , there is a unique value of θ for which k0(θ) = t . We let e θ=e θ(t) denote this value of θ . Note that e θ(t) is a strictly increasing function of t and that e θ(µ) = 0. Thus e θ is positive [negative] whenever t>µ [ t<µ ]. An important quantity in what follows is b θ=b θ(t):=max( 0, e θ(t)) , which can be interpreted as the unique value of θ for which k0(θ) = max(µ , t) . Note that if t≤µ then b θ=0, and if t>µthen b θ(t)>0. Appendix A.2. Legendre Transform of k(θ) We let q(·)denote the Legendre transform of k(·)over [0, ∞). That is, q(t):=max θ≥0(θt−k(θ)) = ˆ θt−k(ˆ θ), (A1) where ˆ θ=ˆ θ(t) was defined in the previous section, and is the (uniquely defined) point at which the function θ7→ θt−k(θ) attains its maximum on [ 0, ∞) . Based on the discussion in the preceding Risks 2020,8, 25 32 of 36 paragraph, we see that ˆ θ(t) = q(t) = 0 whenever µ≥t , whereas both ˆ θ(t) and q(t) are strictly positive whenever µ<t. The derivative of the transform qis demonstrably equal to: q0(t) = ˆ θ(t) + ˆ θ0(t)·[t−k0(ˆ θ(t))] . Since ˆ θ= 0 whenever t≤µ and k0(ˆ θ) = t whenever t>µ , the second term above vanishes for all t , and we find that: q0(t) = ˆ θ(t). (A2) Appendix A.3. Exponential Tilts For θ∈Rwe define: fθ(x):=exp(θx−k(θ)) ·f(x). (A3) The density fθ is called an exponential tilt of f . As the value of the tilt parameter θ varies, we obtain an exponential family of densities (exponential families have lots of very useful properties, and this is an easy way of constructing them). If θ is positive then the right and left tails of fθ are heavier and thinner, respectively, than those of f . The opposite is true if θ is negative. The larger in magnitude is θ , the greater the discrepancy between fand fθ; indeed the Kullback–Leibler divergence from fθto fis −θµ +k(θ), which is a strictly convex function of θthat attains its minimum value (of zero) at θ=0. It is readily verified that k0(θ) = Eθ[Xi] , where Eθ denotes expectation with respect to fθ . This observation, in combination with the developments in Section A.1, implies that it is always possible to find a density of the form (A3) whose mean is t , whatever the t∈(xmin , xmax) . Indeed f˜ θ is precisely such a density. Under mild conditions, f˜ θ(·) can be characterised as that density that most resembles f (in the sense of minimum divergence), among all densities whose mean is x (and are absolutely continuous with respect to f). Recall that ˆ θ is the unique value of θ for which k0(θ) = max(t , µ) . We can therefore interpret fˆ θ as that density that most resembles f , among all densities whose mean is at least t (and that are absolutely continuous with respect to f ). Note in particular hat the mean of fˆ θ is max(µ , t) . The numerical value of ˆ θ can therefore be interpreted as the degree to which we must deform the density f , in order to produce a density whose mean is at least t . If µ≥t then ˆ θ= 0 and no adjustment is necessary. If µ<t then ˆ θ> 0 and mass must be transferred from the left tail to the right; the larger the discrepancy between µ(the mean of f) and t(the desired mean), the larger is ˆ θ. Appendix A.4. Behaviour of Xi, Conditioned on a Large Deviation Let ft(x) denote the conditional density of Xi , given that XN>t , where XN=1 N∑N i=1Xi . We suppress the dependence of fton Nfor simplicity. Using Bayes’ rule we get ft(x) = P(¯ XN>t|Xi=x) P(¯ XN>t)·f(x), and since the Xiare independent, we get P(¯ XN>t|Xi=x) = P(¯ XN−1>t+t−x N−1). Now, using the large deviation approximation P(XN≥t)≈exp(−N·q(t)), we get that P(¯ XN>t|Xi=x) P(¯ XN>t)≈exp(−(N−1)q(t+t−x N−1) + Nq(t)) . Risks 2020,8, 25 33 of 36 Now if Nis large then q(t+t−x N−1)≈q(t) + q0(t)·t−x N−1=q(t) + ˆ θ·t−x N−1, where we have used the fact that q0(t) = ˆ θ(t) . Putting everything together we arrive at the approximation P(XN>t|Xi=x) P(XN>t)≈exp(ˆ θx−k(ˆ θ)) , which leads to the approximation ft(x)≈exp(ˆ θx−k(ˆ θ)) ·f(x). (A4) We may thus interpret the conditional density ft as that density which most resembles the unconditional density f, but whose mean is at least t. Appendix A.5. Approximate Behaviour of (X1,X2, . . . , XN), Conditioned on a Large Deviation Let ˆ ft(x) = ˆ ft(x1, . . . , xN)denote the conditional density of (X1, . . . , XN), given that XN>t. Then ˆ ft(x) = ∏N i=1f(xi) pt,x∈AN,t, where pt=P(XN>t) and AN,t is the set of those points x∈[xmin , xmax]N whose average value exceeds t. We seek a density h(x) , supported on [xmin , xmax] , which minimizes the Kullback-Leibler divergence (KLD) of ˆ h(x):= N ∏ i=1 h(xi) from ˆ ft . In other words, we seek an independent sequence Y1 , Y2 , . . . , YN (whose density is ˆ h ) whose behaviour most resembles (in a certain sense) the behaviour of X1 , X2 , . . . , XN , conditioned on the large deviation XN>t. Now let Egdenote expectation with respect to the density g. Then the divergence of ˆ hfrom ˆ ftis Eˆ ft[log(ˆ ft(X)/ˆ h(X))] = N ∑ i=1 Eˆ ft[log (f(Xi)/h(Xi))] −log(pt) =N·Eˆ ft[log (f(X1)/h(X1))] −log(pt) =N·Eft[log (f(X1)/h(X1))] −log(pt) =N·Eft[log (f(X1)/ft(X1))] +N·Eft[log (ft(X1)/h(X1))] −log(pt) Now, the middle term in the above display is the KLD of h from ft . As such it is non-negative, and is equal to zero if and only if h=ft . It follows immediately that the divergence of ˆ h from ˆ ft is minimised by setting h=ft. Appendix B. Important Exponential Families This appendix considers two important special cases—the Gaussian and t families—of the general setting discussed in Section 2.2. Risks 2020,8, 25 34 of 36 Appendix B.1. Gaussian Suppose first that the Z is Gaussian with mean vector µ0∈Rd and positive definite covariance matrix Σ0 . When specifying the IS distribution, one can either (i) shift the mean of Z but leaves its covariance structure unchanged or (ii) shift its mean and adjust its covariance structure. In general the latter approach will lead to a better approximation of the ideal IS density but more volatile IS weights. If we take the former approach (shifting mean, leaving covariance structure unchanged), the implicit family in which we are embedding f is the Gaussian family with arbitrary mean vector µ∈Rd and fixed covariance matrix Σ0 . To this end, let f(z) = φ(z ; µ0 , Σ0) denote the Gaussian density with mean vector µ0 and covariance matrix Σ0 and let fλ(z) = φ(z ; µ , Σ0) . It remains to identify the natural sufficient statistic and write the natural parameter λ in terms of the mean vector µ . To this end, note that fλ(z) f(z)=exp (µT−µT 0)Σ−1 0z−1 2µTΣ−1µ+1 2µT 0Σ−1µ0. The natural sufficient statistic is therefore S(z) = (z1, . . . , zd), the natural parameter is λ(µ) = Σ−1 0(µ−µ0). Note that we can write µ(λ) = µ0+Σ0λ , so that the natural parameter represents a sort of normalized deviation from the actual mean µ0to the IS mean µ. Lastly, we see that the cgf of S(Z)is K(λ) = 1 2hµT λΣ−1 0µλ−µT 0Σ−1 0µT 0i=λTµ0+1 2λTΣ0λ, where we have written µλ instead of µ(λ) in the above display. Clearly, we have that both K(λ) and K(−λ) are well-defined for all λ∈Rd . The implication is that if we shift the mean of Z but leave its covariance structure unchanged, the IS weight will have finite variance regardless of what IS mean we choose. If we take the former approach (shifting mean, adjusting covariance) the implicit family in which we are embedding f is the Gaussian family with arbitrary mean vector µ and arbitrary positive definite covariance matrix Σ. In this case we have fλ(z) = φ(z;µ,Σ)and the ratio of fλ(z)to f(z)is exp((µTΣ−1−µT 0Σ−1 0)z+1 2zT(Σ−1 0−Σ−1)z−ˆ K(µ,Σ)) , where ˆ K(µ,Σ) = 1 2hµTΣ−1µ−µT 0Σ−1 0µ0+log(det(Σ)−log(det(Σ0)i. The natural sufficient statistic therefore consists of the d elements of the vector z plus the d2 elements of the vector zzT. The natural parameter λconsists of the elements of the vector λ1:=λ1(µ,Σ) = Σ−1µ−Σ−1 0µ0 plus the elements of the matrix λ2:=λ2(Σ) = 1 2(Σ−1 0−Σ−1). Note that since we have assumed Σ is positive definite, we are implicitly assuming that the matrix λ2 is such that the determinant of 1 2Σ−1 0−λ2 is strictly positive. The natural parameter space is therefore unrestricted for λ1 , but restricted (to matrices such that the indicated determinant is strictly positive) for λ2. Risks 2020,8, 25 35 of 36 The above relations can be inverted to write µand Σin terms of λ1and λ2, indeed Σ=Σ(λ2) = (Σ−1 0−2λ2)−1 and µ=µ(λ1,λ2) = (Σ−1 0−2λ2)−1(λ1+Σ−1 0µ0). The cgf of the natural sufficient statistic is K(λ) = K(λ1,λ2) = ˆ K(µλ1,λ2,Σλ2) = 1 2µT λ1,λ2Σ−1 λ2µλ1,λ2−1 2µT 0Σ−1 0µ0+1 2log(det(Σλ2)) −1 2log(det(Σ0)) It is now clear that K(λ) is well defined if and only if the determinant of Σ(λ2) is strictly positive, which we have implicitly assumed to be the case since we have insisted Σ be positive definite. It is also clear that K(−λ) is well-defined if and only if the determinants Σ(−λ2) is strictly positive, which will occur if and only if the determinant of (2Σ−1 0−Σ−1)is strictly positive. Remark A1. Suppose that f and fλ are Gaussian densities with respective positive definite covariance matrices Σ0 and Σ . Further suppose that Z∼fλ . Then the variance of f(Z)/fλ(Z) is finite if and only if det( 2 Σ−1 0− Σ−1)>0. In the one-dimensional case d= 1 we write Z=Z . The condition in Remark A1 is satisfied whenever σ2>σ2 0/ 2. In other words, if the variance of the IS distribution is too small, relative to actual variance of Z, then the IS weight will have infinite variance. Appendix B.2. Chi-Square Family In preparation for the multivariate t family, we first consider the chi-square family. Suppose that Z follows a chi-square distribution with ν0 degrees of freedom, and that the goal is to allow Z to have arbitrary degrees of freedom ν> 0 under the IS density. In order to identify the natural sufficient statistic S(z) and natural parameter λ=λ(ν) , we let f(z) denote the chi-square density with ν0degrees of freedom and fλ(z)the chi-square density with νdegrees of freedom. Then fλ(z) f(z)=exp ν−ν0 2log(z)−ν−ν0 2log(2) + log Γν 2−log Γν0 2 from which we see that S(z) = log(z) and λ=λ(ν)=(ν−ν0)/ 2. In addition we see that the cgf of S(z)is K(λ) = λlog(2) + log (Γ(λ+ν0/2)) −log(Γ(ν0/2)) . In order that K(λ) be will defined, we require ν> 0, which is obvious. In order that K(−λ) is well-defined we require −λ+ν0 2be positive, which in turn requires ν<2ν0. In other words, if the IS degrees of freedom are more than twice the actual degrees of freedom, then the IS weight will have infinite variance. Appendix B.3. t Family The t family is not a regular exponential family, so it does not fit directly into the framework discussed in Section 2.2. That being said, a multivariate t vector can be constructed from a Gaussian vector and an independent chi-square variable. Indeed if ˆ Z is Gaussian with mean zero and covariance matrix Σ0, and Ris chi-square with ν0degrees of freedom (independent of ˆ Z), then Z=µ0+rν0 R·ˆ Z, (A5) is multivariate twith ν0degrees of freedom, mean µ0and covariance matrix ν0 ν0−2Σ0. Risks 2020,8, 25 36 of 36 In the case that Z is multivariate t , then, we can take our systematic risk factors to be the components of (ˆ Z , R) . In this case the joint density of the systematic risk factors can be embedded into the parametric family fλ,η(ˆz,r):=exp(λTS(ˆz)−K(λ)) ·exp(ηTT(r)−L(η)) ·f(ˆz)·g(r), (A6) where λ is and S are the natural parameter and sufficient statistic for the Gaussian family, η and L are those for the chi-square family, and fand gare the Gaussian and chi-square densities. References Bickel, Peter J., and Kjell A. Doksum. 2001. Mathematical Statistics: Basic Ideas and Selected Topics, 2nd ed. Upper Saddle River: Prentice Hall, Volume 1. Chan, Joshua C.C., and Dirk P. Kroese. 2010. Efficient estimation of large portfolio loss probabilities in t -copula models. European Journal of Operational Research 205: 361–67. Chatterjee, Sourav, and Persi Diaconis. 2018. The sample size required in importance sampling. Annals of Applied Probability 28: 1099–135. [CrossRef] de Wit, Tim. 2016. Collateral Damage—Creating a Credit Loss Model Incorporating a Dependency between Defaults and LGDs. Master’s thesis, University of Twente, Enschede, The Netherlands. Deng, Shaojie, Kay Giesecke, and Tze Leung Lai. 2012. Sequential importance sampling and resampling for dynamic portfolio credit risk. Operations Research 60: 78–91. [CrossRef] Eckert, Johanna, Kevin Jakob, and Matthias Fischer. 2016. A credit portfolio framework under dependent risk parameters PD, LGD and EAD. Journal of Credit Risk 12: 97–119. [CrossRef] Frye, Jon. 2000. Collateral damage. Risk 13: 91-94. Frye, Jon, and Michael Jacobs Jr. 2012. Credit loss and systematic loss given default. Journal of Credit Risk 8: 109–140. [CrossRef] Glasserman, Paul, and Jingyi Li. 2005. Importance sampling for portfolio credit risk. Management Science 51: 1643–56. [CrossRef] Ionides, Edward L. 2008. Truncated importance sampling. Journal of Computational and Graphical Statistics 17: 295–311. [CrossRef] Jeon, Jong-June, Sunggon Kim, and Yonghee Lee. 2017. Portfolio credit risk model with extremal dependence of defaults and random recovery. Journal of Credit Risk 13: 1–31. [CrossRef] Kupiec, Paul H. 2008. A generalized single common factor model of portfolio credit risk. Journal of Derivatives 15: 25–40. [CrossRef] Miu, Peter, and Bogie Ozdemir. 2006. Basel requirements of downturn loss given default: Modeling and estimating probability of default and loss given default correlations. Journal of Credit Risk 2: 43–68. [CrossRef] Pykhtin, Michael. 2003. Unexpected recovery risk. Risk 16: 74–78. Scott, Alexandre, and Adam Metzler. 2015. A general importance sampling algorithm for estimating portfolio loss probabilities in linear factor models. Insurance: Mathematics and Economics 64: 279–93. Sen, Rahul. 2008. A multi-state Vasicek model for correlated default rate and loss severity. Risk 21: 94–100. Witzany, Jiˇrí. 2011. A Two-Factor Model for PD and LGD Correlation. Working Paper. Available online: http://dx.doi.org/10.2139/ssrn.1476305 (accessed on 9 March 2020). c 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).