1 Introduction

Counterparty credit risk receives a lot of attention after the global financial crisis of 2007–2009; since then, the management of counterparty credit risk has become a key issue for financial institutions. This risk refers to the possibility that one of the contracting parties of derivatives transactions, carries out over the counter, defaults before maturity. The vast majority of literature has focused on the valuation of counterparty risk, i.e., credit valuation adjustment, abbreviated with CVA throughout this paper; see also Capponi [14] for a survey. Despite the importance of dynamic hedging of counterparty risk across policy makers and the financial industry, the literature on the subject is still not as well developed.Footnote 1

A larger body of literature has investigated dynamic hedging of defaultable claims using mean-variance strategies, but without accounting for counterparty risk. Bielecki et al. [7] and [8] introduce a framework for hedging risks in incomplete markets, building on the classical Markowitz mean-variance portfolio selection framework. They analyze quadratic hedging methods and consider strategies adapted to the default-free market information as well as to the enlarged filtration inclusive of default events. Bielecki et al. [9] consider a reduced form framework driven by a Brownian motion, and show that perfect hedging can be achieved by continuously trading rolling credit default swap (CDS) contracts. Frey and Backhaus [21] analyze hedging of synthetic CDO tranches under a dynamic credit risk model with incomplete information, allowing for default contagion and spread risk. They use the risk-minimization approach, and choose single name credit swaps as their dynamic trading instruments.

In this paper, we study unilateral hedging of counterparty risk associated with portfolio credit derivatives traded between a default-free investor and a defaultable counterparty in the local risk-minimization sense. The risk-minimization is a quadratic hedging method, proposed in Föllmer and Sondermann [19] in the local martingale case. It is extended in Schweizer [27] to the semimartingale case by introducing the weaker concept of the local risk-minimization. For the martingale case, the risk-minimizing strategy can be characterized via the Galtchouk–Kunita–Watanabe (GKW) decomposition. When the hedging instrument is a semimartingale, the locally risk-minimizing strategy can be obtained in terms of the Föllmer-Schweizer (FS) decomposition. In general, the FS decomposition is difficult to derive except the case where the hedging instruments have continuous trajectories since it coincides with the GKW decomposition under the minimal martingale measure (MMM). This is no longer true in general if the hedging instrument has jumps, as in our framework. We refer to Schweizer [29] for a survey. The methodology has been subsequently extended to a multidimensional setting including payment streams in Schweizer [30]. However, in presence of jumps, the MMM and GKW-decomposition are still key tools to derive the locally risk-minimizing strategy as proved in Choulli et al. [18].

We propose a general model of direct default contagion by extending the one considered in Bo et al. [11], which accounts for the impact of past defaults on the default intensity of surviving firms. Our model can be specialized to capture the main sources of default correlation identified by empirical research. For instance, Azizpour et al. [3] document the time decay effect of default contagion via a statistical analysis based on historical corporate default data. As it is shown in Bo et al. [11], by choosing a linear specification for the default intensity function, after a ramp-up for the instantaneous impact of a default, the default intensities of surviving firms would, over time, mean revert to their long run averages. We consider the counterparty risk hedging of a portfolio of defaultable claims of generic type, including classes of credit derivatives routinely used by risk management divisions such as CDS portfolios, risky bonds portfolios and first-to-default claims. Moreover, the involved payments are also allowed to be dependent on the default state of the reference firms and counterparty. We choose the hedging instrument to be a CDS written on the (defaultable) counterparty. Our choice is in line with current market practises. Major derivative desks routinely use credit swaps to hedge counterparty exposures (see Chapter 2.4 in Gregory [23]), and these contracts are highly requested by market participants during periods of considerable market distress. The liquidity of credit swaps, typically higher than that of the corresponding bonds, make them better instruments to implement cost-effective hedging strategies. Hedging is only performed up to the earliest of the maturity of the portfolio and the counterparty’s default time, that is hedging terminates if the portfolio expires or if contingent payments are triggered by the counterparty’s default.

The main conceptual novelty of our paper is the development of a comprehensive framework which simultaneously handles (i) a default intensity model enhanced with feedback from defaults, and (ii) a dividend process for the hedging instrument (CDS) whose dynamics is of the jump-diffusive type. Earlier studies [4,5,6, 16] consider hedging instruments with continuous trajectories by using an enlargement of filtration approach. Ceci et al. [15] study the hedging of a default-free contingent claim via trading instruments following a jump-diffusion process. Frey and Schmidt [22] also employ the risk-minimization approach, but assume conditionally independent default times whose intensities depend on an unobservable stochastic factor. Differently from Frey and Backhaus [21] and Frey and Schmidt [22] who work directly under the risk-neutral martingale measure used for pricing, we study the hedging problem under the real-world probability measure. Other related studies on quadratic hedging approaches to credit risk modeling include Okhrati et al. [25] who employ structural default models, and Wang et al. [32] who study vulnerable European contingent claims.

There are several technical contributions in our efforts, outlined next. We consider the locally risk-minimizing hedging of the counterparty risk under the real-world probability measure. This implies that we need to identify two additional probability measures under our default contagion market model: the risk-neutral measure for pricing purpose and the MMM for hedging purpose. In the discontinuous case, the integrand of the GKW decomposition under the MMM differs from the integrand of the FS decomposition. Hence the establishment of the hedging strategy in terms of the predictable covariation between the hedging instrument and CVA prices under the MMM can not be applied in our framework. We provide a model-independent formula on the unique locally risk-minimizing strategy under the real-world measure (see Proposition 3.4). Tankov [31] also uses a similar approach to hedge default-free contingent claims in an exponential Lévy model. Finally, we characterize the locally risk-minimizing hedging strategy in closed-form by deriving the martingale representation of the conditional expectation of the counterparty risk price payment stream under the MMM (see Proposition 3.7 and Theorem 3.9). This representation is given in terms of the unique smooth solution to a nonlinear recursive system of Cauchy problems. These Cauchy problems are defined on an unbounded domain, have non-Lipschitz coefficients, and are linked through the default states of the economy. The nonlinearity of this system of PDEs is inherited from the nonlinear structure of the CVA. Our paper also makes other technical contributions related to the theory of nonlinear PDEs. Our solution approach is to prove the uniform integrability of the family generated by Feymann-Kac’s representations of the solution at any neighborhood of a fixed space-time data point. Such a property allows us to apply existence and uniqueness results from Heath and Schweizer [24] to our specific setting.

The rest of the paper is organized as follows. Section 2 develops the model and formulate our hedging problem. Section 3 studies the locally risk-minimizing CVA hedging strategy. Section 4 specializes our framework to concrete portfolio credit derivatives. Some technical proofs are delegated to the Appendix.

2 The Model and Hedging Problem on CVA

In this section, using the intensity-based approach, we propose an interacting default intensity model which accounts for the impact of past defaults on the default intensities of surviving firms. We assume the existence of \(N\ge 1\) risky entities, referred to as name “1”, name “2”,..., name “N”. We use “\(N+1\)” to denote the counterparty of the investor in the contract. Section 2.2 develops an interacting default intensity model. Section 2.3 gives the representation of a general defaultable claim.

2.1 Notations and Definitions

Let \(\mathbb {R}_+:=(0,\infty )\) and \({{{\mathcal {S}}}}:=\{0,1\}^{N+1}\). The vector \(z=(z_1,\ldots ,z_{N+1})\in {{{\mathcal {S}}}}\) is used to denote the default state of the portfolio with counterparty, with \(z_i=0\) if the firm i is alive and \(z_i=1\) if it has defaulted. For each \(z\in \mathcal{S}\) such that \(z_j=0\), we use

$$\begin{aligned} z^j:=(z_1,\ldots ,z_{j-1},1,z_{j+1},\ldots ,z_{N+1}),\qquad j=1,\ldots ,N+1 \end{aligned}$$
(1)

to denote the vector obtained from z by setting its jth component to 1. Let \(l\in \{1,\ldots ,N+1\}\) and \(j_1,\ldots ,j_l\in \{1,\ldots ,N+1\}\) be l distinct integers. Given \(z\in {{{\mathcal {S}}}}\) such that \(z_{j_1}=\cdots =z_{j_l}=0\), we use \(z^{j_1,\ldots ,j_l}\) for the vector obtained from z by setting its components \(j_1,\ldots ,j_l\) to 1. Namely, \(z^{j_1,\ldots ,j_l}\) denotes a default state where the firms \(j_1,\ldots ,j_l\) have defaulted. We set \(z^{j_1,\ldots ,j_l}=z\) if \(l=0\). Clearly, \(0^{j_1,\ldots ,j_{N+1}}={e_{N+1}}\) where \(e_{N+1}\) denotes the canonical row vector with all entries equal to 1. Let f(txz) be a deterministic function on \(\in [0,T]\times \mathbb {R}_+^{N+1}\times \mathcal{S}\). For \(j_1,\ldots ,j_l\in \{1,\ldots ,N+1\}\) with \(l=1,\ldots ,N+1\), set

$$\begin{aligned} f^{(l)}(t,x):=f(t,x,0^{j_1,\ldots ,j_{l}}),\quad f^{(l+1),i}(t,x):=f(t,x,0^{j_1,\ldots ,j_l,i}),\ i\notin \{j_1,\ldots ,j_l\}. \end{aligned}$$
(2)

We also set \(f^{(0)}(t,x):=f(t,x,0)\), and define \(|f|_{\infty }:=\sup _{(t,x,z)}|f(t,x,z)|\) if f is bounded on \([0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\). To lighten notation in (2), we use the superscript l to denote the number of defaults, but we are not specifying which firms have defaulted.

2.2 The Interacting Default Intensity Model

Let \((\Omega ,{\mathcal {F}}, {\mathbb {P}} )\) be a real-world probability space. Under this space, we give a d-dimensional Brownian motion \(W(t)=(W_j(t))_{j=1,\ldots ,d}^{\top }\), \(t\ge 0\), and \(\chi _1,\ldots ,\chi _{N+1}\), \(N+1\) square-integrable positive random variables (r.v.s) independent of W. Here \(\top \) denotes the transpose operator. Let \({\mathbb {F}} =({\mathcal {F}}(t))_{t\ge 0}\) with \({\mathcal {F}}(t)=\sigma (W(s);\ s\le t) \vee \sigma (\chi _i ;\ i=1,\ldots ,N+1)\). Denote by \(H(t)=(H_1(t),\ldots ,H_{N+1}(t))\) the \(N+1\)-dimensional default indicator process, i.e., \(H_i(t) = 1\) if the name i has defaulted before or at time t, and zero otherwise. This implies that the state space of \(H=(H(t))_{t\ge 0}\) is given by \({{{\mathcal {S}}}}=\{0,1\}^{N+1}\). Define the filtration \({\mathbb {H}}_i=({{{\mathcal {H}}}}_i(t))_{t\ge 0}\) for \(i=1,\ldots ,N+1\), where \({{{\mathcal {H}}}}_i(t)=\sigma (H_i(s);\ s\le t)\). The global market filtration, including default event information is given by \({\mathbb {G}}=({\mathcal {G}}(t))_{t\ge 0}={\mathbb {F}} \vee {\mathbb {H}}_1\vee \cdots \vee {\mathbb {H}}_{N+1}\) augmented by all \(\mathbb {P}\)-null sets so to satisfy the usual conditions.

In our model, the default intensity process is assumed to follow a jump-diffusion process, where jumps capture the contagious impact that the default of a firm has on the default intensities of the surviving firms. For \(t\ge 0\), the impact of all defaults before or at time t on the default intensity of name i is captured by the following pure jump process:

$$\begin{aligned} {J}_i(t):=\sum _{j=1}^{N +1} w_{ij}H_j(t). \end{aligned}$$
(3)

The i-th entry of the weight vector \(w_j=(w_{ij})_{i=1,\ldots ,N+1}\in [0,\infty )^{N+1}\) measures the extent to which the default of name i impacts the default intensity of name j.

Next, we introduce the interacting intensity model used in the paper. Under \( {\mathbb {P}} \), the default intensity process satisfies a system of interacting SDEs given by, for \(i =1,\ldots ,N+1\),

$$\begin{aligned} d X_i(t)&= \mu _i({X(t)})dt + \sum _{k=1}^d\sigma _{ik}\left( {X(t)}\right) dW_k(t)+dJ_i(t),\quad X_{i}(0)=\chi _i. \end{aligned}$$
(4)

and \(X(t)=(X_i(t))_{i=1,\ldots ,N+1}^{\top }\) for \(t\ge 0\). If the weight \(w_{ij}\) is high, the default of name j increases substantially the default intensity of name i. If \(w_{ij}\)’s are high for sufficiently many i, the probability of multiple firms defaulting within a short time after the default of name j is high. This captures the default clustering phenomenon, empirically documented in the literature (see, e.g., Azizpour et al. [3]). Throughout the paper, we impose the following conditions on the coefficients of Eq. (4):

(A1):

The coefficients \(\mu (x)=(\mu _i(x))_{i=1,\ldots ,N+1}^{\top }\) and \(\sigma (x)=(\sigma _{ik}(x))_{i=1,\ldots ,N+1;k=1,\ldots ,d}\) are locally Lipchitz continuous with linear growth in \(x\in \mathbb {R}_+^{N+1}\). Additionally, \(\mathrm{det}((\sigma \sigma ^{\top })(x))\ne 0\) for \(x\in \mathbb {R}_+^{N+1}\).

(A2):

For \((t,x)\in [0,T]\times \mathbb {R}_+^{N+1}\), let \({\tilde{X}}^{t,x}(s)=({\tilde{X}}_i^{t,x}(s))_{i=1,\ldots ,N+1}^{\top }\) satisfy \({\tilde{X}}^{t,x}(t)=x\) and for \(s\in [t,T]\),

$$\begin{aligned} d{\tilde{X}}^{t,x}(s)&= \mu ({\tilde{X}}^{t,x}(s))ds + \sigma ({\tilde{X}}^{t,x}(s))d W(s). \end{aligned}$$
(5)

Then it holds that \( {\mathbb {P}} ({\tilde{X}}^{t,x}(s)\in \mathbb {R}_+^{N+1}\text { for all }s\in [t,T])=1\).

By Theorem V.38 in Protter [26], the condition (A1) implies that SDE (5) has a unique (strong) solution, while the condition (A2) guarantees that \({\tilde{X}}^{t,x}=({\tilde{X}}^{t,x}(s))_{s\ge t}\) is always strictly positive if the data is strictly positive at time t. Further, this implies that the i-th default intensity process \(X_i=(X_i(t))_{t\ge 0}\) is strictly positive, see also Proposition 2.1 below. The condition \(\mathrm{det}((\sigma \sigma ^{\top })(x))\ne 0\) in (A1) implies that the infinitesimal generator of \({\tilde{X}}^{t,s}\) is uniformly elliptic, see also Lemma 3 in Heath and Schweizer [24].

Proposition 2.1 establishes the existence of a default model (XH) where the \(N+1\)-dimensional default indicator process H has the intensity given by \(X(t)=(X_i(t))_{i=1,\ldots ,N+1}^{\top }\). The proof is similar to that in Bo et al. [11] and hence we omit it.

Proposition 2.1

Under assumptions (A1) and (A2), there exists a unique \(\mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\)-valued and \({\mathbb {G}}\)-adapted Markov process (XH) satisfying (3), (4) and such that

$$\begin{aligned} M_i(t) := H_i(t) - \int _{0}^{t} (1 - H_i(s)) X_i(s)ds,\quad t\ge 0 \end{aligned}$$
(6)

is a \(( {\mathbb {P}} , {\mathbb {G}})\)-martingale.

From now on, we denote by \(\tau _i\) the default time of the i-th name, i.e., \(\tau _i:=\inf \{t>0;\ H_i(t)=1\}\) where \(\inf \emptyset =+\infty \) by convention. By the construction made in Bo et al. [11], simultaneous jumps are not allowed, i.e., \( {\mathbb {P}} (\tau _i=\tau _j)=0\) for all \(i \ne j\), and further, by Bo and Capponi [10], W is also a \(( {\mathbb {P}} ,{\mathbb {G}})\)-Brownian motion.

2.3 Defaultable Claims

We introduce the formalism to describe the class of defaultable claims treated in this paper. The specification is general enough to accommodate a large class of portfolio credit derivatives, of which the credit valuation adjustment can be computed. In particular, we allow the dependence of payments on the default state of the portfolio with counterparty.

Definition 2.1

A defaultable claim maturing at \(T>0\) is a quadruple \((\xi ,a,Z,K)\), where the r.v. \(\xi :=\xi (H(T))\), the processes \(a(t):=a(H(t))\) and \(Z(t):=Z(H(t))\) for \(t\in [0,T]\). The process \(K(t):=K(H(t))\), \(t\in [0,T]\), is the indicator function of a positive \({\mathbb {G}}\)-stopping time \({\bar{\tau }}\), i.e., it holds that \(K(t)=\mathbf{1}_{{\bar{\tau }}\le t}\). Here, with slight abuse of notation, \(\xi (z)\), a(z), Z(z) and K(z) denote deterministic functions on \(z\in {{{\mathcal {S}}}}\).

The financial meaning of the components of a defaultable claim becomes clear from the definition of the dividend or total cash flow process. Such a process describes all cash flows generated by the defaultable claim over its lifespan (0, T], that is, after the contract was initiated at time 0.

Definition 2.2

The dividend process \(D = (D(t))_{t\ge 0}\) associated with the defaultable claim \((\xi ,a,Z,K)\) maturing at T equals, for every \(t \ge 0\),

$$\begin{aligned} D(t) = \xi (1-K(T)) \mathbf{1}_{t =T} + \int _{0}^{t \wedge T} (1-K(u)) a(u) du + \int _{0}^{t \wedge T} Z(u) d K(u). \end{aligned}$$
(7)

It is clear from the above definition that D is a process of finite variation. It admits the following financial interpretation: the r.v. \(\xi \) is the promised payoff paid at the maturity T if default has not happened before or at tme T, \(a=(a(t))_{t\ge 0}\) represents the process of promised dividends paid until the earliest of T and default, and the process \( Z=(Z(t))_{t\ge 0}\) specifies the payoff delivered at the default time if it has happened prior to at time T. Notice that we allow for \((\xi ,a,Z,K)\) to depend on the default indicator process H, and that the process Z is not assumed to be \({\mathbb {G}}\)-predictable. Such a setup differs from earlier works, see for instance Bielecki et al. [9], and allows us to use the same general framework to hedge counterparty risk of a larger set of defaulable claims, including those whose recovery process depends on a totally inaccessible stopping time.

2.4 Examples

The proposed framework can be specialized to deal with a class of credit derivatives, which are routinely used by investors to hedge risks. We assume that the notional amount of the considered contracts is one.

Default intensities.   For \(i=1,\ldots ,N+1\), assume that the default intensity of the i-th reference entity follows the dynamics:

$$\begin{aligned} dX_i(t)&= (\kappa _i-\nu _iX_i(t))dt + \sum _{k=1}^K\sigma _{k}\sqrt{X_i(t)}dW_k(t)+d{J}_i(t),\quad X_i(0)=\chi _i. \end{aligned}$$
(8)

The parameters \(\kappa _i,\nu _i\), \(i=1,\ldots ,N+1\), and \(\sigma _k\), \(k=1,\ldots ,K\), are positive constants satisfying the Feller’s boundary classification condition: \(2\kappa _i\ge \sum _{k=1}^K\sigma _{k}^2\), for \(i=1,\ldots ,N+1\). This implies that Assumption (A2) holds. The default intensity mean reverts to its long-run level given by \(\frac{\kappa _j}{\nu _j}>0\) between two consecutive default events. This captures the empirically observed time decaying effect of default intensities. When a firm i defaults, the default intensity of firm j instantaneously jumps upward. The contagion effect decays at an exponential rate, see also Bo et al. [11].

CDS portfolio.   Consider a portfolio of CDS contracts whose reference entities are denoted by “1”, “2”, ..., “N”, and recall that the counterparty of the investor is denoted by “\(N+1\)”. For \(i=1,\ldots ,N\), a CDS on the entity i is a contract between the protection buyer (the investor) and the protection seller (the counterparty), where the protection leg commits to paying a contractually specified spread premium \(\varepsilon _i>0\) until the earliest of the default time \(\tau _i\) of the reference entity or the maturity T of the contract. The protection seller pays the loss rate \(L_i(t):=L_i(H(t))\in (0,1]\) times the given notional amount at \(\tau _i\) that the i-th reference entity defaults. We also allow for loss rate to depend on the default state of the portfolio.

Consider the case that all CDSs have the same maturity \(T>0\), and we view the payoff from the point of view of the protection seller. The quadruple \((\xi _i,a_i,Z_i,K_i)\) for \(i=1,\ldots ,N+1\), is specified as follows:

$$\begin{aligned} \xi _i = 0, \qquad \; a_i(t) = -\varepsilon _i, \qquad \; Z_i(t) = L_i(t), \qquad \; K_i(t) = H_i(t), \end{aligned}$$

i.e., \(K_i(t) = H_i(t)\) is the indicator of the default time of the i-th reference entity (\({\bar{\tau }}_i=\tau _i\)). From Definition 2.2, the dividend process of the i-th CDS is given by

$$\begin{aligned} D_i(t)&= -\varepsilon _i\int _{0}^{t \wedge T} (1-H_i(u))du + \int _{0}^{t \wedge T} L_i(u) d H_i(u)\nonumber \\&=-\varepsilon _i(t \wedge T\wedge \tau _i) + L_i(\tau _i)\mathbf{1}_{\tau _i\le t \wedge T}. \end{aligned}$$
(9)

Risky bonds portfolio.   Consider a portfolio of coupon paying bonds underwritten by firms “1”, “2”, ..., “N”. The seller of the bond of firm i receives the promised coupon payments \(\varepsilon _i > 0\) until the earliest of maturity or default of firm i. If the firm i has not defaulted by T, then the seller also receives a notional payment equals to 1. If the firm i defaults before T, the owner of the bond receives the recovery rate \(R_i(t) := 1-L_i(H(t))\in [0,1)\) at \(\tau _i\) that firm i defaults. This recovery rate may depend on the default state of the portfolio. Then the quadruple \((\xi _i,a_i,Z_i,K_i)\) for \(i=1,\ldots ,N\), can be specified as follows:

$$\begin{aligned} \xi _i = 1, \qquad \; a_i(t) = \varepsilon _i, \qquad \; Z_i(t) = R_i(t)=1-L_i(t), \qquad \; K_i(t) = H_i(t), \end{aligned}$$

i.e., \(K_i(t) = H_i(t)\) is the indicator of the default time of the i-th reference entity (\({\bar{\tau }}_i=\tau _i\)). Following Definition 2.2, the dividend process of the i-th risky bond is given by

$$\begin{aligned} D_i(t)&= (1-H_i(T))\mathbf{1}_{t = T}+\varepsilon _i\int _{0}^{t \wedge T} (1-H_i(u))du + \int _{0}^{t \wedge T} R_i(u) d H_i(u)\nonumber \\&=(1-H_i(T))\mathbf{1}_{t = T}+\varepsilon _i(t \wedge T\wedge \tau _i) + R_i(\tau _i)\mathbf{1}_{\tau _i\le t\wedge T}. \end{aligned}$$
(10)

First-to-default claim.   In a first-to-default swap, the protection buyer will make the spread premium payment \(\varepsilon > 0\) to the protection seller. The protection seller, in return, will be required to pay the loss rates times the given notational to the protection buyer if and when any one of the reference entities “1”, \(\ldots \), “N” defaults before the contract expires at T. The payment will only be made for the first entity to default, i.e., the payment will be \(L_i(t):=L_i(H(t))\in (0,1]\) if i is the first entity to default. This deal is typically executed by a firm which wants to hedge its exposure to a number of different firms. Assume that the notional amount is 1, and we view the payoff from the point of view of the protection seller. Then the quadruple \((\xi ,a,Z,K)\) is specified as follows:

$$\begin{aligned} \xi = 0, \quad \; a(t) = -\varepsilon , \quad \; Z(t) =\sum _{i=1}^N L_i(t)H_i(t), \quad \; K(t) = 1- \prod _{i=1}^N (1-H_i(t)), \end{aligned}$$

where \({\bar{\tau }}_1=\tau _1\wedge \cdots \wedge \tau _N\) is the first-to-default time.

Lemma 2.2

The dividend process of the first-to-default claim admits the representation given by

$$\begin{aligned} D(t)&=-\varepsilon (t\wedge T\wedge {\bar{\tau }}_1)+\sum _{i=1}^NL_i({\bar{\tau }}_1)\mathbf{1}_{\tau _i={ \bar{\tau }}_1}\mathbf{1}_{{\bar{\tau }}_1\le t\wedge T}. \end{aligned}$$
(11)

2.5 Risk-Neutral Pricing and Gain Processes

Let \((\xi ,a,Z,K)\) be a defaultable claim as in Definition 2.1. For a fixed time \(t \in [0,T]\), the process \((D(u)-D(t))_{u\in [t,T]}\) represents all cash flows generated by the defaultable claim \((\xi ,a,Z,K)\) in the interval [tT]. Such a process may depend on the past behavior of the claim as well as on the history of the market prior to time t. Clearly, the past cash flows are not valued by the market, so that the market value at time t of a defaultable claim only reflects future cash flows to be paid/received over the time interval (tT]. We set the interest rate to be zero. Such an assumption allows us to avoid unnecessary clutter of notation, and to highlight the main probabilistic forces. The whole analysis can be generalized in a straightforward fashion to the case of nonzero interest rate.

The price process \((S(t,T))_{t\in [0,T]}\) of the defaultable claim \((\xi ,a,Z,K)\) equals \(Z({\bar{\tau }})\) at the default time \({\bar{\tau }}\), and zero after the default, that is \(S(t,T)=0\) on \(\{ t > {\bar{\tau }}\}\). On \(\{ {\bar{\tau }} > t \}\), the pre-default price is given by its risk-neutral expected payoff of dividend payments. Since our market is incomplete, the relation between the risk-neutral probability measure \( {\mathbb {Q}} \) and the actual probability measure \( {\mathbb {P}} \) can be characterized by the market price of (diffusion) risk and the default risk premium. More precisely, let \(\widetilde{\theta }(t):=(\widetilde{\theta }_j(X(t),H(t)))_{j=1,\ldots ,d}^{\top }\) and \(\vartheta (t):=(\vartheta _i(X(t),H(t)))_{i=1,\ldots ,N+1}^{\top }\) represent, respectively, the market price of (diffusion) risk and the default risk premium. We assume that

(A3):

For \(z\in {{{\mathcal {S}}}}\), \(\widetilde{\theta }(x,z)=(\widetilde{\theta }_j(x,z))_{j=1,\ldots ,d}^{\top }\in \mathbb {R}^{d}\) is a bounded function such that \(\sigma (x) \widetilde{\theta }(x,z)\) is \(C^1\) in x, and \(\vartheta (x,z)=(\vartheta _i(x,z))_{i=1,\ldots ,N+1}^{\top }\in (-1,\infty )^{N+1}\) is a bounded and \(C^1\)-function such that \(\vartheta _i(x,z)x_i\) is bounded for \(i=1,\ldots ,N+1\).

Then

$$\begin{aligned} \frac{d {\mathbb {Q}} }{d {\mathbb {P}} }\big |_{{\mathcal {G}}_t}={{{\mathcal {E}}}}_t \left( \int _0^{\cdot }\widetilde{\theta }(s)^{\top }dW(s)+ \int _0^{\cdot }\vartheta (s)^{\top }dM(s)\right) ,\qquad t\in [0,T] \end{aligned}$$
(12)

identifies the risk-neutral probability measure \( {\mathbb {Q}} \) corresponding to the risk premium \((\widetilde{\theta },\vartheta )\), where \({{{\mathcal {E}}}}(\cdot )\) denotes the stochastic exponential. Moreover, we have that, under the risk-neutral measure \( {\mathbb {Q}} \),

$$\begin{aligned} W^{ {\mathbb {Q}} }(t):=W(t) - \int _0^{t}\widetilde{\theta }(s)ds,\qquad t\in [0,T] \end{aligned}$$
(13)

is a d-dimensional Brownian motion, and for \(i=1,\ldots ,N+1\),

$$\begin{aligned} M_i^{ {\mathbb {Q}} }(t):=M_i(t) - \int _0^{t}(1-H_i(s))\vartheta _i(s)X_i(s)ds,\qquad t\in [0,T] \end{aligned}$$
(14)

is a \({\mathbb {G}}\)-martingale. Then, on \(\{ {\bar{\tau }} > t \}\),

$$\begin{aligned} {S}(t,T) = {\mathbb {E}} ^{ {\mathbb {Q}} }\left[ D(T) - D(t) \big |{\mathcal {G}}_t\right] , \end{aligned}$$
(15)

where \( {\mathbb {E}} ^{ {\mathbb {Q}} }\) denotes the expectation under \( {\mathbb {Q}} \). Correspondingly, the gain process of the defaultable claim \((\xi ,a,Z,K)\) (see also Frey and Schmidt [22] for a related definition) is given by, for \(t\in [0,T]\),

$$\begin{aligned} Y(t):= {\mathbb {E}} ^{ {\mathbb {Q}} }[D(T)|{\mathcal {G}}_t]. \end{aligned}$$
(16)

Note that \(Y(t)=S(t,T)+D(t)\) on \(\{{\bar{\tau }}>t\}\), i.e., the gain process is given by the sum of the current market value and the dividend payments.

We next give the representation of the price S(tT) given by (15), which will be used to characterize the CVA representation of the portfolio of defaultable claims in the following subsection. The proof is provided in the Appendix.

Proposition 2.3

Let \(t\in [0,T]\). Then the price S(tT) given by (15) admits the following representation:

$$\begin{aligned} S(t,T)=\mathbf{1}_{t\ne T}{\Lambda }_1(t,X(t),H(t))+{\Lambda }_2(t,X(t),H(t))-Z(t)K(t), \end{aligned}$$
(17)

where, for \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned} {\Lambda }_1(t,x,z):= & {} {\mathbb {E}} _{t,x,z}^{ {\mathbb {Q}} }\left[ \xi (1-K(T))\right] ,\nonumber \\ {\Lambda }_2(t,x,z):= & {} {\mathbb {E}} _{t,x,z}^{ {\mathbb {Q}} }\bigg [Z(T)K(T)+\int _{t}^{T} (1-K(u)) a(u) du\nonumber \\&-\sum _{j=1}^{N+1}\int _t^T K(u)[Z^j(u)-Z(u)](1-H_j(u))(1+\vartheta _j(u))X_j(u)du\bigg ].\qquad \end{aligned}$$
(18)

Here we used \( {\mathbb {E}} _{t,x,z}^{ {\mathbb {Q}} }[\cdot ]:= {\mathbb {E}} ^{ {\mathbb {Q}} }[\cdot |X(t)=x,H(t)=z]\), \(Z^j(u):= Z(H^j(u))\) and \(H^j(u)\) has been defined in (1).

In order to characterize the price S(tT) and the CVA representation, we next study the functions \(\Lambda _1,\Lambda _2\) given in (18). More precisely, for \(\alpha =(\alpha _1,\alpha _2,\alpha _3)\in \mathbb {R}^3\), consider the following Cauchy problem, on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned}&\left( \frac{\partial }{\partial t} + {{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) F_{\alpha }(t,x,z)+\alpha _3(1-K(z))a(z)- \alpha _3\sum _{j=1}^{N+1}K(z)[Z(z^j)\nonumber \\&\quad -Z(z)](1-z_j)(1+\vartheta _j(x,z))x_j= 0 \end{aligned}$$
(19)

with the terminal condition

$$\begin{aligned} F_{\alpha }(T,x,z)=\alpha _1\xi (z)(1-K(z))+\alpha _2Z(z)K(z),\qquad (x,z)\in \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}. \end{aligned}$$
(20)

The operator \({{{\mathcal {A}}}}^{ {\mathbb {Q}} }\) in (19) is the generator of Markov process (XH) under \( {\mathbb {Q}} \), i.e., for any function \(f(\cdot ,z)\in C^2(\mathbb {R}_+^{N+1})\) with \(z\in {{{\mathcal {S}}}}\),

$$\begin{aligned} {{{\mathcal {A}}}}^{ {\mathbb {Q}} }f(x,z)&:=\tilde{{{\mathcal {A}}}}^{ {\mathbb {Q}} }f(x,z)+\sum _{j=1}^{N+1} \big [f(x+w_j,z^j) - f(x,z)\big ](1-z_j)(1+\vartheta _j(x,z))x_j. \end{aligned}$$
(21)

The vector of weights \(w_j=(w_{ij})_{i=1,\ldots ,{N+1}}\), and recall that the default state \(z^j\) has been defined in (1). The operator \(\tilde{{{\mathcal {A}}}}^{ {\mathbb {Q}} }\) is defined by, for \((x,z)\in \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned} \tilde{{{\mathcal {A}}}}^{ {\mathbb {Q}} }f(x,z) :=(\mu (x)+\sigma (x)\theta (x,z))^{\top }D_xf(x,z)+\frac{1}{2}\mathrm{tr}[(\sigma \sigma ^{\top })(x)D_{xx}f(x,z)]. \end{aligned}$$
(22)

Here \(D_xf:=(\frac{\partial f}{\partial x_i})_{i=1,\ldots ,N+1}^{\top }\) and \(D_{xx}f:=(\frac{\partial ^2 f}{\partial x_i\partial x_j})_{i,j=1,\ldots ,N+1}\). By Assumption (A2), the operator \(\tilde{{{\mathcal {A}}}}^{ {\mathbb {Q}} }\) is uniformly elliptic. In terms of (21), we can rewrite Eq. (19) in the following equivalent form:

$$\begin{aligned} 0= & {} \left( \frac{\partial }{\partial t} + {\tilde{{{{\mathcal {A}}}}}}^{ {\mathbb {Q}} }\right) F_{\alpha }(t,x,z)+\alpha _3(1-K(z))a(z)\nonumber \\&-\, \alpha _3\sum _{j=1}^{N+1}K(z)[Z(z^j)-Z(z)](1-z_j)(1+\vartheta _j(x,z))x_j\nonumber \\&+\sum _{j=1}^{N+1}\big [F_{\alpha }(t,x+w_j,z^j)-F_{\alpha } (t,x,z)\big ](1-z_j)(1+\vartheta _j(x,z))x_j. \end{aligned}$$
(23)

Recall that \(z=0^{j_1,\ldots ,j_l}\) denotes the vector with zero entries except for the components \(j_1 \ne j_2,\cdots \ne j_l\) which are set to one. We distinguish two cases:

  • \(l=N+1\), i.e., all names have defaulted. In this case, the Cauchy problem (23) is reduced to

    $$\begin{aligned} \left( \frac{\partial }{\partial t} + {\tilde{{{{\mathcal {A}}}}}}^{ {\mathbb {Q}} }\right) F_{\alpha }^{(N+1)}(t,x)+\alpha _3(1-K^{(N+1)})a^{(N+1)}=0 \end{aligned}$$
    (24)

    with the terminal condition \(F_{\alpha }^{(N+1)}(T,x)=\alpha _1\xi ^{(N+1)}(1-K^{(N+1)})+\alpha _2Z^{(N+1)}K^{(N+1)}\) for all \(x\in \mathbb {R}_+^{N+1}\). It can be easily seen that the solution admits the closed-form representation given by, for \((t,x)\in [0,T]\times \mathbb {R}_+^{N+1}\),

    $$\begin{aligned} F_{\alpha }^{(N+1)}(t,x)= & {} \alpha _1{\xi ^{(N+1)}(1-K^{(N+1)})}+\alpha _2Z^{(N+1)} K^{(N+1)}\nonumber \\&+~\alpha _3(1-K^{(N+1)})a^{(N+1)}(T-t). \end{aligned}$$
    (25)
  • \(0\le l\le N\), i.e., the names \(j_1,\ldots ,j_l\) have defaulted. Then the Cauchy problem (23) becomes

    $$\begin{aligned} 0= & {} \left( \frac{\partial }{\partial t} + {\tilde{{{{\mathcal {A}}}}}}^{ {\mathbb {Q}} }\right) F_{\alpha }^{(l)}(t,x)-\left( \sum _{j\notin \{j_1, \ldots ,j_l\}}(1+\vartheta _j^{(l)}(x))x_j\right) F_{\alpha }^{(l)}(t,x)\nonumber \\&\quad +~\alpha _3(1-K^{(l)})a^{(l)}-\alpha _3\sum _{j\notin \{j_1,\ldots ,j_l\}}K^{(l)}[Z^{(l+1),j}-Z^{(l)}] (1+\vartheta _j^{(l)}(x))x_j\nonumber \\&\quad +\sum _{j\notin \{j_1,\ldots ,j_l\}}F_{\alpha }^{(l+1),j} (t,x+w_j)(1+\vartheta _j^{(l)}(x))x_j. \end{aligned}$$
    (26)

    The terminal condition is given by \(F_{\alpha }^{(l)}(T,x)=\alpha _1\xi ^{(l)}(1-K^{(l)})+\alpha _2Z^{(l)}K^{(l)}\) for all \(x\in \mathbb {R}_+^{N+1}\). Notice that \(F_{\alpha }^{(l+1),j}(t,x)=F_{\alpha }^{(N+1)}(t,x)\) given in (25) if \(l=N\).

We next prove that the Cauchy problem (26) has a unique bounded classical solution \(F_{\alpha }^{(l)}(t,x)\) (which belongs to \(C^{1,2}([0,T)\times \mathbb {R}_+^{N+1})\cap C^0([0,T]\times \mathbb {R}^{N+1})\)) if the Cauchy problem (23) admits a unique bounded classical solution \(F_{\alpha }^{(l+1),j}(t,x)\) if \(z=0^{j_1,\ldots ,j_l,j}\) for \(j\notin \{j_1,\ldots ,j_l\}\). The main result is stated in the following proposition whose proof is postponed to the Appendix.

Proposition 2.4

Let assumptions (A1)–(A3) hold. Assume that at the default state \(z=0^{j_1,\ldots ,j_l,j}\) for \(j\notin \{j_1,\ldots ,j_l\}\), the Cauchy problem (23) admits a unique bounded classical solution \(F_{\alpha }^{(l+1),j}(t,x)\) on \([0,T]\times \mathbb {R}_+^{N+1}\). Then the Cauchy problem (26) admits a unique bounded classical solution \(F_{\alpha }^{(l)}(t,x)\) on \([0,T]\times \mathbb {R}_+^{N+1}\).

Proposition 2.4 and the Feynman–Kac’s formula yield that

$$\begin{aligned} \Lambda _1(t,x,z) = F_{(1,0,0)}(t,x,z),\qquad \Lambda _2(t,x,z) = F_{(0,1,1)}(t,x,z). \end{aligned}$$
(27)

For the hedging purpose, the risk-neutral dynamics of the gain process \(Y=(Y(t))_{t\in [0,T]}\) can be obtained from Proposition 2.4. The proof is provided in the Appendix.

Lemma 2.5

Let assumptions (A1)–(A3) hold. The gain process defined by (16) satisfies the following dynamics, for \(t\in [t,T]\),

$$\begin{aligned} dY(t)&= V(t,X(t),H(t))^{\top } \sigma (X(t))dW^{ {\mathbb {Q}} }(t)\\&\quad + \sum _{j=1}^{N+1}\big \{G_{j}(t,X(t^-),H(t^-))-K(t^-){[Z^j(t^-)-Z(t^-)]}\big \}dM_j^{ {\mathbb {Q}} }(t).\nonumber \end{aligned}$$
(28)

Recall that \(Z(t)=Z(H(t))\) and \(Z^j(t)=Z(H^j(t))\), \(W^{ {\mathbb {Q}} }=(W^{ {\mathbb {Q}} }(t))_{t\in [0,T]}\) is \(( {\mathbb {Q}} ,{\mathbb {G}})\)-Brownian motion defined by (13). For \(j=1,\ldots ,N+1\), \(M_j^{ {\mathbb {Q}} }=(M_j^{ {\mathbb {Q}} }(t))_{t\in [0,T]}\) is the \(( {\mathbb {Q}} ,{\mathbb {G}})\)-martingale defined by (14). For \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned} V(t,x,z)&:=D_xF_{(1,1,1)}(t,x,z),\nonumber \\ G_{j}(t,x,z)&:=F_{(1,1,1)}(t,x+w_j,z^j) - F_{(1,1,1)}(t,x,z), \end{aligned}$$
(29)

for \(j=1,\ldots ,N+1\). The function \(F_{(1,1,1)}(t,x,z)\) is the unique classical solution of Cauchy problems (19) and (20), in which we set \(\alpha =(1,1,1)\).

2.6 Formulation of Hedging Problem on CVA

Our aim is to study dynamic hedging of the counterparty risk for a portfolio of credit derivatives according to Definition 2.1. A portfolio of defaultable claims with counterparty is defined as follows:

Definition 2.3

Let \({\bar{N}}\ge 1\). For each \(i=1,\ldots ,{\bar{N}}+1\), let \((\xi _i,a_i,Z_i,K_i)\) be a defaultable claim as in Definition 2.1, where \(K_i(t)=K_i(H(t))=\mathbf{1}_{{\bar{\tau }}_i\le t}\) for \(t\in [0,T]\), and \({\bar{\tau }}_i\)’s, \(i=1,\ldots ,{\bar{N}}+1\), are positive \({\mathbb {G}}\)-stopping times such that \(K_1(t),\ldots ,K_{{\bar{N}}+1}(t)\) do not jump simultaneously. We call \((\xi _i,a_i,Z_i,K_i)_{i=1,\ldots ,{\bar{N}}+1}\) a defaultable claim portfolio.

We consider the problem from the perspective of a default-free investor who is trading with CDS referring the counterparty and wants to protect herself/himself against the loss incurred at the default of the counterparty, this quantity is called the credit value adjustment (CVA). Let \(S_i(t,T)\) be the price of the defaultable claim \((\xi _i,a_i,Z_i,K_i)\) in the portfolio, we define the exposure of the investor to the counterparty at time \(t\in [0,\tau _{N+1}]\),

$$\begin{aligned} \varepsilon _{{\bar{N}}}(t,T):=\sum _{i=1}^{{\bar{N}}} b_i S_i(t,T)\mathbf{1}_{{\bar{\tau }}_i \ge t}. \end{aligned}$$
(30)

The weight \(b_i\in \mathbb {R}\) denotes the number of contracts referencing the entity i purchased (\(b_i > 0\)) or sold (\(b_i < 0\)) by the investor. Let \(L_{N+1}(t):=L_{N+1}(H(t))\) be the percentage loss rate incurred by the investor when counterparty “\(N+1\)” defaults on its obligations. Here \(L_{N+1}(z)\) is a deterministic function on \(z\in {{{\mathcal {S}}}}\). Set \(x_+=x \vee 0\) for \(x\in \mathbb {R}\). Then the CVA of the defaultable claim portfolio is given by the market value of the counterparty risk loss, i.e., the replacement cost incurred by the investor at the default time, \(\tau _{N+1}\), of the counterparty (see Brigo et al. [12]):

$$\begin{aligned} \mathrm{CVA}_{{\bar{N}}}(t,T) = {\mathbb {E}} ^{ {\mathbb {Q}} }\big [ L_{N+1}(\tau _{N+1}) \mathbf{1}_{\{t<\tau _{N+1}\le T\}}\{\varepsilon _{{\bar{N}}}(\tau _{N+1},T)\}_+\big |{\mathcal {G}}_t\big ]. \end{aligned}$$
(31)

Since our credit market is incomplete, perfect replication is not possible and we choose, among the quadratic hedging methods, the local risk minimization approach. Locally risk-minimizing hedging strategies for contingent claims can be characterized via the FS decomposition of their payoff, see Schweizer [28, 29]. This approach has been extended in Schweizer [30] for payment streams and in Biagini and Cretarola [6] who allow for payment streams over a random time horizon. Differently from the hedging instrument with continuous trajectories considered in Biagini and Cretarola [6], we are using the CDS referring the counterparty as the hedging instrument whose dynamics is of jump-diffusion processes, see (44) below. In the credit hedging literature (see, e.g., Frey and Backhaus [21], Frey and Schmidt [22]), hedging instruments are usually modeled directly under the risk-neutral measure. This avoids finding the MMM and hence the risk-minimization hedging is performed under the risk-neutral measure (not under the real-world measure). In this paper, we consider the locally risk-minimizing hedging under the real-world measure. This implies that we need to identify two additional probability measures: the risk-neutral measure \( {\mathbb {Q}} \) introduced in Sect. 2.5 for pricing purpose and the MMM \({\hat{ {\mathbb {P}} }}\). We will study the MMM in the forthcoming section.

Remark 2.6

From a practical point of view, the choice of the counterparty is also important to decide how to trade CDS. By considering this point, the framework may be formulated as a coupled optimization problem, however, in general, it is difficult to solve. Frei et al. [20] study how banks manage their default risk before bilaterally negotiating the quantities and prices of OTC contracts resembling CDS. Therein, Traders maximize their expected utility and find the equilibrium quantities that they want to trade, which is based on comparing the certainty equivalents. In this paper, we will not consider the choice of the counterparty and assume that the investor buys a fixed portfolio of credit derivatives from a defaultable counterparty.

3 Locally Risk-Minimizing Hedging for CVA

This section studies dynamic hedging of CVA for a defaultable claim portfolio formulated in Sect. 2.6.

3.1 Representation of CVA and Gain Processes of CDS

We give the representation of the exposure of the investor (see (30) in Sect. 2.6) at the counterparty’s default time. Let \(t\in [0,T]\). For \(i=1,\ldots ,{\bar{N}}+1\), recall that \(S_i(t,T)\) is the price of the defaultable claim \((\xi _i,a_i,Z_i,K_i)\) in a portfolio. By Proposition 2.3 and (27), on \(\{{\bar{\tau }}_i>t\}\),

$$\begin{aligned} S_i(t,T)=\mathbf{1}_{t\ne T}F_{i;(1,0,0)}(t,X(t),H(t))+F_{i;(0,1,1)}(t,X(t),H(t))-Z_i(t)K_i(t). \end{aligned}$$
(32)

Here \(F_{i;(1,0,0)}(t,x,z)\) and \(F_{i;(0,1,1)}(t,x,z)\) are the unique bounded classical solutions to the following Cauchy problems in which we set, respectively, \(\alpha =(1,0,0)\) and \(\alpha =(0,1,1)\): for \(\alpha =(\alpha _1,\alpha _2,\alpha _3)\in \mathbb {R}^3\), on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned}&\left( \frac{\partial }{\partial t} + {{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) F_{i;\alpha }(t,x,z)+\alpha _3(1-K_i(z))a_i(z)\nonumber \\&\qquad -\alpha _3\sum _{j=1}^{N+1}K_i(z)[Z_i(z^j)-Z_i(z)](1-z_j)(1+\vartheta _j(x,z))x_j= 0 \end{aligned}$$
(33)

with the terminal condition

$$\begin{aligned} F_{i;\alpha }(T,x,z)=\alpha _1\xi _i(z)(1-K_i(z))+\alpha _2Z_i(z)K_i(z),\qquad (x,z)\in \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}. \end{aligned}$$
(34)

We obtain from (30) that

$$\begin{aligned} \varepsilon _{{\bar{N}}}(t,T)&=\sum _{i=1}^{{\bar{N}}} b_i S_i(t,T) \mathbf{1}_{{\bar{\tau }}_i \ge t}=\sum _{i=1}^{{\bar{N}}} b_i S_i(t\wedge {\bar{\tau }}_i,T) \mathbf{1}_{{\bar{\tau }}_i \ge t}\nonumber \\&=\sum _{i=1}^{{\bar{N}}} b_i\big [(1-K_i(t))S_i(t,T)+Z_i({\bar{\tau }}_i)\mathbf{1}_{{\bar{\tau }}_i=t}\big ]. \end{aligned}$$
(35)

Note that \(K_1(t),\ldots ,K_{{\bar{N}}+1}(t)\) do not jump simultaneously. Then, the exposure of the investor at the counterparty’s default time is given by

$$\begin{aligned} \varepsilon _{{\bar{N}}}(\tau _{N+1},T) =\sum _{i=1}^{{\bar{N}}} b_i (1-K_i(\tau _{N+1}))S_i(\tau _{N+1},T). \end{aligned}$$
(36)

A popular approach to mitigate the counterparty risk loss is to account for dynamic trading with CDS on the counterparty (see Chapter 2.4 in Gregory [23]). We are ready to derive the dynamics of the gain process \(Y_{N+1}=(Y_{N+1}(t))_{t\in [0,T]}\) of the CDS. Recall Cauchy systems (33) and (34). For \(i=1,\ldots ,N+1\), consider the Cauchy problems associated with the CDS portfolio: on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned}&\left( \frac{\partial }{\partial t} + {{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) F_{i}^{\mathrm{cds}}(t,x,z)-(1-z_i)\varepsilon _i-\sum _{j\ne i}z_i[L_i(z^j)\nonumber \\&\quad -L_i(z)](1-z_j)(1+\vartheta _j(x,z))x_j= 0 \end{aligned}$$
(37)

with the terminal condition

$$\begin{aligned} F_{i}^{\mathrm{cds}}(T,x,z)=Z_i(z)K_i(z)=L_i(z)z_i,\qquad (x,z)\in \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}. \end{aligned}$$
(38)

Lemma 2.5 leads to the following result.

Lemma 3.1

Under the assumptions (A1)–(A3), for \(i=1,\ldots ,N+1\), the gain process \(Y_i(t) = {\mathbb {E}} ^{ {\mathbb {Q}} }\left[ D_i(T) |{\mathcal {G}}_t\right] \) of the i-th CDS, i.e. associated with the defaultable claim \((\xi _i,a_i,Z_i,K_i)\) specified in (9), admits the following dynamics, for \(t\in [0,T]\),

$$\begin{aligned} dY_i(t)= & {} V_i^{\mathrm{cds}}(t,X(t),H(t))^{\top } \sigma (X(t))dW^{ {\mathbb {Q}} }(t)\nonumber \\&+ \sum _{j=1}^{N+1}\big \{G_{ij}^{\mathrm{cds}}(t,X(t^-),H(t^-))-H_i(t^-)[L_i^j(t^-)-L_i(t^-)]\big \}dM_j^{ {\mathbb {Q}} }(t).\qquad \quad \end{aligned}$$
(39)

Here recall that \(L_i(t):=L_i(H(t))\) and \(L_i^j(t):=L_i(H^j(t))\). For \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\) and \(i,j=1,\ldots ,N+1\),

$$\begin{aligned} V_i^{\mathrm{cds}}(t,x,z)&:=D_xF_{i}^{\mathrm{cds}}(t,x,z),\nonumber \\ G_{ij}^{\mathrm{cds}}(t,x,z)&:=F_{i}^{\mathrm{cds}}(t,x+w_j,z^j) - F_{i}^{\mathrm{cds}}(t,x,z). \end{aligned}$$
(40)

Remark 3.2

Consider the special case that \(Z_i(t)=L_i(t)\equiv L_i\) for \(i=1,\ldots ,N+1\), i.e. they are constants and independent of the default state \(z\in {{{\mathcal {S}}}}\). The Cauchy system (37) then reduces to, on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned}&\left( \frac{\partial }{\partial t} + {{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) F_{i}^{\mathrm{cds}}(t,x,z)-(1-z_i)\varepsilon _i= 0 \end{aligned}$$
(41)

with the terminal condition \(F_{i}^{\mathrm{cds}}(T,x,z)=L_iz_i\) for \((x,z)\in \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\). Correspondingly, the gain process \(Y_i(t) = {\mathbb {E}} ^{ {\mathbb {Q}} }\left[ D_i(T) |{\mathcal {G}}_t\right] \) of the i-th CDS admits dynamics:

$$\begin{aligned} dY_i(t)&= V_i^{\mathrm{cds}}(t,X(t),H(t))^{\top } \sigma (X(t))dW^{ {\mathbb {Q}} }(t)+\sum _{j=1}^{N+1}G_{ij}^{\mathrm{cds}}(t,X(t^-),H(t^-))dM_j^{ {\mathbb {Q}} }(t). \end{aligned}$$
(42)

3.2 Payment Stream and CDS Hedging Instrument

The hedging instrument used by the investor is the CDS written on the investor’s counterparty “\(N+1\)” and a riskless asset. As we consider dynamic hedging of the CVA, this may be seen as a payment stream on the random interval \([0, T \wedge \tau _{N+1}]\). More precisely, its payment stream \(\Theta =(\Theta (t))_{t\in [0,T]}\) is given by

$$\begin{aligned} \left\{ \begin{array}{ll} {\Theta }(t)= L_{N+1}(\tau _{N+1}) \mathbf{1}_{\tau _{N+1}\le t}\{\varepsilon _{{\bar{N}}}(\tau _{N+1},T)\}_+,\ \ \ t\in [0,T),\\ {\Theta }(T)=0,\ \ t=T. \end{array} \right. \end{aligned}$$
(43)

The exposure \(\varepsilon _{{\bar{N}}}(\tau _{N+1},T)\) is given by (36). Hedging is performed until the CVA payoff is triggered. Hence, we work with hedging strategies only up to \(T\wedge \tau _{N+1}\), i.e., the minimum between the maturity of the CVA claim and the default time of the investor’s counterparty. As in Frey and Schmidt [22], Frey and Backhaus [21], we use CDS as hedging instrument by considering the associated gain process: in our framework, this is described by the process \(Y_{N+1}=(Y_{N+1}(t))_{t\in [0,T]}\) whose \( {\mathbb {Q}} \)-dynamics is given in Lemma 3.1 under the choice of \(i=N+1\). Differently from the above papers, we discuss the hedging problem under the real-world probability measure \( {\mathbb {P}} \). We then rewrite the dynamics of \(Y_{N+1}\) under \( {\mathbb {P}} \) as:

$$\begin{aligned} dY_{N+1}(t)&= -\left( \Upsilon (t,X(t),H(t))\widetilde{\theta }(X(t),H(t))\right. \nonumber \\&\quad \left. +\, \sum _{j=1}^{N+1}\Psi _j(t,X(t),H(t))\vartheta _j(X(t),H(t))X_j(t)\right) dt\nonumber \\&\quad +\Upsilon (t,X(t),H(t))dW(t)+ \sum _{j=1}^{N+1}\Psi _j(t,X(t^-),H(t^-))dM_j(t). \end{aligned}$$
(44)

Here the coefficients, for \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned} \Upsilon (t,x,z)&:=V_{N+1}^{\mathrm{cds}}(t,x,z)^{\top } \sigma (x),\nonumber \\ \Psi _j(t,x,z)&:=G_{N+1,j}^{\mathrm{cds}}(t,x,z)-z_{N+1}[L_{N+1}(z^j)-L_{N+1}(z)], \end{aligned}$$
(45)

and \(V_{N+1}^{\mathrm{cds}}(t,x,z)\) and \(G_{N+1,j}^{\mathrm{cds}}(t,x,z)\) are given by (40), choosing \(i=N+1\).

We remark that if \(Y_{N+1}\) satisfies the so-called the structure condition (SC), the locally risk-minimizing strategy can be characterized by the FS decomposition of the CVA claim. This is equivalent to finding a strategy which perfectly replicates the CVA claim, is self-financing on average and the associated cost turns out to be orthogonal to the local martingale part of \(Y_{N+1}\). For hedging instruments whose dynamics have continuous trajectories, the FS decomposition coincides with the GKW-decomposition under the MMM. This is no longer true in our framework because \(Y_{N+1}\) exhibits jumps. However, the conditional expectation of the counterparty risk price payment stream under the MMM (see (53) below) plays an essential role to derive the locally risk minimizing strategy in our framework (see Proposition 3.4 below).

3.3 The Minimal Martingale Measure

In order to establish the MMM for \(Y_{N+1}\), by the Ansel–Stricker Theorem (see Ansel and Stricker [1]), we decompose the gain process \(Y_{N+1}\) as, \( {\mathbb {P}} \)-a.s.

$$\begin{aligned} Y_{N+1}(t)=Y_{N+1}(0)+Q(t)+B(t),\quad t\in [0,T]. \end{aligned}$$
(46)

Here \(Q=(Q(t))_{t\in [0,T]}\) is the local \( {\mathbb {P}} \)-martingale part of \(Y_{N+1}\) and \(B=(B(t))_{t\in [0,T]}\) is the finite-variation part of \(Y_{N+1}\) under \( {\mathbb {P}} \). We define the real-valued function by, for \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned} {\hat{\lambda }}(t,x,z)&:=\frac{\Upsilon (t,x,z)\widetilde{\theta }(x,z)+ \sum _{j=1}^{N+1}\Psi _j(t,x,z)(1-z_j) \vartheta _j(x,z)x_j}{|\Upsilon (t,x,z)|^2+\sum _{j=1}^{N+1}\Psi _j^2(t,x,z)(1-z_j)x_j}. \end{aligned}$$
(47)

It is not difficult to verify that \(B(t)=-\int _0^t{\hat{\lambda }}(s,X(s^-),H(s^-))d\left<Q\right>(s)\) for \(t\in [0,T]\), i.e., the structure condition (SC) holds. Here \(\left<Q\right>\) denotes the predictable quadratic variation of Q under \( {\mathbb {P}} \). Then, we have the following lemma whose proof is provided in the Appendix.

Lemma 3.3

Let Assumption (A3) hold. Suppose that, for \(j=1,\ldots ,N+1\) and \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), \(0<1+{\hat{\lambda }}(t,x,z)\Psi _j(t,x,z)\le \nu _j\) for some \(\nu _j>0\). Then the MMM \({\hat{ {\mathbb {P}} }}\) is given by \(\frac{d{\hat{ {\mathbb {P}} }}}{d {\mathbb {P}} }|_{{\mathcal {G}}_t}=\xi (t)\) for \(t\in [0,T]\), where the density process \(\xi =(\xi (t))_{t\in [0,T]}\) is given by the stochastic exponential \(\xi (t)={{{\mathcal {E}}}}_t(\int _0^{\cdot }{\hat{\lambda }}(s,X(s^-),H(s^-))dQ(s))\).

Under the conditions of Lemma 3.3 and the (SC), the \({\hat{ {\mathbb {P}} }}\)-dynamics of \(Y_{N+1}\) is given by

$$\begin{aligned} dY_{N+1}(t)&=\Upsilon (t,X(t),H(t))d{\hat{W}}(t)+ \sum _{j=1}^{N+1}\Psi _j(t,X(t^-),H(t^-))d{\hat{M}}_j(t). \end{aligned}$$
(48)

The process \({\hat{W}}=({\hat{W}}(t))_{t\in [0,T]}\) is a d-dimensional \(({\hat{ {\mathbb {P}} }},{\mathbb {G}})\)-Brownian motion defined by \({\hat{W}}(t):=W(t)-\int _0^t{\hat{\lambda }}(s,X(s),H(s))\Upsilon (s,X(s),H(s))^{\top }ds\). For \(j=1,\ldots ,N+1\), the process \({\hat{M}}_j=({\hat{M}}_j(t))_{t\in [0,T]}\) is a \(({\hat{ {\mathbb {P}} }},{\mathbb {G}})\)-default martingale defined by \({\hat{M}}_j(t):=H_j(t)-\int _0^t(1-H_j(s)){\hat{F}}_j(s,X(s),H(s))ds\). Here, for \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), the function

$$\begin{aligned} {\hat{F}}_j(t,x,z):=x_{j}(1+{\hat{\lambda }}(t,x,z)\Psi _{j}(t,x,z)). \end{aligned}$$
(49)

We remark that if one takes the risk premium \((\theta ,\vartheta )\equiv (0,0)\), then \({\hat{ {\mathbb {P}} }}= {\mathbb {Q}} = {\mathbb {P}} \).

3.4 Locally Risk-Minimizing Hedging: Setup and Tool

The definition of admissible hedging strategies is given by

Definition 3.1

Let (QB) be defined in (46) and \(\Psi \) be the space of all \({\mathbb {G}}\)-predictable processes \(\theta =(\theta (t))_{t \in [0, T\wedge \tau _{N+1}]}\) such that

$$\begin{aligned} {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}}\theta ^2(t) d\left<Q\right>(t) + \left( \int _0^{T\wedge \tau _{N+1}} |\theta (t)| dB(t)\right) ^2\right] < \infty . \end{aligned}$$
(50)

Here \( {\mathbb {E}} \) denotes the expectation under \( {\mathbb {P}} \). An admissible strategy is a process \(\varphi =(\theta , \eta )\) where \(\theta \in \Psi \) and \(\eta \) is a real-valued \({\mathbb {G}}\)-adapted process such that the associated value process \(V^{\varphi }(t) := \theta (t) Y_{N+1}(t) + \eta (t)\) is right-continuous and square integrable over \([0, T\wedge \tau _{N+1}]\).

Here \(\theta (t)\) denotes the number of shares of the gain process of the risky CDS contract referencing the counterparty held at time t, while \(\eta (t)\) is the amount invested in the riskless asset at time t. Note that for any \(\theta \in \Psi \), the stochastic integral \(\int _0^t \theta (u) dY_{N+1}(u)\), \(t \in [0,T\wedge {\tau }_{N+1}]\) is a square-integrable semimartingale (see Schweizer [29]). Following Schweizer [30] who investigates the case of payment streams over a deterministic time horizon, and Biagini and Cretarola [6] who allow for a random delivery date which can be seen as a payment stream over a random time horizon, we assign a cost process to each admissible strategy:

Definition 3.2

The cost process \(C^{\varphi }\) of an admissible strategy \(\varphi =(\theta , \eta )\) is given by

$$\begin{aligned} C^{\varphi }(t) := \Theta (t )+ V^{\varphi }(t) - \int _0^t \theta (u) dY_{N+1}(u) , \quad t \in [0, T\wedge \tau _{N+1}],\end{aligned}$$
(51)

where \(\Theta (t)\) is defined in (43). An admissible strategy \(\varphi \) is called mean self-financing if its cost process \(C^{\varphi }\) is a \( {\mathbb {P}} \)-martingale. The risk process of \(\varphi \), that is the conditional variance of the hedging error, is given by

$$\begin{aligned} R^{\varphi }(t) := {\mathbb {E}} \left[ \big (C^{\varphi }(T\wedge \tau _{N+1}) - C^{\varphi }(t)\big )^2 \big | {\mathcal {G}}_t \right] , \quad t \in [0,T\wedge {\tau }_{N+1}]. \end{aligned}$$
(52)

Similarly to the local risk minimization hedge of European contingent claims, the final cost has to equal the final payment minus gains by trading, that is \(\Theta (T\wedge \tau _{N+1}) - \int _0^{T\wedge \tau _{N+1}} \theta (u) dY_{N+1}(u)\). Thus, Definition 3.2 requires to look for admissible strategies with the 0-achieving property, i.e., \(V^{\varphi }(\tau _{N+1}\wedge T)=0\), \( {\mathbb {P}} \)-a.s. (see also Schweizer [30] for further details). We will not give the original definition of locally risk-minimizing strategy that formalizes the intuitive idea that changing an optimal strategy over an infinitesimal interval increases the risk process given by (52), because it is rather technical. We here use an equivalent definition of the pseudo-locally risk-minimizing strategy given below. Theorem 1.6 in Schweizer [30] proves the equivalence between the local risk-minimization and pseudo-local risk-minimization if the (SC) and the continuity of the mean-variance tradeoff hold.

Definition 3.3

Let \(\Theta \) be the payment stream given in (43). We say that an admissible strategy \(\varphi ^*\) is locally risk-minimizing for \(\Theta \) if the following conditions hold:

  1. (i)

    \(\varphi ^*\) is 0-achieving, that is \(V^{\varphi ^*}(\tau _{N+1}\wedge T)=0\), \( {\mathbb {P}} \)-a.s.

  2. (ii)

    \(\varphi ^*\) is mean self-financing and \(C^{\varphi ^*}\) is strongly orthogonal to the martingale part Q of \(Y_{N+1}\), (i.e., \(\langle C^{\varphi ^*}, Q\rangle =0\)).

We next prove the main tool for deriving the locally risk-minimizing hedging strategy. For this, define the process

$$\begin{aligned} V(t) :={\hat{ {\mathbb {E}} }}\left[ \Theta (T\wedge \tau _{N+1}) | {\mathcal {G}}_t \right] ,\quad \ t \in [0,T\wedge {\tau }_{N+1}]. \end{aligned}$$
(53)

Here \({\hat{ {\mathbb {E}} }}\) denotes the expectation under the MMM \({\hat{ {\mathbb {P}} }}\). Then

Proposition 3.4

Let assumptions (A1)–(A3) hold. Let \(M^V\) be the local \( {\mathbb {P}} \)-martingale part of V. Then, the payment stream \(\Theta \) given by (43) admits a unique locally risk-minimizing strategy \(\varphi ^* = (\theta ^*, \eta ^*)\), where \( {\mathbb {P}} \)-a.s.

$$\begin{aligned} \theta ^*(t) =\frac{d \big<M^V, Q\big>(t)}{d\left<Q \right>(t)},\qquad t \in [0,T\wedge {\tau }_{N+1}]. \end{aligned}$$
(54)

Moreover \(V^{\varphi ^*}(t)=V(t) - \Theta (t)\), \(t \in [0,T\wedge {\tau }_{N+1}]\), \( {\mathbb {P}} \)-a.s.

Proof

Note that \(\Theta \) is square integrable w.r.t. \( {\mathbb {P}} \) because the price representation \(S_i(t,T)\) given by (32) is bounded for all \(i=1,\ldots ,{\bar{N}}\) by Proposition 2.4. Assumption (A3) implies that the mean-variance tradeoff process (see also (99) in the Appendix) is uniformly bounded. Then, there exists \(\theta ^{FS} \in \Psi \) such that the following FS decomposition of \(\Theta (T\wedge \tau _{N+1})\) w.r.t. \(Y_{N+1}\) holds, \( {\mathbb {P}} \)-a.s.

$$\begin{aligned} \Theta (T\wedge \tau _{N+1}) = \Theta _0 +\int _0^{T\wedge \tau _{N+1}} \theta ^{FS}(u) dY_{N+1}(u) + {{\tilde{A}}}(T \wedge \tau _{N+1}). \end{aligned}$$
(55)

Here, \(\Theta _0\in \mathbb {R}\) and \({{\tilde{A}}}\) is a \( {\mathbb {P}} \)-martingale null at time zero, strongly orthogonal to the local martingale part Q of \(Y_{N+1}\) under \( {\mathbb {P}} \). Using Proposition 3.7 in Biagini and Cretarola [6], we have that the payment stream \(\Theta \) given by (43) admits a unique locally risk-minimizing strategy \(\varphi ^* = (\theta ^*, \eta ^*)\), where, for \(t\in [0,T\wedge {\tau }_{N+1}]\), \( {\mathbb {P}} \)-a.s.

$$\begin{aligned} \theta ^*(t) = \theta ^{FS}(t),\quad \text {and }\ \eta ^*(t)= V^{\varphi ^*}(t) - \theta ^{FS}(t)Y_{N+1}(t). \end{aligned}$$
(56)

and

$$\begin{aligned} V^{\varphi ^*}(t) =\Theta (0) + \int _0^{t} \theta ^{FS}(u) dY_{N+1}(u) + {{\tilde{A}}}(t) - \Theta (t). \end{aligned}$$
(57)

The minimal cost is then given by \(C^{\varphi ^*}(t) =\Theta (0)+ {{\tilde{A}}}(t)\). We next prove that, \( {\mathbb {P}} \)-a.s.

$$\begin{aligned} V^{\varphi ^*}(t) = V(t) - \Theta (t),\qquad t\in [0,T\wedge \tau _{N+1}]. \end{aligned}$$
(58)

First, let us observe that \(\int _0^{\cdot \wedge \tau _{N+1}} \theta ^{FS}(u) dY_{N+1}(u)\) is a \({\hat{ {\mathbb {P}} }}\)-martingale, because \(\int _0^{\cdot \wedge \tau _{N+1}} \theta ^{FS}(u) dQ(u)\) and the density process \(\xi =(\xi (t))_{t\in [0,T]}\) (see Lemma 3.3) are square integrable \( {\mathbb {P}} \)-martingales. The definition of the MMM (see also Definition 2.2 in Arai [2]) yields that \({\tilde{A}}=({\tilde{A}}(t))_{t\in [0,T]}\) is a \({\hat{ {\mathbb {P}} }}\)-martingale and hence the process \(V^{\varphi ^*}(t)+\Theta (t)\) for \(t\in [0,T\wedge \tau _{N+1}]\) turns out to be a \({\hat{ {\mathbb {P}} }}\)-martingale. Recalling that \(V^{\varphi ^*}(T\wedge \tau _{N+1}) =0\), \( {\mathbb {P}} \)-a.s., we get that

$$\begin{aligned} V^{\varphi ^*}(t) + \Theta (t) = {\hat{ {\mathbb {E}} }}[\Theta (T\wedge \tau _{N+1}) | {\mathcal {G}}_t]=V(t),\qquad t\in [0,T\wedge \tau _{N+1}]. \end{aligned}$$

Recall that \(M^V\) is the local \( {\mathbb {P}} \)-martingale part of V. Then, it follows from (57) that, \( {\mathbb {P}} \)-a.s.

$$\begin{aligned} M^V(t) = \Theta (0) + \int _0^t\theta ^{FS}(u)dQ(u)+{\tilde{A}}(t),\qquad t\in [0,T\wedge \tau _{N+1}]. \end{aligned}$$

Then we deduce (54) by the orthogonality between \({\tilde{A}}\) and Q. This proves the proposition. \(\square \)

3.5 Locally Risk-Minimizing Strategy

The aim of this section is to provide an explicit representation for the strategy \(\theta ^*\). We start providing the martingale decomposition of the process V defined by (53) under the MMM, which will be given in Proposition 3.7 below. Toward this goal, we consider the existence and uniqueness of classical solutions to a recursive system of Cauchy problems, which will play an important role for the representation of \(\theta ^*\).

3.5.1 A Related Cauchy Problem

Consider the following Cauchy problem, for \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned} 0&=\left( \frac{\partial }{\partial t}+\hat{{{\mathcal {A}}}}\right) g(t,x,z)\nonumber \\&\quad +L_{N+1}(z^{N+1})\left\{ \sum _{i=1}^{{\bar{N}}} b_i(1-K_i(z^{N+1}))F_{i}(t,x+w_{N+1}, z^{N+1})\right\} _+\nonumber \\&\quad \times (1-z_{N+1}){\hat{F}}_{N+1}(t,x,z) \end{aligned}$$
(59)

with \(g(T,x,z)=0\) for all \((x,z)\in \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\). The operator \(\hat{{{\mathcal {A}}}}\) is defined by

$$\begin{aligned} \hat{{{\mathcal {A}}}}f(t,x,z)&:=\bar{{{\mathcal {A}}}}f(t,x,z)+\sum _{j=1}^{N+1} \big [f(t,x+w_j,z^j) - f(t,x,z)\big ](1-z_j){\hat{F}}_j(t,x,z),\nonumber \\ \bar{{{\mathcal {A}}}}f(t,x,z)&:=(\mu (x)+{\hat{\lambda }}(t,x,z)\sigma (x) \Upsilon (t,x,z)^{\top })^{\top }D_xf(t,x,z)\nonumber \\&\quad +\frac{1}{2}\mathrm{tr}[(\sigma \sigma ^{\top })(x)D_{xx}f(t,x,z)]. \end{aligned}$$
(60)

The function \(F_i(t,x,z)\) is the unique bounded classical solution to the system (33) in which we take \(\alpha =(1,1,1)\). Rewrite Eq. (59) in a more convenient form:

$$\begin{aligned} 0&=\left( \frac{\partial }{\partial t}+\bar{{{\mathcal {A}}}}\right) g(t,x,z)+\sum _{j=1}^{N+1} \big [g(t,x+w_j,z^j) - g(t,x,z)\big ](1-z_j){\hat{F}}_j(t,x,z)\nonumber \\&\quad +L_{N+1}(z^{N+1})\left\{ \sum _{i=1}^{{\bar{N}}} b_i(1-K_i(z^{N+1}))F_{i}(t,x+w_{N+1},z^{N+1})\right\} _+\nonumber \\&\quad \times (1-z_{N+1}) {\hat{F}}_{N+1}(t,x,z). \end{aligned}$$
(61)

Similarly to the recursive system (19), we study the solvability of Eq. (61) recursively through the default states \(z=0^{j_1,\ldots ,j_l}\) for \(l=0,1,\ldots ,N+1\). We also define \(g^{(l)}(t,x)\) and \(g^{(l+1),i}(t,x)\) by (2) with f replaced by g. It may be easily seen that when \(l=N+1\), Eq. (61) simplifies to

$$\begin{aligned} \left( \frac{\partial }{\partial t}+\bar{{{\mathcal {A}}}}\right) g^{(N+1)}(t,x)=0 \end{aligned}$$

with \(g^{(N+1)}(T,x)=0\) for all \(x\in \mathbb {R}_+^{N+1}\). It can be immediately verified that this admits the solution \(g^{(N+1)}(t,x)=0\) for all \((t,x)\in [0,T]\times \mathbb {R}_+^{N+1}\). In the more general case that \(z=0^{j_1,\ldots ,j_l}\) where \(l=0,1,\ldots ,N\), we need to deal with the following Cauchy problem defined on the unbounded domain: on \((t,x)\in [0,T)\times \mathbb {R}_+^{N+1}\),

$$\begin{aligned} 0&=\left( \frac{\partial }{\partial t}+\bar{{{\mathcal {A}}}}\right) g^{(l)} (t,x)-\left( \sum _{j\notin \{j_1,\ldots ,j_l\}}{\hat{F}}_j^{(l)}(t,x) \right) g^{(l)}(t,x)\nonumber \\&\quad +\sum _{j\notin \{j_1,\ldots ,j_l\}}g^{(l+1),j}(t,x+w_j) {\hat{F}}_j^{(l)}(t,x)\nonumber \\&\quad +L_{N+1}^{(l+1),N+1} \left\{ \sum _{i=1}^{{\bar{N}}} b_i(1-K_i^{(l+1),N+1})F_{i}(t,x+w_{N+1}, 0^{j_1,\ldots ,j_l,N+1})\right\} _+\nonumber \\&\quad \times {\hat{F}}_{N+1}^{(l)}(t,x)\mathbf{1}_{j_1,\ldots ,j_l\ne N+1} \end{aligned}$$
(62)

with \(g^{(l)}(T,x)=0\) for all \(x\in \mathbb {R}_+^{N+1}\). The function \(g^{(l+1),j}(t,x)\) is the unique classical solution of the Cauchy system (61) when the default state \(z=0^{j_1,\ldots ,j_l,j}\), for \(j\notin \{j_1,\ldots ,j_l\}\). Recall the notation \(L_{N+1}^{(l+1),N+1}=L_{N+1}(0^{j_1,\ldots ,j_l,N+1})\) and \(K_i^{(l+1),N+1}=K_i(0^{j_1,\ldots ,j_l,N+1})\) for \(j_1,\ldots ,j_l\ne N+1\).

Existence and uniqueness of (nonnegative) bounded classical solutions to Eq. (62) can be proven inductively as stated in the following theorem. The proof is reported in the Appendix.

Theorem 3.5

Let assumptions (A1)–(A3) hold and the condition of Lemma 3.3 is satisfied. Assume that for \(j\notin \{j_1,\ldots ,j_l\}\), \(l=0,1,\ldots ,N\), the Cauchy system (61) admits a unique (nonnegative) bounded classical solution \(g^{(l+1),j}(t,x)\) when \(z=0^{j_1,\ldots ,j_l,j}\). Then the Cauchy system (61) also admits a unique (nonnegative) bounded classical solution \(g^{(l)}(t,x)\) when \(z=0^{j_1,\ldots ,j_l}\) (i.e., the Cauchy problem (62) above admits a unique (nonnegative) bounded classical solution).

3.5.2 Martingale Decomposition of V under the MMM \({\hat{ {\mathbb {P}} }}\)

In this section, we apply Theorem 3.5 to prove the martingale decomposition of the process V defined by (53) under the MMM \({\hat{ {\mathbb {P}} }}\). We need the following auxiliary lemma:

Lemma 3.6

The stopped payment stream of the CVA of a defaultable claim portfolio \((\xi _i,a_i,Z_i,K_i)_{i=1,\ldots ,{\bar{N}}+1}\) before maturity admits the representation, \( {\mathbb {P}} \)-a.s.

$$\begin{aligned}&\Theta (\tau _{N+1}\wedge T)=\int _0^T\mathbf{1}_{s<T}L_{N+1}^{N+1}(s^-)\nonumber \\&\qquad \times \left\{ \sum _{i=1}^{{\bar{N}}} b_i \big (1-K_i^{N+1}(s^-)\big )F_{i}\big (s,X(s^-) +w_{N+1},H^{N+1}(s^-)\big )\right\} _+dH_{N+1}(s).\qquad \quad \end{aligned}$$
(63)

Here \(F_i(t,x,z)\) is the unique bounded classical solution to Cauchy problem (33) in which we set \(\alpha =(1,1,1)\), i.e., \(F_i(t,x,z):=F_{i;(1,1,1)}(t,x,z)\). We also used the notations \(K^{j}(t)= K(H^j(t))\) and \(L_i^j(t)=L_i(H^j(t))\).

Proof

We have from (43) that, for \(t\in [0,T]\),

$$\begin{aligned} {\Theta }(t)=\Theta (t)\mathbf{1}_{t<T}= L_{N+1}(\tau _{N+1}) \mathbf{1}_{\tau _{N+1}\le t}\{\varepsilon _{{\bar{N}}}(\tau _{N+1},T)\}_+\mathbf{1}_{t<T}. \end{aligned}$$

Then we have

$$\begin{aligned} \Theta (\tau _{N+1}\wedge T)&=\Theta (\tau _{N+1})\mathbf{1}_{\tau _{N+1}\le T}\\&=L_{N+1}(\tau _{N+1}) \mathbf{1}_{\tau _{N+1}\le \tau _{N+1}}\{\varepsilon _{{\bar{N}}}(\tau _{N+1},T)\}_+\mathbf{1}_{\tau _{N+1}<T}\mathbf{1}_{\tau _{N+1}\le T}\\&=L_{N+1}(\tau _{N+1})\{\varepsilon _{{\bar{N}}}(\tau _{N+1},T)\}_+\mathbf{1}_{\tau _{N+1}<T}\\ {}&=L_{N+1} (\tau _{N+1})\{\varepsilon _{{\bar{N}}}(\tau _{N+1},T)\}_+\mathbf{1}_{\tau _{N+1}\le T}, \end{aligned}$$

where we used the fact that \(S_i(T,T)=0\) for all \(i=1,\ldots ,{\bar{N}}\) using the price representation (32). Hence, it holds that \(\varepsilon _{{\bar{N}}}(T,T)=0\). It thus follows from the price representation (32) that

$$\begin{aligned} \Theta (\tau _{N+1}\wedge T)= & {} \int _0^TL_{N+1}(s)\{\varepsilon _{{\bar{N}}}(s,T)\}_+dH_{N+1}(s)\nonumber \\= & {} \int _0^T\mathbf{1}_{s<T}L_{N+1}(s)\left\{ \sum _{i=1}^{{\bar{N}}} b_i (1-K_i(s))S_i(s,T)\right\} _+dH_{N+1}(s)\nonumber \\= & {} \int _0^T\mathbf{1}_{s<T}L_{N+1}(s)\left\{ \sum _{i=1}^{{\bar{N}}} b_i (1-K_i(s))\big [\mathbf{1}_{s\ne T}F_{i;(1,0,0)}(s,X(s),H(s))\right. \nonumber \\&\left. +\,F_{i;(0,1,1)}(t,X(s),H(s))-Z_i(H(s))K_i(H(s))]\right\} _+dH_{N+1}(s)\nonumber \\= & {} \int _0^T\mathbf{1}_{s<T}L_{N+1}(s)\left\{ \sum _{i=1}^{{\bar{N}}} b_i (1-K_i(s))\big [F_{i;(1,0,0)}(s,X(s),H(s))\right. \nonumber \\&\left. +\,F_{i;(0,1,1)}(t,X(s),H(s))-Z_i(H(s))K_i(H(s))]\right\} _+dH_{N+1}(s).\qquad \end{aligned}$$
(64)

Note that \(F_{i;(1,0,0)}(t,x,z)+F_{i;(0,1,1)}(t,x,z)=F_{i;(1,1,1)}(t,x,z)\). Thus, it holds that

$$\begin{aligned}&\Theta (\tau _{N+1}\wedge T)\\&\quad =\int _0^T\mathbf{1}_{s<T}L_{N+1}(s)\left\{ \sum _{i=1}^{{\bar{N}}} b_i (1-K_i(s))\left[ F_{i;(1,1,1)}(s,X(s),H(s)) \right. \right. \\&\left. \left. \qquad -\,Z_i(H(s))K_i(s)\right] \right\} _+dH_{N+1}(s) \\&\quad =\int _0^T\mathbf{1}_{s<T}L_{N+1}(H^{N+1}(s^-))\left\{ \sum _{i=1}^{{\bar{N}}} b_i (1-K_i(H^{N+1}(s^-)))\right. \\&\qquad \times \left[ F_{i;(1,1,1)}(s,X(s^-)+w_{N+1},H^{N+1}(s^-)) \right. \\&\left. \left. \quad -\,Z_i(H^{N+1}(s^-))K_i(H^{N+1}(s^-))\right] \right\} _+dH_{N+1}(s). \end{aligned}$$

This yields the representation (63) using that \(F_i(t,x,z)=F_{i;(1,1,1)}(t,x,z)\) and \((1-K_i(z))K_i(z)=0\). Therefore, the proof of the lemma is completed. \(\square \)

We prove the martingale decomposition of the process V under the MMM \({\hat{ {\mathbb {P}} }}\), which is given by

Proposition 3.7

Let assumptions (A1)–(A3) hold. The process V defined by (53) admits the martingale decomposition under the MMM \({\hat{ {\mathbb {P}} }}\), given by, for \(t\in [0,T]\), \({\hat{ {\mathbb {P}} }}\)-a.s.

$$\begin{aligned} V(t)= & {} V(0)+\int _0^tD_{x}g(s,X(s),H(s))^{\top }\sigma (X(s))d{\hat{W}}(s)\nonumber \\&+\int _0^t\mathbf{1}_{s<T}L_{N+1}^{N+1}(s^-)\left\{ \sum _{i=1}^{{\bar{N}}} b_i (1-K_i^{N+1}(s^-))F_{i}(s,X(s^-)\right. \nonumber \\&\left. +\,w_{N+1},H^{N+1}(s^-))\right\} _+d{\hat{M}}_{N+1}(s)\nonumber \\&+\sum _{j=1}^{N+1}\int _0^t\left[ g(s,{X}(s^-) +w_j,H^j(s^-))-g(s,{X}(s^-),H(s^-))\right] d{\hat{M}}_j(s).\qquad \quad \end{aligned}$$
(65)

For \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), g(txz) is the unique nonnegative bounded classical solution to Eq. (59). The function \(F_i(t,x,z)\) is the unique bounded classical solution to the system (33) in which we set \(\alpha =(1,1,1)\).

Proof

We first have that \(\Theta ( T)= \Theta (\tau _{N+1}\wedge T)\) and \(\Theta ( T)=0\) on \(\{ \tau _{N+1} > T\}\). By Lemma 3.6, for \(t\in [0, T\wedge \tau _{N+1}]\), it holds that

$$\begin{aligned}&V(t) ={\hat{ {\mathbb {E}} }}\left[ \Theta (\tau _{N+1}\wedge T) | {\mathcal {G}}_t\right] ={\hat{ {\mathbb {E}} }}\left[ \int _0^T\mathbf{1}_{s<T}\Gamma _sdH_{N+1}(s)\right| {\mathcal {G}}_t\Bigg ], \end{aligned}$$

where the \({\mathbb {G}}\)-predictable process

$$\begin{aligned} \Gamma _s&:=L_{N+1}(H^{N+1}(s^-))\left\{ \sum _{i=1}^{{\bar{N}}} b_i (1-K_i(H^{N+1}(s^-)))F_{i}(s,X(s^-)\right. \\&\left. \quad +\,w_{N+1},H^{N+1}(s^-))\right\} _+. \end{aligned}$$

Then

$$\begin{aligned} V(t)= & {} {\hat{ {\mathbb {E}} }}\Bigg [\int _0^T\mathbf{1}_{s<T} \Gamma _s d{\hat{M}}_{N+1}(s)\bigg | {\mathcal {G}}_t\Bigg ]\nonumber \\&+\,{\hat{ {\mathbb {E}} }}\Bigg [\int _0^T \Gamma _s (1-H_{N+1}(s^-)){\hat{F}}_{N+1}(s,X(s^-),H(s^-))ds\bigg | {\mathcal {G}}_t\Bigg ] \nonumber \\= & {} \int _0^t \mathbf{1}_{s<T} \Gamma _s d{\hat{M}}_{N+1}(s) +\int _0^t \Gamma _s (1-H_{N+1}(s)){\hat{F}}(s,X(s),H(s))ds +V_2(t),\qquad \quad \end{aligned}$$
(66)

where \({\hat{M}}_{N+1}=({\hat{M}}_{N+1})_{t\in [0,T]}\) is a \(({\hat{ {\mathbb {P}} }},{\mathbb {G}})\)-martingale defined by

$$\begin{aligned} {\hat{M}}_{N+1}(t):=H_{N+1}(t)-\int _0^t(1-H_{N+1}(s)){\hat{F}}_{N+1}(s,X(s),H(s))ds, \end{aligned}$$
(67)

and the process \(V_2=(V_2(t))_{t\in [0,T]}\) is defined by

$$\begin{aligned} V_2(t)&:={\hat{ {\mathbb {E}} }}\left[ \int _t^T\Gamma _s(1-H_{N+1}(s)) {\hat{F}}_{N+1}(s,X(s),H(s))ds\bigg | {\mathcal {G}}_t\right] . \end{aligned}$$

We next prove an explicit characterization of \(V_2\). For \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), define

$$\begin{aligned} g(t,x,z)&:={\hat{ {\mathbb {E}} }}_{t,x,z}\left[ \int _t^T\Gamma _s(1-H_{N+1}(s)) {\hat{F}}_{N+1}(s,X(s),H(s))ds\right] . \end{aligned}$$
(68)

Because (XH) is a \({\mathbb {G}}\)-Markov process, we have that \(V_2(t)=g(t,X(t),H(t))\) for \(t\in [0,T]\). Using Feymann-Kac’s formula, g(txz) satisfies the Cauchy problem (59), i.e., on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned} 0&=\left( \frac{\partial }{\partial t}+\hat{{{\mathcal {A}}}}\right) g(t,x,z)\\&\quad +L_{N+1}(z^{N+1})\left\{ \sum _{i=1}^{{\bar{N}}} b_i(1-K_i(z^{N+1}))F_{i}(t,x+w_{N+1},z^{N+1})\right\} _+\\&\quad \times (1-z_{N+1}){\hat{F}}_{N+1}(t,x,z) \end{aligned}$$

with \(g(T,x,z)=0\) for all \((x,z)\in \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\). Thanks to Theorem 3.5, we can apply Itô’s formula and obtain

$$\begin{aligned} g(t,X(t),H(t))&=g(0,X(0),H(0))+\int _0^t\left( \frac{\partial }{\partial s}+\hat{{{\mathcal {A}}}}\right) g(s,X(s),H(s))ds\\&\quad +\int _0^tD_{x}g(s,X(s),H(s))^{\top }\sigma (X(s))d{\hat{W}}(s)\\&\quad +\sum _{j=1}^{N+1}\int _0^t\left[ g(s,{X}(s^-)+w_j,H^j(s^-))\right. \\&\left. \quad -\,g (s,{X}(s^-),H(s^-))\right] d{\hat{M}}_j(s). \end{aligned}$$

Using (59), it follows that

$$\begin{aligned} dg(t,X(t),H(t))&=-L_{N+1}(H^{N+1}(t))\nonumber \\&\quad \left\{ \sum _{i=1}^{{\bar{N}}}b_i (1-K_i(H^{N+1}(t)))F_{i}(t,X(t)+w_{N+1},H^{N+1}(t))\right\} _+\nonumber \\&\quad \quad \times (1-H_{N+1}(t)){\hat{F}}_{N+1}(t,X(t),H(t))dt \nonumber \\&\quad + D_{x}g(t,X(t), H(t))^{\top }\sigma (X(t))d{\hat{W}}(t)\nonumber \\&\quad +\sum _{j=1}^{N+1}\left[ g(t,{X}(t^-)+w_j,H^j(t^-))\right. \nonumber \\&\left. \quad -\,g(t,{X}(t^-), H(t^-))\right] d{\hat{M}}_j(t). \end{aligned}$$
(69)

By applying the decomposition (66), we obtain the martingale representation (65) under the MMM \({\hat{ {\mathbb {P}} }}\). \(\square \)

3.5.3 Representation of the Locally Risk-Minimizing Strategy

In this section, we will characterize the locally risk-minimizing strategy for CVA and prove that it is admissible. Prior to stating the main result, we first have the following lemma. The proof is provided in the Appendix.

Lemma 3.8

Let assumptions (A1)–(A3) hold. Recall that g(txz) is the unique bounded classical solution of Eq. (59). Assume that \((1+\varepsilon )|{\hat{\lambda }}\Upsilon |_{\infty }^2T<1\) for some \(\varepsilon >0\). Then, there exists a constant \(C=C(\varepsilon ,T)>0\) such that

$$\begin{aligned}&{\mathbb {E}} \left[ \int _0^T\left| D_xg(s,X(s),H(s))^{\top }\sigma (X(s))\right| ^2ds\right] \nonumber \\&\quad \le C(\varepsilon ,T)+ C(\varepsilon ,T) {\mathbb {E}} \left[ \int _0^T\sum _{j=1}^{N+1}X_j^2(s)ds\right] . \end{aligned}$$
(70)

We next state the main result of this section.

Theorem 3.9

Let the conditions of Lemmas 3.3 and 3.8 be satisfied. The unique locally risk-minimizing strategy \(\theta ^*\in \Psi \) associated with the investment in the risky CDS contract referencing the counterparty “\(N+1\)” is given by

$$\begin{aligned} \theta ^* (t) = \sum _{i=1}^3\frac{U_i(t,X(t^-),H(t^-))}{\Phi (t,X(t^-),H(t^-))},\qquad t\in [0,T\wedge {\tau }_{N+1}]. \end{aligned}$$
(71)

For \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), the functions

$$\begin{aligned} U_1(t,x,z)&:=\big <D_{x}g(t,x,z)^{\top }\sigma (x),\Upsilon (t,x,z)\big >_d;\nonumber \\ U_2(t,x,z)&:=\sum _{j=1}^{N+1}\left[ g(t,x+w_j,z^j)-g(t,x,z)\right] \Psi _{j}(t,x,z)(1-z_j)x_j;\\ U_3(t,x,z)&:=L_{N+1}(z^{N+1})\left\{ \sum _{i=1}^{{\bar{N}}} b_i \big (1-K_i(z^{N+1})\big )F_{i}\big (t,x+w_{N+1},z^{N+1}\big )\right\} _+ \nonumber \\&\quad \times \Psi _{N+1}(t,x,z)(1-z_{N+1})x_{N+1}.\nonumber \end{aligned}$$
(72)

Here \(\left<\cdot ,\cdot \right>_d\) denotes the scalar product in \(\mathbb {R}^{d}\) and

$$\begin{aligned} \Phi (t,x,z)&:=\big |\Upsilon (t,x,z)\big |^2+ \sum _{j=1}^{N+1}\big |\Psi _j(t,x,z)\big |^2x_j(1-z_j). \end{aligned}$$
(73)

For \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), the functions \(\Upsilon (t,x,z)\) and \(\Psi _j(t,x,z)\), \(j=1,\ldots ,N+1\), are given in (45). Recall that g(txz) is the unique nonnegative bounded classical solution of Eq. (59). The function \(F_i(t,x,z)\) is the unique bounded classical solution of Eq. (33) in which we set \(\alpha =(1,1,1)\).

Proof

It follows from (46) that \(dQ(t) = \Upsilon (t,X(t),H(t))dW(t)+ \sum _{j=1}^{N+1}\Psi _j(t,X(t^-),H(t^-))dM_j(t)\). Then \(d\left<Q \right>(t)=\Phi (t,X(t^-),H(t^-))dt\), \( {\mathbb {P}} \)-a.s.. In view of Proposition 3.4, recall that \(M^V\) is the local \( {\mathbb {P}} \)-martingale part of V. Then, for \(t\in [0,T\wedge \tau _{N+1}]\), \( {\mathbb {P}} \)-a.s.

$$\begin{aligned} M^V(t)&=V(0)+\int _0^tD_{x}g(s,X(s),H(s))^{\top }\sigma (X(s))d{W}(s)\\&\quad +\int _0^tL_{N+1}^{N+1}(s^-)\left\{ \sum _{i=1}^{{\bar{N}}} b_i \big (1-K_i^{N+1}(s^-)\big )F_{i}\big (s,X(s^-)\right. \\&\left. \quad +\,w_{N+1},H^{N+1}(s^-)\big )\phantom {\sum _{i=1}^{{\bar{N}}}}\right\} _+ dM_{N+1}(s)\\&\quad +\sum _{j=1}^{N+1}\int _0^t\left[ g(s,{X}(s^-)+w_j, H^j(s^-))-g(s,{X}(s^-),H(s^-))\right] d{M}_j(s). \end{aligned}$$

This gives that \(d \big <M^V, Q\big >(t)=\sum _{i=1}^3U_i(t,X(t^-),H(t^-))dt\). In terms of (54) in Proposition 3.4, we deduce that, for \(t\in [0,T\wedge {\tau }_{N+1}]\),

$$\begin{aligned} \theta ^{*}(t)&={ d \big<M^V, Q\big>(t)\over d \big <Q\big >(t)}=\sum _{i=1}^3\frac{U_i(t,X(t^-),H(t^-))}{\Phi (t,X(t^-),H(t^-))}. \end{aligned}$$

Then we arrive at (71) under \( {\mathbb {P}} \). We next verify \(\theta ^{*}\in {\Psi }\). Below, we use C to denote a generic positive constant, which may be different from line to line. It is easy to have that, for some \(C>0\),

$$\begin{aligned} {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}}\left| \theta ^{*}(t) \right| ^2d\left<Q\right> (t)\right] \le C\sum _{i=1}^3 {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}}\frac{|U_i(t,X(t^-), H(t^-))|^2}{\Phi (t,X(t^-),H(t^-))}dt\right] . \end{aligned}$$
(74)

First, using the Hölder’s inequality, we have on \([0,T\wedge {\tau }_{N+1}]\) that, \( {\mathbb {P}} \)-a.s.

$$\begin{aligned} \frac{|U_1(t,X(t^-),H(t^-))|^2}{\Phi (t,X(t^-),H(t^-))}&\le \frac{\left| \Upsilon (t,X(t^-),H(t^-))\right| ^2\left| D_xg(t,X(t^-),H(t^-))^{\top } \sigma (X(t^-))\right| ^2}{\left| \Upsilon (t,X(t^-),H(t^-))\right| ^2}\\&=\left| D_xg(t,X(t^-),H(t^-))^{\top } \sigma (X(t^-))\right| ^2. \end{aligned}$$

Using Theorem 3.5 and the Cauchy’s inequality, there exists a constant \(C>0\) such that

$$\begin{aligned} \frac{|U_2(t,x,z)|^2}{\Phi (t,x,z)}&\le C\frac{\big |\sum _{j=1}^{N+1}\Psi _j(t,x,z)x_j(1-z_j)\big |^2}{\sum _{j=1}^{N+1}\big |\Psi _j(t,x,z)\big |^2x_j(1-z_j)}\le C\left( \sum _{j=1}^{N+1}x_j\right) . \end{aligned}$$

Finally, it holds from (73) that

$$\begin{aligned} \Phi (t,x,z)\ge \sum _{j=1}^{N+1}\big |\Psi _j(t,x,z)\big |^2x_j\ge \big |\Psi _{N+1}(t,x,z)\big |^2x_{N+1}. \end{aligned}$$

Then, it follows from Proposition 2.4 that, on \(t\in [0,T\wedge \tau _{N+1}]\), there exists a constant \(C>0\) such that

$$\begin{aligned} \frac{|U_3(t,x,z)|^2}{\Phi (t,x,z)}&\le C\frac{\big |\Psi _{N+1}(t,x,z)x_{N+1}\big |^2}{\big |\Psi _{N+1}(t,x,z)\big |^2x_{N+1}}\le Cx_{N+1}. \end{aligned}$$

By applying (74), we deduce the existence of a constant \(C>0\) such that

$$\begin{aligned} {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}}\left| \theta ^{*}(t) \right| ^2d\left<Q\right>(t)\right]&\le C + C {\mathbb {E}} \left[ \int _0^{T}\left| D_xg(t,X(t),H(t))^{\top } \sigma (X(t))\right| ^2dt\right] \nonumber \\&\quad +C\left\{ \sum _{j=1}^{N+1} {\mathbb {E}} \left[ \int _0^TX_j(t)dt\right] \right\} . \end{aligned}$$
(75)

It follows from Lemma 3.8 that there exists a constant \(C>0\) such that

$$\begin{aligned} {\mathbb {E}} \left[ \int _0^T\left| D_xg(t,X(t),H(t))^{\top } \sigma (X(t))\right| ^2dt\right]&\le C\left\{ 1 + \sum _{j=1}^{N+1} {\mathbb {E}} \left[ \int _0^T X_{j}^2(t)dt\right] \right\} . \end{aligned}$$

Thus, the estimate (75) implies that there exists a constant \(C>0\) such that

$$\begin{aligned} {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}}\left| \theta ^{*}(t)\right| ^2d \left<Q\right>(t)\right]&\le C\left\{ 1 + \sum _{j=1}^{N+1} {\mathbb {E}} \left[ \int _0^TX_j^2(t)dt\right] \right\} . \end{aligned}$$
(76)

We next prove \( {\mathbb {E}} [( \int _0^{T\wedge \tau _{N+1}} |\theta ^{*}(t)| dB(t)) ^2] < \infty \), where

$$\begin{aligned} dB(t)&=\Upsilon (t,X(t),H(t))\widetilde{\theta }(X(t),H(t))dt\\&\quad + \sum _{j=1}^{N+1}\Psi _j(t,X(t),H(t))\vartheta _j(X(t),H(t))X_j(t)dt. \end{aligned}$$

Assumption (A3) yields that for some \(C>0\),

$$\begin{aligned}&{\mathbb {E}} \left[ \left( \int _0^{T\wedge \tau _{N+1}} |\theta ^{*}(t)| dB(t)\right) ^2\right] \\&\quad \le C {\mathbb {E}} \left[ \left| \int _0^{T\wedge \tau _{N+1}}\sum _{i=1}^3\frac{U_i(t,X(t),H(t))}{\Phi (t,X(t),H(t))}\Upsilon (t,X(t),H(t))dt\right| ^2\right] \\&\qquad +C {\mathbb {E}} \left[ \left| \int _0^{T\wedge \tau _{N+1}}\sum _{i=1}^3\frac{U_i(t,X(t), H(t))}{\Phi (t,X(t),H(t))}\right. \right. \\&\qquad \times \left. \left. \left( \sum _{j=1}^{N+1}\Psi _j(t,X(t),H(t))\vartheta _j(X(t),H(t))X_j(t)\right) dt \right| ^2\right] . \end{aligned}$$

First of all, for some \(C>0\),

$$\begin{aligned}&{\mathbb {E}} \left[ \left| \int _0^{T\wedge \tau _{N+1}}\sum _{i=1}^3\frac{U_i(t,X(t),H(t))}{\Phi (t,X(t),H(t))}\Upsilon (t,X(t),H(t))dt\right| ^2\right] \\&\quad \le C {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}}\sum _{i=1}^3 \frac{|U_i(t,X(t),H(t))|^2}{\Phi (t,X(t),H(t))}\frac{|\Upsilon (t,X(t),H(t))|^2}{ \Phi (t,X(t),H(t))}dt\right] \\&\quad \le C\sum _{i=1}^3 {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}}\frac{|U_i(t,X(t),H(t))|^2}{\Phi (t,X(t),H(t))}dt\right] \le C\left\{ 1 + \sum _{j=1}^{N+1} {\mathbb {E}} \left[ \int _0^TX_j^2(t)dt\right] \right\} , \end{aligned}$$

and also by Assumption (A3),

$$\begin{aligned}&{\mathbb {E}} \left[ \left| \int _0^{T\wedge \tau _{N+1}}\sum _{i=1}^3\frac{U_i(t,X(t),H(t))}{\Phi (t,X(t),H(t))} \left( \sum _{j=1}^{N+1}\Psi _j(t,X(t),H(t))\vartheta _j(X(t),H(t))X_j(t)\right) dt \right| ^2\right] \\&\quad \le C\sum _{i=1}^3\\&\qquad {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}}\frac{|U_i(t,X(t),H(t)) |^2}{\Phi (t,X(t),H(t))} \frac{\sum _{j=1}^{N+1}\Psi _j^2(t,X(t),H(t))(\vartheta _j(X(t),H(t))X_j(t))X_j(t)}{\Phi (t,X(t),H(t))}dt\right] \\&\quad \le C\sum _{i=1}^3\\&\qquad {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}} \frac{|U_i(t,X(t),H(t))|^2}{\Phi (t,X(t),H(t))} \left( \sum _{j=1}^{N+1}\frac{X_j(t)}{X_j(t)(1+{\hat{\lambda }}(t,X(t),H(t)) \Psi _j(t,X(t),H(t)))}\right) dt\right] \\&\quad \le C\sum _{i=1}^3 {\mathbb {E}} \left[ \int _0^{T\wedge \tau _{N+1}} \frac{|U_i(t,X(t),H(t))|^2}{\Phi (t,X(t),H(t))} \left( \sum _{j=1}^{N+1}\delta _j^{-1}\right) dt\right] \\&\quad \le C\left\{ 1 + \sum _{j=1}^{N+1} {\mathbb {E}} \left[ \int _0^TX_j^2(t)dt\right] \right\} . \end{aligned}$$

We hence have that

$$\begin{aligned} {\mathbb {E}} \left[ \left( \int _0^{T\wedge \tau _{N+1}} |\theta ^{*}(t)| dB(t)\right) ^2\right]&\le C\left\{ 1 + \sum _{j=1}^{N+1} {\mathbb {E}} \left[ \int _0^TX_j^2(t)dt\right] \right\} . \end{aligned}$$
(77)

From (76) and (77), it suffices to estimate \(\sum _{j=1}^{N+1} {\mathbb {E}} [\int _0^TX_j^2(t)dt]<+\infty \). Recall the default intensity process given by (4) under the actual probability measure \( {\mathbb {P}} \). Using Itô’s formula, for \(j=1,\ldots ,N+1\) and \(t\in [0,T]\),

$$\begin{aligned} X_j^2(t)&= X_j^2(0) + 2\int _0^t X_j(s)\mu _j({ X(s)})ds +2\sum _{k=1}^K\int _0^t\sigma _{jk}({ X(s)})X_j(s)d W_k(s)\\&\quad + \sum _{k=1}^K\int _0^t\sigma _{jk}^2({ X(s)})ds +\sum _{l=1}^{N+1}\int _0^t\left[ \left( X_l(s^-)+w_{jl}\right) ^2-X_l^2(s^-)\right] dH_l(s). \end{aligned}$$

Using the linear growth condition satisfied by \((\mu ,\sigma )\) in Assumption (A1), there exists a constant \(C>0\) such that for \(j=1,\ldots ,N+1\) and \(t\in [0,T]\),

$$\begin{aligned} {\mathbb {E}} \left[ X_j^2(t)\right]&\le {\mathbb {E}} \left[ X_j^2(0)\right] +C + C \int _0^t {\mathbb {E}} \left[ X_j^2(s)\right] ds+{ C\sum _{j=1}^{N+1}\int _0^t {\mathbb {E}} \left[ X_j^2(s)\right] ds }\\&\quad +\sum _{l=1}^{N+1}\int _0^t {\mathbb {E}} \left[ \left( w_{jl}^2+2w_{jl}X_l(s)\right) X_l(s)\right] ds. \end{aligned}$$

For \(j=1,\ldots ,N+1\) and \(t\in [0,T]\), this leads that

$$\begin{aligned} \sum _{j=1}^{N+1} {\mathbb {E}} \left[ X_j^2(t)\right]&\le \sum _{j=1}^{N+1} {\mathbb {E}} \left[ X_j^2(0)\right] +C(N+1)+ { C(N+2)} \sum _{j=1}^{N+1}\int _0^t {\mathbb {E}} \left[ X_j^2(s)\right] ds\\&\quad +C\sum _{l=1}^{N+1}\int _0^t {\mathbb {E}} \left[ X_l^2(s)\right] ds + Ct. \end{aligned}$$

The Gronwall’s lemma implies that for all \(t\in [0,T]\),

$$\begin{aligned} \sum _{j=1}^{N+1} {\mathbb {E}} \left[ X_j^2(t)\right]&\le \left\{ C(T+N+1)+\sum _{j=1}^{N+1} {\mathbb {E}} \left[ X_j^2(0)\right] \right\} e^{C(N+2)T}. \end{aligned}$$

The initial data \(X_j(0)=\chi _j>0\) is square integrable for \(j=1,\ldots ,N+1\), this yields that

$$\begin{aligned} \sum _{j=1}^{N+1}\int _0^T {\mathbb {E}} \left[ X_j^2(t)\right] dt&\le \left\{ C(T+N+1)+\sum _{j=1}^{N+1} {\mathbb {E}} \left[ \chi _j^2\right] \right\} Te^{C(N+2)T}<+\infty . \end{aligned}$$
(78)

Thus we proved the validity of (50) in Definition 3.1 using (76) and (77). This completes the proof of the theorem. \(\square \)

4 Applications

We specialize the locally risk-minimizing strategy \(\theta ^{*} \in \Psi \) in the CDS contract referencing the counterparty “\(N+1\)” obtained in Theorem 3.9 to the case when the underlying traded portfolio consists of credit default swaps, risky bonds, or of a first-to-default claim. Recall the function \(F_i(t,x,z)\) satisfying the recursive system of the backward Cauchy problems (33), in which \(\alpha =(1,1,1)\) for \(i=1,\ldots ,{\bar{N}}\) and g(txz) satisfies the recursive system (59). We here take the risk premium \((\widetilde{\theta },\vartheta )\equiv 0\) for convenience.

4.1 CDS Portfolio

In view of Definition 2.3, The CDS portfolio implies that \({\bar{N}}=N\) and for \(i=1,\ldots ,N+1\),

$$\begin{aligned} \xi _i=0,\quad a_i(t)=-\varepsilon _i,\quad Z_i(t)=L_i(t),\quad K_i(t)=H_i(t). \end{aligned}$$

For \(i=1,\ldots ,N\), the recursive system (33) reduces to the Cauchy system (37), i.e., on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned}&\left( \frac{\partial }{\partial t} + {{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) F_{i}^{\mathrm{cds}}(t,x,z)-(1-z_i)\varepsilon _i-\sum _{j\ne i}z_i[L_i(z^j)-L_i(z)](1-z_j)x_j= 0 \end{aligned}$$

with \(F_{i}^{\mathrm{cds}}(T,x,z)=L_i(z)z_i\). On \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), the Cauchy system (59) becomes

$$\begin{aligned} 0&=\left( \frac{\partial }{\partial t}+{{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) g^{\mathrm{cds}}(t,x,z)+L_{N+1}(z^{N+1})\\&\quad \times \left\{ \sum _{i=1}^{N} b_i(1-z_i)F_{i}^{\mathrm{cds}}(t,x+w_{N+1},z^{N+1})\right\} _+(1-z_{N+1})x_{N+1}, \end{aligned}$$

and \(g^{\mathrm{cds}}(T,x,z)=0\). The unique risk-minimizing strategy is given by

$$\begin{aligned} \theta _{\mathrm{cds}}^{*}(t)&=\sum _{i=1}^3\frac{U_i^{\mathrm{cds}}(t,X(t^-),H(t^-))}{\Phi (t,X(t^-),H(t^-))},\qquad t\in [0,T\wedge {\tau }_{N+1}]. \end{aligned}$$
(79)

For \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), the functions

$$\begin{aligned} U_1^{\mathrm{cds}}(t,x,z)&:=\big <D_{x}g^{\mathrm{cds}}(t,x,z)^{\top }\sigma (x),V_{N+1}^{\mathrm{cds}}(t,x,z)^{\top }\sigma (x)\big >_d;\nonumber \\ U_2^{\mathrm{cds}}(t,x,z)&:=\sum _{j=1}^{N+1}\left[ g^{\mathrm{cds}}(t,x+w_j,z^j)-g^{\mathrm{cds}}(t,x,z)\right] \\&\quad \times \big \{G_{N+1,j}^{\mathrm{cds}}(t,x,z)-z_{N+1}[L_{N+1}(z^j)-L_{N+1}(z)]\big \}x_j(1-z_j);\nonumber \\ U_3^{\mathrm{cds}}(t,x,z)&:=L_{N+1}(z^{N+1})\left\{ \sum _{i=1}^{N} b_i(1-z_i)F_i^{\mathrm{cds}}(t,x+w_{N+1},z^{N+1})\right\} _+ \nonumber \\&\quad \times G_{N+1,N+1}^{\mathrm{cds}}(t,x,z)x_{N+1}.\nonumber \end{aligned}$$
(80)

Consider a portfolio consisting of a single name CDS, that is \(N=1\), traded against the risky counterparty “2” of the investor. In this case, we obtain closed-form solutions for the two types of recursive Cauchy systems. Using these closed-form solutions, one can derive the risk-minimizing strategy \(\theta _{\mathrm{cds}}^{*}(t)\) using (79). We distinguish the following cases:

  • \(z=(1,1)\). We have \(F_i^{\mathrm{cds}}(t,x,(1,1))=L_i((1,1))\) for \(i=1,2\) and \(g^{\mathrm{cds}}(t,x,(1,1))=0\).

  • \(z=(1,0)\). We have \(g^{\mathrm{cds}}(t,x,(1,0))=0\) and

    $$\begin{aligned} F_1^{\mathrm{cds}}(t,x,(1,0))&=L_1((1,0)) {\mathbb {E}} \left[ e^{-\int _t^T{ \tilde{X}}_2^{(t,x)}(s)ds}\right] \\&\quad +L_1((1,0)) {\mathbb {E}} \left[ \int _t^T{\tilde{X}}_2^{(t,x)}(s)e^{-\int _t^s{ \tilde{X}}_2^{(t,x)}(u)du}ds\right] ;\\ F_2^{\mathrm{cds}}(t,x,(1,0))&= {\mathbb {E}} \left[ \int _t^T\big \{L_2((1,1)){ \tilde{X}}_2^{(t,x)}(s)-\varepsilon _2\big \}e^{-\int _t^s{ \tilde{X}}_2^{(t,x)}(u)du}ds\right] . \end{aligned}$$
  • \(z=(0,1)\). We have \(g^{\mathrm{cds}}(t,x,(0,1))=0\) and

    $$\begin{aligned} F_1^{\mathrm{cds}}(t,x,(0,1))&= {\mathbb {E}} \left[ \int _t^T\big \{L_1((1,1)){\tilde{X}}_1^{(t,x)} (s)-\varepsilon _1\big \}e^{-\int _t^s{\tilde{X}}_1^{(t,x)}(u)du}ds\right] ;\\ F_2^{\mathrm{cds}}(t,x,(0,1))&=L_2((0,1)) {\mathbb {E}} \left[ e^{-\int _t^T{\tilde{X}}_1^{ (t,x)}(s)ds}\right] \\&\quad +L_2((0,1)) {\mathbb {E}} \left[ \int _t^T{\tilde{X}}_1^{(t,x)}(s)e^{-\int _t^s{\tilde{X}}_1^{ (t,x)}(u)du}ds\right] . \end{aligned}$$
  • \(z=(0,0)\). We have

    $$\begin{aligned} g^{\mathrm{cds}}(t,x,(0,0))&=L_2((0,1)) {\mathbb {E}} \Bigg [\int _t^T{\tilde{X}}_2^{(t,x)} (s)\left\{ b_1F_1^{\mathrm{cds}}(s,{\tilde{X}}^{(t,x)}(s)+w_2,(0,1))\right\} _+\\&\qquad \times e^{-\int _t^s({\tilde{X}}_1^{(t,x)}(u)+ {\tilde{X}}_2^{(t,x)}(u))du}ds\Bigg ], \end{aligned}$$

    and finally \(F_i^{\mathrm{cds}}(t,x,(0,0))\) can be computed by the knowledge of \(F_{i}^{\mathrm{cds}}(t,x,(1,0))\) and \(F_{i}^{\mathrm{cds}}(t,x,(0,1))\), i.e., for \(i=1,2\),

    $$\begin{aligned} F_i^{\mathrm{cds}}(t,x,(0,0))&= {\mathbb {E}} \left[ \int _t^T\left( \sum _{j=1}^2F_{i}^{\mathrm{cds}}(s,{\tilde{X}}^{(t,x)}(s),(0,0)^j){ \tilde{X}}_j^{(t,x)}(s)-\varepsilon _i\right) \right. \\&\quad \left. \times e^{-\int _t^s({ \tilde{X}}_1^{(t,x)}(u)+{\tilde{X}}_2^{(t,x)}(u))du}ds\right] . \end{aligned}$$

4.2 Risky Bonds Portfolio

In view of Definition 2.3, the risky bonds portfolio implies that \({\bar{N}}=N\) and for \(i=1,\ldots ,N\),

$$\begin{aligned} \xi _i=1,\quad a_i(t)=\varepsilon _i,\quad Z_i(t)=1-L_i(t),\quad K_i(t)=H_i(t), \end{aligned}$$

while for the counterpary

$$\begin{aligned} \xi _{N+1}=0,\quad a_{N+1}(t)=-\varepsilon _{N+1},\quad Z_{N+1}(t)=L_{N+1}(t),\quad K_{N+1}(t)=H_{N+1}(t). \end{aligned}$$

Then for \(i=1,\ldots ,N\), the recursive system (33) reduces to the Cauchy system given by, on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned}&\left( \frac{\partial }{\partial t} + {{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) F_{i}^{\mathrm{bond}}(t,x,z)+(1-z_i)\varepsilon _i+\sum _{j\ne i}z_i[L_i(z^j)-L_i(z)](1-z_j)x_j= 0 \end{aligned}$$
(81)

with \(F_{i}^{\mathrm{bond}}(T,x,z)=(1-z_i)+(1-L_i(z))z_i\). The Cauchy system (59) is reduced to, on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned} 0&=\left( \frac{\partial }{\partial t}+{{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) g^{\mathrm{bond}}(t,x,z)+L_{N+1}(z^{N+1}) \\&\quad \times \left\{ \sum _{i=1}^{N} b_i(1-z_i)F_{i}^{\mathrm{bond}}(t,x+w_{N+1},z^{N+1})\right\} _+(1-z_{N+1})x_{N+1} \end{aligned}$$

and \(g^{\mathrm{bond}}(T,x,z)=0\). The unique risk-minimizing strategy on risky bonds portfolio is given by

$$\begin{aligned} \theta _{\mathrm{bond}}^{*}(t)&=\sum _{i=1}^3\frac{U_i^{\mathrm{bond}}(t,X(t^-),H(t^-))}{\Phi (t,X(t^-),H(t^-))},\qquad t\in [0,T\wedge {\tau }_{N+1}]. \end{aligned}$$
(82)

For \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), the functions

$$\begin{aligned} U_1^{\mathrm{bond}}(t,x,z)&:=\big <D_{x}g^{\mathrm{bond}}(t,x,z)^{\top }\sigma (x),V_{N+1}^{\mathrm{cds}}(t,x,z)^{\top }\sigma (x)\big >_d;\nonumber \\ U_2^{\mathrm{bond}}(t,x,z)&:=\sum _{j=1}^{N+1}\left[ g^{\mathrm{bond}}(t,x+w_j,z^j)-g^{\mathrm{bond}}(t,x,z)\right] \nonumber \\&\quad \times \big \{G_{N+1,j}^{\mathrm{cds}}(t,x,z)-z_{N+1}[L_{N+1}(z^j)-L_{N+1}(z)]\big \}x_j(1-z_j);\nonumber \\ U_3^{\mathrm{bond}}(t,x,z)&:=L_{N+1}(z^{N+1})\left\{ \sum _{i=1}^{N} b_i(1-z_i)F_i^{\mathrm{bond}}(t,x+w_{N+1},z^{N+1})\right\} _+ \nonumber \\&\quad \times G_{N+1,N+1}^{\mathrm{cds}}(t,x,z)x_{N+1}. \end{aligned}$$
(83)

Consider a portfolio consisting of a single name risky bond, that is \(N=1\), traded against the risky counterparty “2” of the investor. Again, the two types of recursive Cauchy systems admits closed-form solutions, and thus allows us to derive the risk-minimizing strategy \(\theta _{\mathrm{bond}}^{*}(t)\) using (82). We consider the following cases:

  • \(z=(1,1)\). We have \(F_i^{\mathrm{bond}}(t,x,(1,1))=1-L_i((1,1))\) for \(i=1,2\) and \(g^{\mathrm{bond}}(t,x,(1,1))=0\).

  • \(z=(1,0)\). We have \(g^{\mathrm{bond}}(t,x,(1,0))=0\) and

    $$\begin{aligned} F_1^{\mathrm{bond}}(t,x,(1,0))&=(1-L_1((1,0))) {\mathbb {E}} \left[ e^{-\int _t^T{ \tilde{X}}_2^{(t,x)}(s)ds}\right] \\&\quad +(1-L_1((1,0))) {\mathbb {E}} \left[ \int _t^T{\tilde{X}}_2^{(t,x)}(s)e^{-\int _t^s{ \tilde{X}}_2^{(t,x)}(u)du}ds\right] . \end{aligned}$$
  • \(z=(0,1)\). We have \(g^{\mathrm{bond}}(t,x,(0,1))=0\) and

    $$\begin{aligned} F_1^{\mathrm{bond}}(t,x,(0,1))&= {\mathbb {E}} \left[ e^{-\int _t^T{ \tilde{X}}_1^{(t,x)}(u)du}\right] \\&\quad + {\mathbb {E}} \left[ \int _t^T\big \{(1-L_1((1,1))){ \tilde{X}}_1^{(t,x)}(s) +\varepsilon _1\big \}e^{-\int _t^s{\tilde{X}}_1^{(t,x)}(u)du}ds\right] . \end{aligned}$$
  • \(z=(0,0)\). We have

    $$\begin{aligned} g^{\mathrm{bond}}(t,x,(0,0))&=L_2((0,1)) {\mathbb {E}} \Bigg [\int _t^T{ \tilde{X}}_2^{(t,x)}(s)\left\{ b_1F_1^{\mathrm{bond}}(s,{\tilde{X}}^{(t,x)}(s)+ w_2,(0,1))\right\} _+\\&\qquad \times e^{-\int _t^s({\tilde{X}}_1^{(t,x)}(u)+{ \tilde{X}}_2^{(t,x)}(u))du}ds\Bigg ], \end{aligned}$$

    and finally \(F_i^{\mathrm{bond}}(t,x,(0,0))\) can be computed by the knowledge of \(F_{i}^{\mathrm{bond}}(t,x,(1,0))\) and \(F_{i}^{\mathrm{bond}}(t,x,(0,1))\), i.e., for \(i=1,2\),

    $$\begin{aligned}&F_1^{\mathrm{bond}}(t,x,(0,0))\\&\quad = {\mathbb {E}} \left[ e^{-\int _t^T({\tilde{X}}_1^{(t,x)}(u)+ {\tilde{X}}_2^{(t,x)}(u))du}ds\right] \\&\qquad \quad + {\mathbb {E}} \left[ \int _t^T\left( \sum _{j=1}^2 F_{1}^{\mathrm{bond}}(s, {\tilde{X}}^{(t,x)}(s),(0,0)^j){\tilde{X}}_j^{(t,x)}(s)+ \varepsilon _1\right) \right. \\&\qquad \quad \left. \times e^{-\int _t^s({\tilde{X}}_1^{(t,x)}(u)+ {\tilde{X}}_2^{(t,x)}(u))du}ds\phantom {\sum _{j=1}^2}\right] . \end{aligned}$$

4.3 First-to-Default Claim

In view of Definition 2.3, the first-to default claim implies that \({\bar{N}}=1\) and for \(i=1,2\),

$$\begin{aligned}&\xi _1=0,\quad a_1(t)=\varepsilon ,\quad Z_1(t)=\sum _{i=1}^N L_i(t)H_i(t),\quad K_1(t)=1-\prod _{i=1}^N(1-H_i(t));\\&\xi _2=0,\quad a_2(t)=-\varepsilon _{N+1},\quad Z_2(t)=L_{N+1}(t),\quad K_2(t)=H_{N+1}(t). \end{aligned}$$

The recursive system (33) reduces to the Cauchy system given by, on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned}&\left( \frac{\partial }{\partial t} + {{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) F_{1}^{\mathrm{ftd}}(t,x,z)+\varepsilon \prod _{i=1}^N(1-z_i)\nonumber \\&\quad -\sum _{j=1}^{N+1}K_1(z) [Z_1(z^j)-Z_1(z)](1-z_j)x_j= 0 \end{aligned}$$
(84)

where

$$\begin{aligned}&\sum _{j=1}^{N+1}K_1(z)[Z_1(z^j)-Z_1(z)](1-z_j)x_j\nonumber \\&\quad =\left( 1-\prod _{i=1}^N(1-z_i)\right) \sum _{j=1}^{N+1}(1-z_j)x_j \sum _{i=1}^N\big [L_i(z^j)z_i\mathbf{1}_{j\ne i}+L_i(z^i)(1-z_i)-L_i(z)z_i\big ].\qquad \end{aligned}$$
(85)

The terminal condition is given by

$$\begin{aligned} F_{1}^{\mathrm{ftd}}(T,x,z)=\left( \sum _{i=1}^N L_i(z)z_i\right) \left( 1-\prod _{i=1}^N(1-z_i)\right) . \end{aligned}$$
(86)

The recursive Cauchy system (59) is reduced to, on \((t,x,z)\in [0,T)\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\),

$$\begin{aligned} 0&=\left( \frac{\partial }{\partial t}+{{{\mathcal {A}}}}^{ {\mathbb {Q}} }\right) g^{\mathrm{ftd}}(t,x,z)+L_{N+1}(z^{N+1})\\&\quad \times \left\{ b_1(1-K_1(z^{N+1}))F_{1}^{\mathrm{ftd}}(t,x+w_{N+1},z^{N+1})\right\} _+(1-z_{N+1})x_{N+1}, \end{aligned}$$

and \(g^{\mathrm{ftd}}(T,x,z)=0\). The unique risk-minimizing strategy of the CVA on the first-to-default claim is given by

$$\begin{aligned} \theta _{\mathrm{ftd}}^{*}(t)&=\sum _{i=1}^3\frac{U_i^{\mathrm{ftd}}(t,X(t^-),H(t^-))}{\Phi (t,X(t^-),H(t^-))},\qquad t\in [0,T\wedge {\tau }_{N+1}]. \end{aligned}$$
(87)

For \((t,x,z)\in [0,T]\times \mathbb {R}_+^{N+1}\times {{{\mathcal {S}}}}\), the functions

$$\begin{aligned} U_1^{\mathrm{ftd}}(t,x,z)&:=\big <D_{x}g^{\mathrm{ftd}}(t,x,z)^{\top }\sigma (x),V_{N+1}^{\mathrm{cds}}(t,x,z)^{\top }\sigma (x)\big >_d;\nonumber \\ U_2^{\mathrm{ftd}}(t,x,z)&:=\sum _{j=1}^{N+1}\left[ g^{\mathrm{ftd}}(t,x+w_j,z^j)-g^{\mathrm{ftd}}(t,x,z)\right] \nonumber \\&\quad \times \big \{G_{N+1,j}^{\mathrm{cds}}(t,x,z)-z_{N+1}[L_{N+1}(z^j)-L_{N+1}(z)]\big \}x_j(1-z_j);\nonumber \\ U_3^{\mathrm{ftd}}(t,x,z)&:=L_{N+1}(z^{N+1})\big \{b_1(1-K_1(z))F_1^{\mathrm{ftd}}(t,x+w_{N+1},z^{N+1})\big \}_+ \nonumber \\&\quad \times G_{N+1,N+1}^{\mathrm{cds}}(t,x,z)x_{N+1}. \end{aligned}$$
(88)

Consider a first-to-default claim in a basket of two names, that is \(N=2\), traded against the risky counterparty “3” of the investor. Both types of recursive Cauchy systems can be solved in closed-form, and the risk-minimizing strategy \(\theta _{\mathrm{ftd}}^{*}(t)\) can then be computed using Eq. (87). We have \({\bar{\tau }}_1=\tau _1\wedge \tau _2\) and \({\bar{\tau }}_2=\tau _{3}\). We separately treat the following cases:

  • \(z=(1,1,1)\). We have \(F_1^{\mathrm{ftd}}(t,x,(1,1,1))=L_1((1,1,1))+L_2((1,1,1))\) and \(g^{\mathrm{ftd}}(t,x,(1,1,1))=0\).

  • \(z=(1,1,0)\). We have

    $$\begin{aligned} g^{\mathrm{ftd}}(t,x,(1,1,0))&=L_3((1,1,1))\left( \sum _{i=1}^2L_i((1,1,1)) \right) \{b_1\}_+ \\&\quad \times {\mathbb {E}} \left[ \int _t^T{\tilde{X}}_3^{(t,x)}(s)e^{- \int _t^s{\tilde{X}}_3^{(t,x)}(u)du}\right] , \end{aligned}$$

    and

    $$\begin{aligned} F_1^{\mathrm{ftd}}(t,x,(1,1,0))&=\left( \sum _{i=1}^2L_i((1,1,0)) \right) \left\{ {\mathbb {E}} \left[ e^{-\int _t^T{\tilde{X}}_3^{(t,x)}(s)ds}\right] \right. \\ {}&\left. \quad +\, {\mathbb {E}} \left[ \int _t^T{\tilde{X}}_3^{(t,x)}(s)e^{-\int _t^s{\tilde{X}}_3^{(t,x)} (u)du}\right] \right\} . \end{aligned}$$
  • \(z=(1,0,1)\). We have \(g^{\mathrm{ftd}}(t,x,(1,0,1))=0\) and

    $$\begin{aligned} F_1^{\mathrm{ftd}}(t,x,(1,0,1))&=L_1((1,0,1))\left\{ {\mathbb {E}} \left[ e^{-\int _t^T{ \tilde{X}}_2^{(t,x)}(s)ds}\right] \right. \\&\left. \quad \, +\, {\mathbb {E}} \left[ \int _t^T{\tilde{X}}_2^{(t,x)}(s)e^{-\int _t^s{\tilde{X}}_2^{(t,x)} (u)du}\right] \right\} . \end{aligned}$$
  • \(z=(0,1,1)\). We have \(g^{\mathrm{ftd}}(t,x,(0,1,1))=0\) and

    $$\begin{aligned} F_1^{\mathrm{ftd}}(t,x,(0,1,1))&=L_2((0,1,1))\left\{ {\mathbb {E}} \left[ e^{-\int _t^T {\tilde{X}}_1^{(t,x)}(s)ds}\right] \right. \\&\left. \quad +\, {\mathbb {E}} \left[ \int _t^T{\tilde{X}}_1^{(t,x)}(s)e^{-\int _t^s{\tilde{X}}_1^{(t,x)} (u)du}\right] \right\} . \end{aligned}$$
  • \(z=(1,0,0)\). We have

    $$\begin{aligned}&g^{\mathrm{ftd}}(t,x,(1,0,0))\\&\quad = {\mathbb {E}} \left[ \int _t^T{\tilde{X}}_2^{(t,x)} (s)g^{\mathrm{ftd}}(s,{\tilde{X}}^{(t,x)}(s),(1,1,0))e^{-\int _t^s({ \tilde{X}}_1^{(t,x)}(u)+{\tilde{X}}_2^{(t,x)}(u))du}\right] , \end{aligned}$$

    and

    $$\begin{aligned}&F_1^{\mathrm{ftd}}(t,x,(1,0,0))=L_1((1,0,0)) {\mathbb {E}} \left[ e^{-\int _t^T({\tilde{X}}_2^{(t,x)}(s)+ {\tilde{X}}_3^{(t,x)}(s))ds}\right] \\&\quad + {\mathbb {E}} \Bigg [\int _t^T\Big \{{\tilde{X}}_2^{(t,x)}(s)\big (F_1^{\mathrm{ftd}}(s, {\tilde{X}}^{(t,x)}(s),(1,1,0))-L_1((1,1,0)) \\&\quad -L_2((1,1,0))+L_1((1,0,0))\big ) \\&\quad +{\tilde{X}}_3^{(t,x)}(s)\big (F_1^{\mathrm{ftd}}(s, {\tilde{X}}^{(t,x)}(s),(1,0,1))-L_1((1,0,1)) \\&\quad -L_2((1,1,0))+L_1((1,0,0)) \big )\Big \} \\&\qquad \qquad \times e^{-\int _t^s({\tilde{X}}_2^{(t,x)}(u)+{\tilde{X}}_3^{(t,x)} (u))du}\Bigg ]. \end{aligned}$$
  • \(z=(0,1,0)\). We have

    $$\begin{aligned}&g^{\mathrm{ftd}}(t,x,(0,1,0)) \\&\quad = {\mathbb {E}} \left[ \int _t^T{\tilde{X}}_1^{(t,x)}(s)g^{\mathrm{ftd}} (s,{\tilde{X}}^{(t,x)}(s),(1,1,0))e^{-\int _t^s({\tilde{X}}_1^{(t,x)}(u)+ {\tilde{X}}_3^{(t,x)}(u))du}\right] , \end{aligned}$$

    and

    $$\begin{aligned}&F_1^{\mathrm{ftd}}(t,x,(0,1,0))=L_2((0,1,0)) {\mathbb {E}} \left[ e^{-\int _t^T( {\tilde{X}}_1^{(t,x)}(s)+{\tilde{X}}_3^{(t,x)}(s))ds}\right] \\&\quad + {\mathbb {E}} \Bigg [\int _t^T\Big \{{\tilde{X}}_1^{(t,x)}(s)\big (F_1^{\mathrm{ftd}} (s,{\tilde{X}}^{(t,x)}(s),(1,1,0)) \\&\quad -L_1((1,1,0))-L_2 ((1,1,0))+L_2((0,1,0))\big ) \\&\quad +{\tilde{X}}_3^{(t,x)}(s)\big (F_1^{\mathrm{ftd}}(s,{\tilde{X}}^{(t,x)}(s), (0,1,1)) \\&\quad -L_1((1,1,0))-L_2((0,1,1))+L_2((0,1,0))\big )\Big \} \\&\qquad \qquad \times e^{-\int _t^s({\tilde{X}}_1^{(t,x)}(u)+{\tilde{X}}_3^{(t,x)}(u))du}\Bigg ]. \end{aligned}$$
  • \(z=(0,0,1)\). We have \(g^{\mathrm{ftd}}(t,x,(0,0,1))=0\) and

    $$\begin{aligned}&F_1^{\mathrm{ftd}}(t,x,(0,0,1))= {\mathbb {E}} \Bigg [\int _t^T\Big \{{\tilde{X}}_1^{(t,x)}(s)F_1^{\mathrm{ftd}}(s,{\tilde{X}}^{(t,x)}(s),(1,0,1)) \\&\qquad +{\tilde{X}}_2^{(t,x)}(s)F_1^{\mathrm{ftd}}(s,{\tilde{X}}^{(t,x)}(s),(0,1,1))\Big \}e^{-\int _t^s({\tilde{X}}_1^{(t,x)} (u)+{\tilde{X}}_2^{(t,x)}(u))du}\Bigg ]. \end{aligned}$$
  • \(z=(0,0,0)\). We have

    $$\begin{aligned}&g^{\mathrm{ftd}}(t,x,(0,0,0))= {\mathbb {E}} \Bigg [\int _t^T\Big \{{\tilde{X}}_1^{(t,x)}(s) g_1^{\mathrm{ftd}}(s,{\tilde{X}}^{(t,x)}(s),(1,0,0)) \\&\quad +{\tilde{X}}_2^{(t,x)}(s) g^{\mathrm{ftd}}(s,{\tilde{X}}^{(t,x)}(s),(0,1,0)) \\&\quad +L_3((0,0,1)){\tilde{X}}_3^{(t,x)}(s)\big \{b_1F_1^{\mathrm{ftd}} (t,x+w_3,(0,0,1))\big \}_+\Big \} \\&\qquad \times e^{-\int _t^s({\tilde{X}}_1^{(t,x)}(u)+ {\tilde{X}}_2^{(t,x)}(u)+{\tilde{X}}_3^{(t,x)}(u))du}\Bigg ], \end{aligned}$$

    and

    $$\begin{aligned}&F_1^{\mathrm{ftd}}(t,x,(0,0,0))= {\mathbb {E}} \Bigg [\int _t^T\Big \{{\tilde{X}}_1^{(t,x)}(s)F_1^{\mathrm{ftd}}(s,{\tilde{X}}^{(t,x)}(s),(1,0,0)) \\&\quad +{\tilde{X}}_2^{(t,x)}(s)F_1^{\mathrm{ftd}}(s,{\tilde{X}}^{(t,x)}(s),(0,1,0)) \\&\quad +{\tilde{X}}_3^{(t,x)}(s)F_1^{\mathrm{ftd}}(s,{\tilde{X}}^{(t,x)}(s),(0,0,1))+\varepsilon \Big \}e^{-\int _t^s ({\tilde{X}}_1^{(t,x)}(u)+{\tilde{X}}_2^{(t,x)}(u)+{\tilde{X}}_3^{(t,x)}(u))du}\Bigg ]. \end{aligned}$$

The probabilistic representation of the above quantities makes it possible to develop efficient Monte-Carlo simulation methods to approximate the risk-minimizing hedging strategy.