Checkerboard copula defined by sums of random variables

Abstract: We consider the problem of nding checkerboard copulas for modeling multivariate distributions. A checkerboard copula is a distribution with a corresponding density de ned almost everywhere by a step function onanm-uniform subdivision of the unit hyper-cube.Wedevelop optimizationprocedures for nding copulas de ned by multiply-stochastic matrices matching available information. Two types of information are used for building copulas: 1) Spearman Rho rank correlation coe cients; 2) Empirical distributions of sums of random variables combined with empirical marginal probability distributions. To construct checkerboard copulas we solved optimization problems. The rst problem maximizes entropy with constraints on Spearman Rho coe cients. The second problem minimizes some error function to match available data. We conducted a case study illustrating the application of the developed methodology using property and casualty insurance data. The optimization problems were numerically solved with the AORDA Portfolio Safeguard (PSG) package, which has precoded entropy and error functions. Case study data, codes, and results are posted at the web.


Introduction
The objective of the paper is to build a joint distribution of incurred losses (or loss ratios) for a set of correlated classes in insurance business. Some empirical information about the dependence structure of these classes of business is available and we want to build a copula of a joint distribution. This methodology is relevant in any situation where an aggregate loss distribution across correlated classes of business needs to be found. It is especially helpful in representing simultaneous large losses in many classes, a particularly thorny problem in actuarial science.
Suppose that the following information about random variables (losses) is available: a) distributions for m one-dimension random variables; b) distributions for sums of some of these random variables. For instance, we know distributions of 3 random variables, and we know the distribution of the sum of the rst two random variables. The main objective of this paper is to develop methodology for nding a copula which matches available information. To our knowledge, this is an original research contribution which is not covered in other papers. We do not know other approaches for calibrating a copula based on such information. For instance, papers [9,10] consider copulas based on general partitions-of-unity. However, the problem addressed in this paper was not considered in these publications.
The second objective of the paper is to review earlier results on calibrating checkerboard copulas by maximizing entropy. This review is motivated by the case study for nding a copula with known Spearman's rank correlation coe cients (which are called also grade correlation coe cients).
We conducted a case study illustrating the application of the developed methodology using property and casualty insurance data. The conducted case studies (codes, data) are posted at the web. This paper relies on results for checkerboard copulas of maximum entropy developed in [2-4, 8, 11, 12]. An m-dimensional copula where m ≥ , is a continuous, m-increasing, probability distribution function C : [ , ] m → [ , ] on the unit m-dimensional hyper-cube with uniform marginal probability distributions. A checkerboard copula is a distribution with a corresponding density de ned almost everywhere by a step function on an m-uniform subdivision of the hyper-cube. I.e., the checkerboard copula is a distribution on the unit hyper-cube [ , ]  The paper develops optimization procedures for nding copulas de ned by a multiply-stochastic matrices matching available information.

Checkerboard Copula with Prescribed Spearman Rho Coe cients
The de nitions and statements for the multi-dimensional copulas in this section are taken from [12]. This section contains the maximum entropy optimization problem for a checkerboard copula with prescribed Spearman rho coe cients. This problem is solved in the case study in Section 4.2. Also, this introductory section provides de nitions for the main methodological Section 3.

. 2-Dimensional Checkerboard Copula De ned by Doubly-Stochastic Matrix
De nitions and notations for multidimensional copulas are quite complicated, therefore, we start with the two-dimensional case, similar to paper [11].
Let (X , X ) be a pair of real valued random variables on R and let g(x , x ) be the joint probability density. The corresponding marginal probability densities are In practice we often wish to construct a joint probability distribution where the corresponding marginal distributions are already known. The method of copulas is one possible solution method. Let c(u , u ) be a density of two-dimension copula, i.e., the joint probability density on the unit square with marginal densities for each u ∈ [ , ] and each u ∈ [ , ]. Let g (x ) and g (x ) be the known probability densities with corresponding cumulative distribution functions F (x ) and F (x ) for real valued random variables X and X . The joint density, de ned by the copula density c(u , u ), equals It can be easily shown that c(u , u ) is a joint density function on the unit square with uniform marginal densities, i.e., it is a density of a copula. Indeed, the integral of c(u , u ) over the unit square equals Also, suppose that u ∈ a(i), a(i + ) , then Therefore, the marginal density for any u ∈ [ , ], equals and similar for any u ∈ [ , ], The corresponding checkerboard copula C : [ , ]×[ , ] → [ , ] is de ned as follows, .

Example of two-dimensional copula.
Let us consider the case with m=2, n=4. Table 1 shows an example of hyper-matrix h. Table 2 and Figure 1 show the density of the checkerboard copula. Table 3 and Figure 2 show the Checkerboard copula.

. De nitions for m-Dimensional Case
Let m ∈ N with m ≥ and let X = (X , . . . , Xm) ∈ R m be a vector-valued random variable with joint probability density g : R m → R. The corresponding marginal probability densities are Frequently, in simulation of random events it is needed to construct a joint probability distribution where the corresponding marginal distributions are already known. The method of copulas provides a theoretical basis for such analysis. If the joint distribution is known and the marginal distributions are continuous then the copula is uniquely de ned. We refer to the book by Nelsen [7] for the fundamental theory. It is convenient to assume that the given The corresponding m-dimensional distribution G : R m → [ , ] is de ned in terms of the copula C and the marginal distributions F by the formula

. Checkerboard Copulas and Multiply-Stochastic Matrices
Let n ∈ N be a natural number and let h be a non-negative m-dimensional hyper-matrix given by h = Since and the corresponding distribution function G h : R m → [ , ] is de ned in terms of the copula C h and the prescribed marginal distributions F by the formula

. Spearman Rho Correlation Coe cient
The most widely known are Kendall's tau and Spearman rho, both of which measure a form of dependence known as concordance. Spearman rho is often called the grade correlation coe cient. If xr are observations from a real valued random variable Xr with cumulative distribution function Fr then the grade of xr is given by ur = Fr(xr). Note that the grade ur can be regarded as an observation of the uniform random variable Ur = Fr(Xr) on [ , ] and that Ur has mean / and variance / . The grade correlation coe cient for the continuous random variables Xr and Xs where r < s is de ned as the correlation for the grade random variables Ur = Fr(Xr) and Us = Fs(Xs) by the formula We refer the reader to Nelsen [7] for further details. The Spearman rho correlation coe cient for the checkerboard copula is given by . Entropy Let h ∈ R be a multiply stochastic hyper-matrix and let c h : [ , ] m → R be the associated elementary joint density de ned previously. The entropy of h is de ned by .

Maximum Entropy Problem with Prescribed Spearman Rho Coe cients
We wish to select a multiply stochastic hyper-matrix h = [h i ] ∈ R to match known grade correlation coe cients ρr,s for all r < s in such a way that the entropy is maximized. We now formulate the optimization problem for nding copula with prescribed Spearman rho coe cients.

Optimization problem with prescribed Spearman rho coe cients
Find the hyper-matrix h ∈ R maximizing the entropy subject to the constraints In general terms the problem is well posed. There are a nite number of linear constraints on h and so the feasible set F of hyper-matrices satisfying (5,6,7) is a bounded (closed) convex set in R . The function J : F → [ , ∞) is strictly concave. If the interior or core of F is non-empty then there must be a unique solution for h with strictly positive coordinates. The reader is referred to [1,5] for a general discussion of the requisite convex analysis and nonlinear optimization.

Copula De ned by Sums of Random Variables
Let Xr, r = , , . . . , m are random values with distributions Fr(x) and single-valued quantile functions F − r (u) for all u ∈ ( , ). We denote by g a subset indexes of these random values. For instance, suppose that r = , , . . . , , then, we may have g = { , } or g = { , , , }. We will denote by Z g the sum of random values with indexes r ∈ g, i.e. Z g = r∈g Xr . We denote by F g (z) the distribution for the random value Z g .
Let us assume that the distributions Fr(x) , r = , , . . . , m, and the distribution F g (z) are available. We want to build a copula for random values Xr, r = , , . . . , m, based on available information about these distributions.
Let us denote otherwise.
We de ne the projection πrs : R m → R onto the ur us-plane and the complementary projection π c rs : R m → R m− for ≤ r < s ≤ m by the formulae πrs u = (ur , us) and We will explain the approach with a simple case when the sum includes only two random values Xr , Xs and g = {r, s}. By de nition, On the other hand, using copula we have The last equation and (8) imply where Similar to (8) we consider the case when cardinality |g| of the set g is higher or equal than 2, i.e. ≤ |g| ≤ m, Equation (10) is generalized, in this case, as follows So far we have not made any speci c assumptions about the distribution of the random value Z g . In the considered case we assume that k observations of the random value Z g are available. Therefore, further we suppose that the random value Z g is discretely distributed with equally probable atoms and the distribution function F g (z) takes k values k , k , . . . , k k . Let us denote by L g (h, j) the loss function, having k equally probable scenarios, With this notation, equation (9) can be rewritten as follows, Pay attention that in case if the distribution F g (z) is continuous, we still can use the nite system of equations (14) as an approximation of the in nite system of equations (9). The system of equations (14) may be infeasible. In this case, we can nd hyper-matrix h by minimizing an error function. Further, we will consider three error functions: 2) Mean Absolute Error, 3) CVaR Absolute Error, see [6], with con dence parameter α ∈ [ , ).
Further we formulate regression problem for nding copula with one set of constraints (14) . Let g be a subset of indices of continuous random variables Xr with distributions Fr(x) , r = , , . . . , m. Let denote by ε g (h) one of the three considered error functions. We will solve the following optimization problem to nd an optimal vector h de ning copula.

Regression problem with one sum function
Find the hyper-matrix h ∈ R minimizing the error subject to the constraints In general terms the problem (18,19,20) is well posed. There is a nite number of linear constraints on h and so the feasible set F of hyper-matrices satisfying (19,20) is a bounded closed convex set in R . The function ε : F → [ , ∞) is convex for the considered error function. The interior of F is non-empty, therefore there is a convex set of optimal solutions for h. The reader is referred to [1,5] for a general discussion of convex analysis and nonlinear optimization.
It is important to note that the problem (18,19,20) has sense if the error function ε g (h) on optimal solution point is not equal to zero, which means that the system of linear constraints (14) is not feasible. Suppose that the problem (18,19,20) has zero optimal objective function, then we need to solve the following entropy maximization problem to assure that the solution is based only on available information speci ed by constraints.

Calculation of loss function
According to de nition (13), the loss function L g (h, j) is a simple linear function in variables h i with coecients, Further we show how to calculate the integral in (27). We will explain the idea with the two dimension case when |g| = . The integration is done over the variables ur , us in the box As speci ed in (10), formula (27) can be written as follows When in interior of the box I πrs i the indicator function equals only 1 or only 0, integral in (28) can be easily evaluated. Therefore, 3 cases are valid, When in interior of the box I πrs i the indicator function equals both 1 and 0, we can consider, approximately, that the integral in (28) equals, n − , which is volume of I πrs i , multiplied by . Therefore, Now, let us consider the case when the sum may contain more than two variables, i.e., ≤ |g| ≤ m. Then, formula (29) is generalized as follows, and the approximate formula (30) is generalized as The third term in (32) is derived similar to (31). Let us denote g = {r , r . . . , r l } , where ≤ l = |g| ≤ m . We consider the following case,

Case Study
This section presents a case study illustrating application of methodology considered in Sections 2 and 3. The optimization problems were solved with Portfolio Safeguard (PSG); see http://www.aorda.com. PSG is an optimization package for solving nonlinear and mixed-integer optimization problems; it is free for academic purposes. PSG contains precoded classes of nonlinear functions, which allows for formulation and solving of optimization problems in analytic format. MATLAB code was developed to process data and prepare inputs for PSG.

. Copula De ned by Spearman Rho Coe cients
This section provides a case study illustrates the optimization approach presented in Section 2 for nding checkerboard copula with known Spearman Rho coe cients .
The case study codes, data and results are posted at http://uryasev.ams.stonybrook.edu/index.php/ research/testproblems/ nancial_engineering/case-study-checkerboard-copula-de ned-by-sperman-rhocoe cients-entropyr/. We posted several instances of solved problems in TEXT, MATLAB, and R formats. The entropy maximization problem is solved with PSG, which has a precoded entropy function. PSG maximizes entropy with dual formulation. However, the user is not involved in this reduction (just option in the optimization problem statement should be speci ed). PSG automatically generates the dual problem, solves it, and present the results for the primal problem.
The dataset contains ve random variables X j , representing the incurred losses for ve classes of business for an insurance company. Accordingly, ten unique Spearman rho coe cients, denoted by ρr,s , were calculated, where r < s m = , as shown in the following Table 4. . .

Optimization problem
We solved the optimization problem (35-38) with grid parameter n = 4, 8, 10. Table 5 shows the optimal objective value and calculation times. We observe that the solution time is quickly increasing with dimension n. The dimension n = , on one hand, is su ciently large to get a good approximation precision of the copula, on the other hand, the optimization time = 7.66 sec, is not signi cant for a nonlinear optimization problem having n = , prime variables h i . We want to emphasize that this is a nonlinear optimization problem with quite large number of variables. PSG package has a precoded entropy function which is very e ciently implemented. Data are posted at the web and a reader can benchmark this problem with some other nonlinear programming software. Figures 3-5 show two-dimensional projections of density of the optimal checkerboard copula with n = 10. Twodimensional projection of the density to coordinates u i , u i is done by xing complementary components (not involved in the projection) at value 0.5 .  Figure 3: Two-dimensional projections (u1-u2; u1-u3; u1-u4; u1-u5) of density of the checkerboard copula, m=5, n=10, obtained by maximizing entropy.

. Checkerboard Copula De ned by Sums of Random Variables
This section calibrates checkerboard copulas with known marginal distributions and distributions of sums of random variables, as described in Section 3. The case study codes, data and results are posted at http://uryasev.ams.stonybrook.edu/index.php/research/testproblems/ nancial_engineering/case-studycheckerboard-copula-de ned-by-sums-of-random-variables/. We have found m=3-dimensional checkerboard copulas with grid parameter n = . The error minimization problems were solved with the PSG package (see http://www.aorda.com) which has precoded error functions: Mean Squared, Mean Absolute, and CVaR Absolute. Standard statistical packages have Mean Squared and Mean Absolute minimization capabilities, however, they do not accept constraints. Optimization packages, such as Gurobi can solve very e ciently linear and quadratic optimization problems. Problems considered in this section can be reduced to quadratic or linear programming. However, a signi cant e ort need to be made to make this reduction, write a code, and debug. With PSG it is possible to avoid these time consuming steps.  We assumed that for 3 random variables W , X, and Y the empirical probability distribution functions F W (w), F X (x), F Y (y) are de ned with 1000 observations. Assumptions for the sums of the random variables are de ned in the following two cases.

Case 1.
For the random value Z = W + X + Y, the empirical probability distribution function F Z (z) is de ned with K=16 observations z , . . . , z . We solved an optimization problem and found a checkerboard copula on n × n × n grid, where n=10. The 16 scenarios of the loss function L(h, j), de ned in (13), were calculated as follows, We use formula (33) for the approximate calculations of the coe cients γ i i i (z j ), Further we formulate the error minimization problem with one sum function as de ned in (21-24).

Case 2.
For the three sums of random values Z = W + X, Z = W + Y, Z = X + Y, the empirical probability distributions F Z (z), F Z (z), F Z (z) are de ned by K=16 observations for every sum. So, we have observations z , . . . , s for Z , observations z , . . . , s , for Z , and observations z , . . . , s for Z . Let us denote the following loss functions, We use formula (33) for the approximate calculations of the coe cients γ i i (z j ), γ i i (z j ), γ i i (z j ), if F − W (a(i )) + F − X (a(i )) ≥ z , n − , otherwise . (49) Further we formulate the minimization problem with the weighted average of the error functions de ned in (25).

Optimization Problem (Case 2)
Find hyper-matrix h ∈ R minimizing weighted average of the error functions subject to constraints Error in Optimization Problem, Case 1.
We considered in objective (52) three error functions de ned in Section 3: Mean Squared, Mean Absolute, and CVaR Absolute Error. Optimization problems were solved with PSG. Table 7 shows results for the Optimization Problem (Case 2). . E--. CVaR Absolute, α = .

Summary
We consider two setups for nding checkerboard copula, which link a multivariate distribution on a unit hyper-cube to their corresponding one-dimensional marginal distributions. A checkerboard copula is uniquely de ned by a multiply-stochastic hyper-matrix. In the rst setup Spearman Rho rank correlation coe cients are available. To nd optimal values of elements of the hyper-matrix we maximized entropy subject to constraints, which match known Spearman Rho coe cients. With the second setup, distributions of sums of random variables and distributions of marginals are available. We developed a system of equations linking elements of a hyper-matrix with known observations of random variables and their sums. This system of equations is overspeci ed, therefore, we have used regression to nd a hyper-matrix. The case study was done using property and casualty insurance data. More importantly, the case study represents circumstances often faced by actuaries trying to build aggregate loss distributions across correlated classes of business where the objective is to make the correct representation of the dependencies observed in the data. The optimization problems were numerically solved with the AORDA Portfolio Safeguard (PSG) package, which has precoded entropy and error functions. Case study data, codes and results    Errors in Case 2.