**2. Background Theory**

We first review some previous work on the weighted sum, for example, in constructing portfolio *Y*1 that is composed of two dependent assets defined by

$$Y\_1 = w\_1 X\_1 + w\_2 X\_2 \tag{1}$$

in which the random variables *Xi*,*<sup>t</sup>* (*i* = 1, 2) denotes the rate of return at time *t* for the asset defined in terms of the following random quotient:

$$X\_{i,t} = \frac{P\_{i,t} - P\_{i,t-1}}{P\_{i,t-1\nu}}\prime$$

where *Pi*,*<sup>t</sup>* denotes the price of the *i*th asset at time *t*. Note that *Xi* is assumed to be absolutely continuous with the cumulative distribution functions (CDF) *Fi*. Suppose that (*<sup>X</sup>*1, *<sup>X</sup>*2) follows copula *C*, then the CDF, *FY*1(*y*), of *Y*1 defined in (1) satisfies:

$$F\_{Y\_1}(y) = \mathbf{1}\_{\{w\_2 < 0\}} + \text{sgn}(w\_2) \int\_0^1 \frac{\partial}{\partial u} \mathcal{C}\left(u, F\_2\left(\frac{y - w\_1 F\_1^{-1}(u)}{w\_2}\right)\right) du,\tag{2}$$

where sgn(·) denotes the sign function such that

$$\text{sgn}(\mathbf{x}) = \begin{cases} \mathbf{1}\_{\prime} & \text{if} \quad \mathbf{x} > \mathbf{0}\_{\prime} \\ -\mathbf{1}\_{\prime} & \text{if} \quad \mathbf{x} < \mathbf{0}\_{\prime} \end{cases}$$

Then, the CDF, *FY*1, can be used to estimate the distortion risk measure of the portfolio defined by

$$R\_{\mathcal{S}}[Y\_1] = \int\_0^{\infty} \mathcal{g}(\overline{F}\_{Y\_1}(y)) dy + \int\_{-\infty}^0 [\mathcal{g}(\overline{F}\_{Y\_1}(y)) - 1] dy$$

where *g* is a *distortion function* and *FY*1 (*y*) = 1 − *FY*1 (*y*) is a survival function of *Y*1. Readers may refer to Ly et al. (2016) for more detailed information.

In the credit model, the total loss is defined as the aggregation of the product of risk factors. Thus, it is necessary to find the distribution for the product case, for instance, *Y*2 given by

$$Y\_2 = X\_1 X\_2.\tag{3}$$

Ly et al. (2019) show that the CDF of *Y*2 can be determined by

$$F\_{Y\_2}(y) = F\_1(0) + \int\_0^1 \text{sgn}\left(F\_1^{-1}(u)\right) \frac{\partial}{\partial u} \mathbb{C}\left(u, F\_2\left(\frac{y}{F\_1^{-1}(u)}\right)\right) du. \tag{4}$$
