1 Introduction

Since the seminal works of Merton [15, 16], portfolio optimization problems have been the subject of considerable investigations. In recent years, the hybrid diffusion models have received a considerable amount of attention from both researchers and practitioners. In particular, the regime-switching model (as a class of hybrid models) is usually proposed to capture the influence on the behavior of the market caused by transitions in the macroeconomic system or the macroscopic readjustment and regulation. Zhang and Zhou [20] study the valuation of stock loan in which the underlying stock price is modeled as a Markov modulated geometric Brownian motion using a two-state hidden Markov chain. Elliott et al. [10] consider the pricing of options under a generalized Markov modulated jump diffusion model. Capponi et al. [8] obtain a Poisson series representation for the arbitrage-free price process of vulnerable contingent claims in a market driven by an underlying continuous-time Markov chain. Apart from the classical Merton’s model of utility maximization on terminal wealth, there has been an increasing consideration of different stochastic control criteria for portfolio management in recent years. Zhou and Yin [21] study the Markowitz’s mean-variance portfolio selection with regime-switching in a continuous time model. Elliott and Siu [9] investigate an optimal portfolio selection problem in a Markov modulated Black–Scholes market when an economic agent faces model uncertainty. Shen and Siu [18] discuss a consumption-portfolio optimization problem in a hidden Markov modulated asset price model with multiple risky assets under the situation that an economic agent only has access to information about the price processes of risky shares. Andruszkiewicz, et al. [1] consider a risk-sensitive investment problem under a jump diffusion regime-switching market model.

The objective of this paper is to consider an analytical framework for the portfolio allocation and risk control of an insurer, which explicitly accounts for the interaction between regime-switching and credit risk. These two sources of risk have been identified as tightly linked in empirical research, see, for example, Campbell and Taksler [6]. For pricing, models accounting for the dependence of default intensities on asset volatilities have been proposed by Carr and Linetsky [5], Carr and Wu [4], and extended to a multi-name context by Mendoza-Arriaga and Linetsky [14]. We propose a model in which switching regimes, capturing the state or modes of the underlying credit market, drive both volatility and default risk of the risky asset price processes. Moreover, the total risk controlled by liabilities of the insurer is driven by the switching regimes and the credit states of the portfolio. Zou and Cadenillas [22] consider an optimal investment and risk control problem with a single default-free asset. The case with multiple default-free assets and regime-switching is extended by Zou and Cadenillas [23]. More recently, Peng and Wang [17] study the optimal investment strategy and risk control for an insurer who has some inside information on the insurance business. Bo and Wang [3] focus on an optimal investment and risk control problem for an insurer under stochastic diffusive factors.

We incorporate the interaction between regime-switching and default contagion risk into the risk control model. Differently from the default-free case, default events have an impact on the distress state of the surviving stocks in the portfolio. Since defaults can occur sequentially, the default intensities of the surviving names are affected by the default events of other stocks in the portfolio. Hence, the HJB system associated with the stochastic control problem is recursive in terms of default states of the portfolio. The depth of the recursion equals the number of stocks in the portfolio. We analyze the HJB equation and the constrained equation satisfied by the optimal strategy of stocks using a backward recursion. The recursive procedure starts from the state in which all stocks are defaulted and regresses toward the state in which all stocks are alive. Since the policy space of our control problem is not assumed to be compact, the main difficulty in the analysis of solutions to this coupled system lies in the general default state and the non-Lipschitz nonlinearities of the system. Andruszkiewicz, et al. [1] deal with a risk-sensitive investment problem in a finite-factor model under a compact policy space. The existence and uniqueness of solutions to their HJB equation can be established by verifying the globally Lipschitz-continuous coefficients. We prove in this paper that the nonlinearities of the coupled system are Lipschitz-continuous only when the variable corresponding to the solution is not close to zero (see Lemma 4.3). This suggests developing a truncation technique such that the truncated nonlinearity in the system is globally Lipschitz-continuous and considering an approximation of the truncated recursive coupled systems. For this purpose, we establish a key comparison result (see Lemma 4.4) for two coupled monotone dynamical systems. We refer the reader to Smith [19] for the definition of monotone dynamical systems. In order to construct the limit of the approximating truncated systems, we prove that the approximating systems admit a uniform (strictly positive) lower bound, and then this limit can be verified to be the unique global solution of our recursive HJB system (see Theorem 4.5).

The rest of the paper is organized as follows. Section 2 introduces the market model with regime-switching and credit risk interaction. Section 3 formulates the dynamic optimization problem for an insurer and derives the recursive HJB system. Section 4 analyzes the (classical) solutions of the recursive HJB system. The optimal investment and risk control strategies are characterized in the same section. A verification theorem is also proved in the same section. Section 5 develops a numerical analysis. Additional technical proofs are provided in the “Appendix”.

2 The model

We consider a financial market consisting of \(n\ge 1\) defaultable stocks and a risk-free money market account. Let \((\Omega ,{\mathcal G},{\mathbb {G}}, \mathbb {P} )\) be a complete filtered probability space, where the global filtration \(\mathbb {G}:=\mathbb {F} \vee {\mathbb {Z}}_1\vee {\mathbb {Z}}_2\) is augmented by all \( \mathbb {P} \)-null sets so as to satisfy the usual conditions. Let \(T>0\) be the finite target horizon. The filtration \(\mathbb {F} :=({\mathcal {F}}_t)_{t\in [0,T]}\), where \(\mathcal {F}_t\) is the sigma-algebra generated by independent multi-dimensional standard Brownian motions denoted by \(W:=(W_j(t);\ j=1,\ldots ,d)_{t\in [0,T]}^{\top }\), \(\bar{W}:=(\bar{W}_j(t);\ j=1,\ldots ,\bar{d})_{t\in [0,T]}^{\top }\) and a regime-switching process \(Y:=(Y(t))_{t\in [0,T]}\) introduced below. Here \(d,\bar{d}\ge 1\) and we use \(\top \) to denote the transpose operator. We next specify the filtrations \(\mathbb {Z}_1\) and \(\mathbb {Z}_2\). The default state is described by an n-dimensional default indicator process \(Z:=(Z_j(t);\ j=1,\ldots ,n)_{t\in [0,T]}\) which takes values on \({{\mathcal {S}}}:=\{0,1\}^n\). For \(j=1,\ldots ,n\), the default time of the j-th stock is given by

$$\begin{aligned} \tau _j := \inf \{t\ge 0;\ Z_j(t)=1\}. \end{aligned}$$
(1)

The filtration \(\mathbb {Z}_1:=({\mathcal {Z}}_{1t})_{t\in [0,T]}\), where the sigma-algebra \({{\mathcal {Z}}}_{1t}:=\bigvee _{j=1}^n{\sigma (Z_j(s);\ s\le t)}\). Hence \(\mathbb {Z}_1\) contains all information about default events until the target horizon T. The filtration \(\mathbb {Z}_2:=(\mathcal{Z}_{2t})_{t\in [0,T]}\) where the sigma-algebra \(\mathcal{Z}_{2t}:=\sigma ((N_{i,z}(s),\ (i,z)\in \{1,\ldots ,m\}\times \mathcal{S});\ s\le t)\). Here \(N_{i,z}:=(N_{i,z}(t))_{t\in [0,T]}\) for \((i,z)\in \{1,\ldots ,m\}\times {{\mathcal {S}}}\) are independent Poisson processes with respective intensities \(\nu (i,z)>0\), which will be used to model the risk control process of an insurer introduced in (6) and (7) below. Our model consists of four blocks: the regime-switching process, the credit model, the price processes and the risk process for an insurer. Each of these blocks will be detailed in the sequel.

Regime-switching process.   The regime-switching process Y here is described as a continuous-time (conservative) Markov chain with state space \(\{1,\ldots ,m\}\) where \(m\ge 1\), which is independent of the multi-dimensional Brownian motions \((W,\bar{W})\). The generator of the Markov chain Y is given by an \(m\times m\)-dimensional matrix \(Q:=(q_{ij})_{m\times m}\). This yields that \(q_{ii}\le 0\) for \(i\in \{1,\ldots ,m\}\), \(q_{ij}\ge 0\) for \(i\ne j\), and \(\sum _{j=1}^{m}q_{ij}=0\) for \(i\in \{1,\ldots ,m\}\) (i.e., \(\sum _{j\ne i}q_{ij}=-q_{ii}\) for \(i\in \{1,\ldots ,m\}\)).

Credit risk model.   The joint process (YZ) of the regime-switching process and the default indicator process is a joint Markov process with state space \(\{1,\ldots ,m\}\times \mathcal {S}\). Moreover, at any time \(t\in [0,T]\), the default indicator process transits from a state \(Z(t) :=(Z_1(t),\ldots ,Z_{j-1}(t),Z_j(t),Z_{j+1}(t),\ldots ,Z_n(t))\) in which the stock j is alive (\(Z_j(t)=0\)) to the neighbour state \({Z}^j(t):=(Z_1(t),\ldots ,Z_{j-1}(t),1-Z_j(t),Z_{j+1}(t),\ldots ,Z_n(t))\) in which the stock j has defaulted at a stochastic rate \({\mathbb {1}}_{Z_j(t)=0}h_{j}(Y(t),Z(t))\). Here \(h_j(i,z)>0\) for all \((i,z)\in \{1,\ldots ,m\}\times {{\mathcal {S}}}\). We assume that Y(t), \(Z_1(t),\ldots ,Z_n(t)\) will not jump simultaneously almost surely. Consequently, the default intensity of the j-th stock may change either if any other stock in the portfolio defaults (contagion effect), or if there are regime-switchings (market risk effect). Our default model thus belongs to the rich class of interacting intensity models, introduced by Frey and Backhaus [11] (see also the interacting default intensity model with diffusive factors introduced in Birge, et al. [2]). Hereafter, we set \(h(i,z):=(h_j(i,z);\ j=1,\ldots ,n)^{\top }\) for \((i,z)\in \{1,\ldots ,m\}\times {{\mathcal {S}}}\).

Price processes   The vector of the price processes of the n defaultable stocks is denoted by \(\tilde{S}:=(\tilde{S}_j(t);\ j=1,\ldots ,n)_{t\in [0,T]}^{\top }\). For \(t\in [0,T]\), the price process of the j-th defaultable stock is given by

$$\begin{aligned} \tilde{S}_j(t)=(1-Z_j(t))S_j(t), \qquad \; j = 1,\ldots ,n. \end{aligned}$$
(2)

In other words, the price of the j-th stock is given by the predefault price \(S_j(t)\) up to \({\tau _j}-\), and jumps to 0 at time \({\tau _j}\), where it remains forever afterwards. The dynamics of the pre-default price process \(S:=(S_j(t);\ j=1,\ldots ,n)_{t\in [0,T]}^{\top }\) of the n defaultable stocks is given by

$$\begin{aligned} dS(t) = {diag}(S(t)) [(\mu (Y(t))+h(Y(t),Z(t))) dt + \sigma (Y(t))dW(t)]. \end{aligned}$$
(3)

Above, diag(S(t)) is the diagonal \(n\times n\)-dimensional matrix with diagonal elements \(S_j(t)\) for \(j=1,\ldots ,n\). For each \(i\in \{1,\ldots ,m\}\), the vector \(\mu (i)\) is \(\mathbb {R}^n\)-valued, and \(\sigma (i)\) is an \(\mathbb {R}^{n\times d}\)-valued matrix such that \(\sigma (i)\sigma (i)^{\top }\) is positive definite. Equation (3) indicates that the investor holding the credit sensitive security is compensated for the incurred default risk at the premium rate h(Y(t), Z(t)). Using Eqs. (2), (3) and integration by parts, the dynamics of the defaultable stock prices can be given by

$$\begin{aligned} d\tilde{S}(t) = {diag}(\tilde{S}(t)) [\mu (Y(t))dt + \sigma (Y(t))dW(t)-dM(t)], \end{aligned}$$
(4)

where \(M:=(M_j(t);\ j=1,\ldots ,n)_{t\in [0,T]}^{\top }\) is a pure jump \( \mathbb {P} \)-martingale given by

$$\begin{aligned} M_j(t)&:= Z_j(t) - \int _0^{t\wedge \tau _j}h_j(Y(s),Z(s))ds,\ \ \ \ \ \ t\in [0,T]. \end{aligned}$$
(5)

Risk control process   For the risk control process, denote by \(\eta (t)\) the \(\mathbb {G}\)-predictable total outstanding number of policies (liabilities) at time t. The risk model for claims is described as an extensive Cramér-Lundberg model, in which the claim (risk) per policy \(C=(C(t))_{t\in [0,T]}\) is given by the following dynamics

$$\begin{aligned} dC(t)=c(Y(t))dt+\phi (Y(t))dW(t)+\bar{\phi }(Y(t))d\bar{W}(t)+g(Y(t-))dN(t), \end{aligned}$$
(6)

where, for each \(i=1,\ldots ,m\), the volatilities \(\phi (i)\) and \(\bar{\phi }(i)\) are respectively d-dimensional and \(\bar{d}\)-dimensional nonzero row vectors, the drift \(c(i)\in \mathbb {R}\), and the positive jump size (claim size) \(g(i)\in \mathbb {R}_+:=(0,\infty )\). Here, the jump process \(N:=(N(t))_{t\in [0,T]}\) is a Markov modulated Poisson process with positive intensity process given by \((\nu (Y(t),Z(t)))_{t\in [0,T]}\). For \(t\in [0,T]\), the process N(t) represents the number of claims occurring in time interval [0, t]. More precisely, we can rewrite N(t) as

$$\begin{aligned} N(t)=\sum _{(i,z)\in \{1,\ldots ,m\}\times \mathcal{S}}\int _0^t{\mathbb {1}}_{Y(s-)=i,Z(s-)=z}dN_{i,z}(s). \end{aligned}$$
(7)

We recall that for \((i,z)\in \{1,\ldots ,m\}\times {{\mathcal {S}}}\), \(N_{i,z}=(N_{i,z}(t))_{t\in [0,T]}\) are independent Poisson processes with respective intensities \(\nu (i,z)\), and moreover they are also independent of the random processes \((W,\bar{W},Y)\). Then, we have that, for \(t\in [0,T]\),

$$\begin{aligned} \tilde{N}(t)&:=N(t) - \sum _{(i,z)\in \{1,\ldots ,m\}\times \mathcal{S}}\int _0^t{\mathbb {1}}_{Y(s)=i,Z(s)=z}\nu (i,z)ds=N(t)-\int _0^t\nu (Y(s),Z(s))ds \end{aligned}$$
(8)

is a \( \mathbb {P} \)-martingale. An example of insurance product whose arrival intensity of claims depends on the default states of stocks and the regimes of the economy is so-called Trade Credit Insurance (see, e.g., Jones [13]). Trade Credit Insurance protects a supplier from the risk of buyer’s non-payment. The supplier delivers unpaid goods or services to the buyer and allows a deferred payment from the buyer. To ensure the payment, the supplier purchases trade credit insurance products. In exchange for the premia, the insurer covers the payment if the buyer defaults. This implies that claims arrive when the buyer fails to pay the suppliers due to credit risk such as protracted default, insolvency, and bankruptcy, etc. Consequently, the probability of buyer’s default is correlated with the default states of stocks and the regimes of the economy.

The diffusive term \(c(Y(t))dt+\phi (Y(t))dW(t)+\bar{\phi }(Y(t))d\bar{W}(t)\) in (6) models the fluctuations in the value of the claim per policy. From Eqs. (4) and (6), it can be seen that apart from the risk (pure jump) model for the claims, the claim (risk) per policy C(t) is also driven by an idiosyncratic source of risk \(\bar{W}\) and has the common source of risk W with the defaultable stock prices \(\tilde{S}(t)\). Thus, by Zou and Cadenillas [22], the total risk of the insurer in our case can be described as

$$\begin{aligned} dR^\eta (t)=\eta (t)dC(t). \end{aligned}$$
(9)

The forthcoming section will formulate the dynamic optimization problem for an insurer and formally derive the recursive HJB system using the dynamic programming principle.

3 Dynamic optimization for an insurer

In this section, we formulate the optimal investment and risk control problem for an insurer and derive the recursive HJB system accordingly. For this reason, for \(j=1,\ldots ,n\), let \(\tilde{\pi }_j(t)\) be the \(\mathbb {G}\)-predictable fraction strategy for the j-th defaultable stock at time t. We assume that the insurer will not invest in the stock once it has defaulted. Then \(1-\tilde{\pi }(t)^{\top }e_n^{\top }\) is the fraction strategy for the risk-free money market account at time t. The dynamics of the money market account B(t) is given by \(dB(t)= r(Y(t))B(t)dt\), where the regime-switching interest rate \(r(i)>0\) for \(i=1,\ldots ,m\). Here \(\tilde{\pi }(t):=(\tilde{\pi }_j(t);\ j=1,\ldots ,n)^{\top }\) and \(e_n\) denotes the n-dimensional row vector whose all entities are ones.

We assume that the average premium per liability for the insurer is p(Y(t), Z(t)) (i.e., it depends not only on the macro-economy, but also on the default state of the portfolio), then the price of the insurance risk satisfies the dynamics \(dP(t)=p(Y(t),Z(t))dt-dC(t)\). The insurer is in fact able to trade this risk process by selling insurance products and ceding part or all of his/her business to reinsurers. Recall that \(\eta (t)\) stands for the \(\mathbb {G}\)-predictable total outstanding number of policies (liabilities) at time t introduced in Sect. 2. Let \(X^{\tilde{\pi },\tilde{l}}(t)\) represent the time-t wealth level corresponding to the strategy \((\tilde{\pi },\tilde{l})\), then the self-financing condition yields that

$$\begin{aligned} \frac{dX^{\tilde{\pi },\tilde{l}}(t)}{X^{\tilde{\pi },\tilde{l}}(t-)}&=\tilde{\pi }(t)^{\top }{ diag}(\tilde{S}(t-))^{-1}d\tilde{S}(t)+\big (1-\tilde{\pi }(t)^{\top }e_n^{\top }\big )\frac{dB(t)}{B(t)}+\tilde{l}(t)dP(t)\\&=\tilde{\pi }(t)^{\top }{ diag}(\tilde{S}(t-))^{-1}d\tilde{S}(t)+\big (1-\tilde{\pi }(t)^{\top }e_n^{\top }\big )\frac{dB(t)}{B(t)}+ p(Y(t),Z(t))\tilde{l}(t)dt-d{R}^{\tilde{l}}(t),\nonumber \end{aligned}$$
(10)

where \(\tilde{l}(t)\) is the ratio of liabilities over wealth at time t. By virtue of the dynamics (9), it holds that

$$\begin{aligned} d{R}^{\tilde{l}}(t)=\tilde{l}(t)\left\{ c(Y(t))dt+\phi (Y(t))dW(t)+\bar{\phi }(Y(t))d\bar{W}(t)+g(Y(t-))dN(t)\right\} . \end{aligned}$$
(11)

Using Eqs. (10) and (11), the wealth process of the insurer can be rewritten as

$$\begin{aligned} \frac{dX^{\tilde{\pi },\tilde{l}}(t)}{X^{\tilde{\pi },\tilde{l}}(t-)}=&\big [r(Y(t))+\tilde{\pi }(t)^{\top }(\mu (Y(t))-r(Y(t))e_n^{\top }) +\tilde{l}(t)(p(Y(t),Z(t))-c(Y(t)))\big ]dt\nonumber \\&+\big [\tilde{\pi }(t)^{\top }\sigma (Y(t))-\tilde{l}(t)\phi (Y(t))\big ]dW(t)-\tilde{l}(t)\bar{\phi }(Y(t))d\bar{W}(t)\nonumber \\&-\tilde{\pi }(t)^{\top }dM(t)-\tilde{l}(t)g(Y(t-))dN(t). \end{aligned}$$
(12)

We next give the definition of the admissible control set which will be used in the paper.

Definition 3.1

The admissible control set \(\tilde{{\mathcal {U}}}\) is a class of \(\mathbb {G}\)-predictable feedback strategies \((\tilde{\pi }(t),\tilde{l}(t))_{t\in [0,T]}:=((\tilde{\pi }_j(t);\ j=1,\ldots ,n)^{\top },\tilde{l}(t))_{t\in [0,T]}\), given by the Markov control \(\tilde{\pi }_j(t):=\pi _j(t,X^{\tilde{\pi },\tilde{l}}(t-),Y(t-),Z(t-))\) for \(j=1,\ldots ,n\), and the nonnegative Markov control \(\tilde{l}(t):=l(t,X^{\tilde{\pi },\tilde{l}}(t-),Y(t-),Z(t-))\) such that the wealth process \(X^{\tilde{\pi },\tilde{l}}(t)\) of the insurer is nonnegative for all \(t\in [0,T]\). Moreover \(\tilde{\pi }_j(t)=\tilde{\pi }_j(t)(1-Z_j(t-))\) for \(j=1,\ldots ,n\), and the feedback control function \(\pi _j\), \(j=1,\ldots ,n\) and l are assumed to be locally bounded. We use \({{\mathcal {U}}}\) to denote the set of the above feedback functions \((\pi ,l):=((\pi _j; j=1,\ldots ,n)^{\top },l)\).

For \(x\in \mathbb {R}_+\), let \(U(x):=\frac{1}{\gamma }x^{\gamma }\) with \(\gamma \in (0,1)\) be the power (CRRA) utility. We consider the following expected utility maximization problem from terminal wealth of the insurer given by, for \((t,x,i,z)\in [0,T]\times \mathbb {R}_+\times \{1,\ldots ,m\}\times {{\mathcal {S}}}\),

$$\begin{aligned} V(t,x,i,z) := \sup _{(\tilde{\pi },\tilde{l})\in \tilde{\mathcal{U}}} \mathbb {E} \left[ U(X^{\tilde{\pi },\tilde{l}}(T))\big |X^{\tilde{\pi },\tilde{l}}(t)=x,Y(t)=i,Z(t)=z\right] . \end{aligned}$$
(13)

Suppose that V is \(C^{1,2}\) in \((t,x)\in [0,T]\times \mathbb {R}_+\) for each \((i,z)\in \{1,\ldots ,m\}\times {{\mathcal {S}}}\). Then, Itô’s formula yields that

$$\begin{aligned}&dV(t,X^{\tilde{\pi },\tilde{l}}(t),Y(t),Z(t))\nonumber \\&\quad =\bigg \{\frac{\partial V}{\partial t}+X^{\tilde{\pi },\tilde{l}}(t)\frac{\partial V}{\partial x}\big [r(Y(t))+\tilde{\pi }(t)^{\top }\theta (Y(t),Z(t))+\tilde{l}(t)(p(Y(t),Z(t))-c(Y(t)))\big ]\nonumber \\&\qquad +\frac{1}{2}(X^{\tilde{\pi },\tilde{l}}(t))^2\frac{\partial ^2 V}{\partial x^2}\big [\tilde{\pi }(t)^{\top }\sigma (Y(t))\sigma (Y(t))^{\top }\tilde{\pi }(t) +(\tilde{l}(t))^2(\phi (Y_{t})\phi (Y_{t})^{\top }+\bar{\phi }(Y(t))\bar{\phi }(Y(t))^{\top })\nonumber \\&\qquad -2\tilde{l}(t)\tilde{\pi }(t)^{\top }\sigma (Y(t))\phi (Y(t))^{\top }\big ]\bigg \}dt\nonumber \\&\qquad +X^{\tilde{\pi },\tilde{l}}(t)\frac{\partial V}{\partial x}\left\{ \big [\tilde{\pi }(t)^{\top }\sigma (Y(t))-\tilde{l}(t)\phi (Y(t))]dW(t)-\tilde{l}(t)\bar{\phi }(Y(t))d\bar{W}(t)\right\} \nonumber \\&\qquad +\big [V(t,X^{\tilde{\pi },\tilde{l}}(t-)-\tilde{l}(t)X^{\tilde{\pi },\tilde{l}}(t-)g(Y(t-)),Y(t-),Z(t-))-V(t,X^{\tilde{\pi },\tilde{l}}(t-),Y(t-),Z(t-))\big ]dN(t)\nonumber \\&\qquad +\sum _{j=1}^n\big [V(t,X^{\tilde{\pi },\tilde{l}}(t-)-\tilde{\pi }_j(t)X^{\tilde{\pi },\tilde{l}}(t-),Y(t-),Z^{j}(t-))-V(t,X^{\tilde{\pi },\tilde{l}}(t-),Y(t-),Z(t-))\big ]dZ_j(t)\nonumber \\&\qquad +\sum _{j\ne Y(t-)}[V(t,X^{\tilde{\pi },\tilde{l}}(t-),j,Z(t-))-V(t,X^{\tilde{\pi },\tilde{l}}(t-),Y(t-),Z(t-))\big ]dH_{Y(t-),j}(t). \end{aligned}$$
(14)

Here, the coefficient \(\theta (i,z):=\mu (i)-r(i)e_n^{\top }+h(i,z)\) for \((i,z)\in \{1,\ldots ,m\}\times {{\mathcal {S}}}\), and the process, for \(t\in [0,T]\),

$$\begin{aligned} H_{ij}(t):=\sum _{0<s\le t}{\mathbb {1}}_{Y(t-)=i,Y(t)=j},\quad i,j\in \{1,\ldots ,m\}\ \mathrm{and}\ i\ne j. \end{aligned}$$
(15)

The dynamic programming principle yields that the value function V satisfies the following HJB equation, i.e., for \((t,x,i,z)\in [0,T)\times \mathbb {R}_+\times \{1,\ldots ,m\}\times {{\mathcal {S}}}\),

$$\begin{aligned} 0=&\frac{\partial V(t,x,i,z)}{\partial t}+r(i)x\frac{\partial V(t,x,i,z)}{\partial x}+\sum _{j\ne i}\big [V(t,x,j,z)-V(t,x,i,z)\big ]q_{ij}\nonumber \\&+\sup _{(\pi ,l)\in {{\mathcal {U}}}}\Bigg \{x\frac{\partial V(t,x,i,z)}{\partial x}\big [\pi ^{\top }(I-diag(z))\theta (i,z)+l(p(i,z)-c(i))\big ]\nonumber \\&+\frac{1}{2}x^2\frac{\partial ^2 V(t,x,i,z)}{\partial x^2}\big [\pi ^{\top }(I-diag(z))\sigma (i)\sigma (i)^{\top }(I-diag(z))\pi +l^2(\phi (i)\phi (i)^{\top }\nonumber \\&\quad +\bar{\phi }(i)\bar{\phi }(i)^{\top })\nonumber \\&-2l\pi ^{\top }(I-diag(z))\sigma (i)\phi (i)^{\top }\big ]\nonumber \\&+\big [V(t,x-xlg(i),i,z)-V(t,x,i,z)\big ]\nu (i,z)\nonumber \\&+\sum _{j=1}^n\big [V(t,x-\pi _jx,i,z^j)-V(t,x,i,z)\big ](1-z_j)h_j(i,z)\Bigg \} \end{aligned}$$
(16)

with terminal condition \(V(T,x,i,z)=U(x)\) for all \((x,i,z)\in \mathbb {R}_+\times \{1,\ldots ,m\}\times {{\mathcal {S}}}\). Here, for \(j=1,\ldots ,n\), and \(z\in {{\mathcal {S}}}\), the flipped state is defined as

$$\begin{aligned} z^j=(z_1,\ldots ,z_{j-1},1-z_j,z_{j+1},\ldots ,z_n). \end{aligned}$$
(17)

In particular, we set \(z^j=z\) if \(j=0\).

It can be observed that Eq. (16) is in fact a recursive dynamical system in terms of default states \(z\in \mathcal{S}\). Further if we consider the value function in the form of \(V(t,x,i,z)=x^{\gamma }\varphi (t,i,z)\), then \(\varphi (t,i,z)\) satisfies the recursive dynamical system given by, for \((i,z)\in \{1,\ldots ,m\}\times {{\mathcal {S}}}\), on \(t\in [0,T)\),

$$\begin{aligned} 0=&\frac{\partial \varphi (t,i,z)}{\partial t}+\gamma r(i)\varphi (t,i,z)+\sum _{j=1}^m\varphi (t,j,z)q_{ij}\nonumber \\&+\sup _{(\pi ,l)\in \mathcal{U}}H\big ((\pi ,l);i,z,(\varphi (t,i,z^j);\ j=0,1,\ldots ,n)\big ) \end{aligned}$$
(18)

with terminal condition \(\varphi (T,i,z)=\frac{1}{\gamma }\) for all \((i,z)\in \{1,\ldots ,m\}\times {{\mathcal {S}}}\). For \((\pi ,l)\in (-\infty ,1]^n\times [0,\infty )\) and \((i,z)\in \{1,\ldots ,m\}\times {{\mathcal {S}}}\), the function

$$\begin{aligned}&H\big ((\pi ,l);t,i,z,\bar{f}(z)\big )=\gamma \big \{\pi ^{\top } (I-diag(z))\theta (i,z)+(p(i,z)-c(i))l\big \}f(z)\nonumber \\&\quad +\bigg \{\frac{\gamma (\gamma -1)}{2}\pi ^{\top }(I-diag(z)) \sigma (i)\sigma (i)^{\top }(I-diag(z))\pi +[(1-lg(i))^\gamma -1]\nu (i,z)\nonumber \\&\quad +\frac{\gamma (\gamma -1)}{2}l^2\big (\phi (i)\phi (i)^{\top } +\bar{\phi }(i)\bar{\phi }(i)^{\top }\big )-\gamma (\gamma -1)l\pi ^{\top } (I-diag(z))\sigma (i)\phi (i)^{\top }\bigg \}f(z)\nonumber \\&\quad +\sum _{j=1}^n[(1-\pi _j)^\gamma f({z}^j)-f(z)](1-z_j)h_j(i,z), \end{aligned}$$
(19)

where \({{\bar{f}}}(z)=(f(z^j);\ j=0,1,\ldots ,n)\) is an arbitrary vector-valued function defined on \(z\in {{\mathcal {S}}}\). In the forthcoming section, we will study the existence and uniqueness of (classical) solutions of the recursive HJB system (18).

4 Analysis of iterated HJB equations

This section analyzes the existence and uniqueness of global (classical) solutions to the recursive dynamical system (18) in terms of default states \(z\in {{\mathcal {S}}}\).

We introduce the notations which will be used frequently in this section. For \(x\in \mathbb {R}^m\), we write \(x=(x_1,...,x_m)^{\top }\) as an m-dimensional column vector. For any \(x,y\in \mathbb {R}^m\), we write \(x\le y\) if \(x_i\le y_i\) for all \(i=1,\ldots ,m\), while we write \(x<y\) if \(x\le y\) and there exists some \(i\in \{1,\ldots ,m\}\) such that \(x_i<y_i\). In particular, we write \(x\ll y\) if \(x_i<y_i\) for all \(i=1,2,...,m\). Recall that \(e_{n}\) denotes the n-dimensional row vector whose all entities are ones. For the general default state \(z\in {{\mathcal {S}}}\), we introduce a general default state representation \(z=0^{j_1,\ldots ,j_k}\) for indices \(j_1\ne \cdots \ne j_k\) belonging to \(\{1,\ldots ,n\}\), and \(k\in \{0,1,\ldots ,n\}\). Such a vector z is obtained by flipping the entries \(j_1,\ldots ,j_k\) of the zero vector to one, i.e., \(z_{j_1}=\cdots =z_{j_k}=1\), and \(z_{j}=0\) for \(j\notin \{j_1,\ldots ,j_k\}\) (if \(k=0\), we set \(z=0^{j_1,\ldots ,j_k}=0\)). Clearly \(0^{j_1,\ldots ,j_{n}}=e_n\).

Recall the recursive dynamical system (18) in terms of default states \(z=0^{j_1,\ldots ,j_k}\) (where \(k=0,1,\ldots ,n\)). The solvability can in fact be analyzed in the recursive form in terms of default states. Hence, our proof strategy for analyzing the system is based on a recursive procedure, starting from the default state \(z=e_n\) (i.e., all stocks have defaulted) and proceeding backward to the default state \(z=0\) (i.e., all stocks are alive).

  1. (i)

    \(k=n\) (i.e., all stocks have defaulted). In this default state, the insurer will not invest in stocks because they have defaulted and hence the optimal fraction strategy for stocks is given by \(\pi _1^*=\cdots =\pi _n^*=0\) by virtue of Definition 3.1. Let \(\varphi (t,e_n)=(\varphi (t,i,e_n);\ i=1,\ldots ,m)^{\top }\). Then, the dynamical system (18) reduces to

    $$\begin{aligned} \left\{ \begin{aligned} \frac{d}{dt}\varphi (t,e_n)=&-A^{(n)}\varphi (t,e_n),\quad \text { in }[0,T);\\ \varphi (T,e_n)=&\frac{1}{\gamma }e_m^{\top }. \end{aligned} \right. \end{aligned}$$
    (20)

Here the matrix of coefficient is given by

$$\begin{aligned} A^{(n)}=&diag\left[ \left( \gamma r(i)+\sup _{l\in \mathcal{U}^{(n)}}H^{(n)}(l,i);\ i=1,\ldots ,m\right) \right] +Q, \end{aligned}$$
(21)

where the policy space in (21) in this case is reduced to

$$\begin{aligned} {{\mathcal {U}}}^{(n)}:=\{l=l(i)\in [0,+\infty );\ 1-lg(i)\ge 0\}. \end{aligned}$$
(22)

Moreover, the function \(H^{(n)}(l,i)\) is given by, for \((l,i)\in [0,\infty )\times \{1,\ldots ,m\}\),

$$\begin{aligned} H^{(n)}(l,i):=&\gamma (p(i,e_n)-c(i))l+\frac{\gamma (\gamma -1)}{2}l^2\big (\phi (i)\phi (i)^{\top }+\bar{\phi }(i)\bar{\phi }(i)^{\top }\big )\\&+[(1-lg(i))^\gamma -1]\nu (i,e_n). \end{aligned}$$

Since \(\gamma \in (0,1)\), it is not difficult to verify that for each \(i=1,\ldots ,m\), \(H^{(n)}(l,i)\) is continuous and strictly concave in l on the compact \({{\mathcal {U}}}^{(n)}\). Consequently, there exists a unique optimum \(l^{*}\in {{\mathcal {U}}}^{(n)}\) which is given by

$$\begin{aligned} l^{*} =l^{*}(i)= \underset{l\in {{\mathcal {U}}}^{(n)}}{\mathrm {arg\,max\, }}H^{(n)}(l,i),\qquad i=1,\ldots ,m. \end{aligned}$$
(23)

Further, we have that \(\sup _{l\in \mathcal{U}^{(n)}}H^{(n)}(l,i)=H^{(n)}(l^{*},i)\in [0,\infty )\) for each \(i=1,\ldots ,m\). Then, the matrix of coefficient \(A^{(n)}\) given by (21) is finite.

We next prove that the dynamical system (20) has a unique strictly positive solution. To this purpose, we need the following auxiliary result which will be also used in the proof related to the general default case. The proof is provided in the “Appendix”.

Lemma 4.1

Let \(g(t):=(g_i(t);\ i=1,\ldots ,m)^{\top }\) satisfy the following dynamical system given by

$$\begin{aligned} \left\{ \begin{aligned}&\frac{d}{dt}g(t)=Bg(t)\quad \text { in }(0,T];\\&g(0)=\xi . \end{aligned} \right. \end{aligned}$$

If \(B=(b_{ij})_{m\times m}\) satisfies \(b_{ij}\ge 0\) for \(i\ne j\) and \(\xi \gg 0\), then \(g(t)\gg 0\) for all \(t\in [0,T]\).

Then we have the following lemma whose proof is given in the “Appendix”.

Lemma 4.2

The dynamical system (20) admits a unique solution which is given by, for \(t\in [0,T]\),

$$\begin{aligned} \varphi (t,e_n)=\frac{1}{\gamma } e^{A^{(n)}(T-t)}e_m^{\top }=\frac{1}{\gamma }\sum _{i=0}^{\infty }\frac{(A^{(n)})^i(T-t)^i}{i!}e_m^{\top }, \end{aligned}$$
(24)

where the \(m\times m\)-dimensional matrix \(A^{(n)}\) is given by (21). Moreover, it holds that \(\varphi (t,e_n)\gg 0\) for all \(t\in [0,T]\).

We next consider the general default state with the form \(z=0^{j_1,\ldots ,j_{k}}\) for \(0\le k\le n-1\), i.e., the stocks \(j_1,\ldots ,j_{k}\) have defaulted and the stocks \(\{j_{k+1},\ldots ,j_n\}:=\{1,\ldots ,n\}\setminus \{j_1,\ldots ,j_k\}\) are alive. Then, we have

  1. (ii)

    Since the stocks \(j_1,\ldots ,j_k\) have defaulted, the optimal fraction strategies for the stocks \(j_1,\ldots ,j_{k}\) are given by \(\pi _j^{(k,*)}=0\) for \(j\in \{j_1,\ldots ,j_{k}\}\) by virtue of Definition 3.1. Let \(\varphi ^{(k)}(t)=(\varphi (t,i,0^{j_1,\ldots ,j_{k}});\ i=1,\ldots ,m)^{\top }\), \(p^{(k)}(i)=p(i,0^{j_1,\ldots ,j_{k}})\), and \(h^{(k)}_j(i)=h_j(i,0^{j_1,\ldots ,j_{k}})\) for \(j\notin \{j_1,\ldots ,j_k\}\) and \(i=1,\ldots ,m\). Therefore, the corresponding HJB system (18) in this default state reduces to

    $$\begin{aligned} \left\{ \begin{aligned} \frac{d}{dt}\varphi ^{(k)}(t)=&-A^{(k)}\varphi ^{(k)}(t)-G^{(k)}(t,\varphi ^{(k)}(t)),\quad \text { in }[0,T);\\ \varphi ^{(k)}(T)=&\frac{1}{\gamma }e_m^{\top }. \end{aligned} \right. \end{aligned}$$
    (25)

    Here, the \(m\times m\)-dimensional matrix \(A^{(k)}\) is given by

    $$\begin{aligned} A^{(k)}=diag\left[ \left( \gamma r(i)-\sum _{j\notin \{j_1,\ldots ,j_{k}\}}h_{j}^{(k)}(i);\ i=1,\ldots ,m\right) \right] +Q. \end{aligned}$$
    (26)

    The coefficient \(G^{(k)}(t,x)=(G^{(k)}_i(t,x);\ i=1,\ldots ,m)^{\top }\) for \((t,x)\in [0,T]\times \mathbb {R}^{m}\) is given by, for \(i=1,\ldots ,m\),

    $$\begin{aligned} G_i^{(k)}(t,x)&=\sup _{(\pi ^{(k)},l)\in \mathcal{U}^{(k)}}\left\{ \sum _{j\notin \{j_1,\ldots ,j_k\}}(1-\pi _{j}^{(k)})^\gamma h^{(k)}_{j}(i)\varphi ^{(k+1),j}(t,i)+H^{(k)}((\pi ^{(k)},l),i)x_i\right\} , \end{aligned}$$
    (27)

    where the policy space in this default case is given by

    $$\begin{aligned} \mathcal{U}^{(k)}:=\left\{ (\pi ^{(k)},l)=(\pi ^{(k)}(t,i),l(t,i))\in (-\infty ,1]^{n-k}\times [0,\infty );\ 1-lg(i)\ge 0\right\} . \end{aligned}$$
    (28)

    The function \(\varphi ^{(k+1),j}(t,i):=\varphi (t,i,0^{j_1,\ldots ,j_k,j})\) for \(j\notin \{j_1,\ldots ,j_k\}\) corresponds to the i-th element of the positive solution of the HJB system (18) at the default state \(z=0^{j_1,\ldots ,j_k,j}\). The function \(H^{(k)}((\pi ^{(k)},l),i)\) is given by, for \((\pi ^{(k)},l)\in \mathcal{U}^{(k)}\), and \(i=1,\ldots ,m\),

    $$\begin{aligned} H^{(k)}((\pi ^{(k)},l),i)=&\gamma \big \{(\pi ^{(k)})^{\top }\theta ^{(k)}(i)+(p^{(k)}(i)-c(i))l\big \}+\frac{\gamma (\gamma -1)}{2}\Big \{(\pi ^{(k)})^{\top }\sigma ^{(k)}(i)\sigma ^{(k)}(i)^{\top }\pi ^{(k)}\nonumber \\&+l^2\big [\phi (i)\phi (i)^{\top }+\bar{\phi }(i)\bar{\phi }(i)^{\top }\big ]-2l(\pi ^{(k)})^{\top }\sigma ^{(k)}(i)\phi (i)^{\top }\Big \}\nonumber \\&+\big [(1-lg(i))^\gamma -1\big ]\nu ^{(k)}(i). \end{aligned}$$
    (29)

    Here, for each \(i=1,\ldots ,m\), we used notations \(\pi ^{(k)}=(\pi _j^{(k)};\ j\notin \{j_1,\ldots ,j_k\})^{\top }\), \(\theta ^{(k)}(i)=(\theta _j(i);\ j\notin \{j_1,\ldots ,j_k\})^{\top }\), \(\sigma ^{(k)}(i)=(\sigma _{j\kappa }(i);\ j\notin \{j_1,\ldots ,j_k\},\kappa \in \{1,\ldots ,d\})\), and \(\nu ^{(k)}(i)=\nu (i,0^{j_1,\ldots ,j_k})\).

From the expression of \(G_i^{(k)}(t,x)\) given by (27), it can be seen that the solution \(\varphi ^{(k)}(t)\) on \(t\in [0,T]\) of Eq. (18) at \(z=0^{j_1,\ldots ,j_k}\) depends on the solution \(\varphi ^{(k+1),j}(t)\) on \(t\in [0,T]\) of Eq. (18) at \(z=0^{j_1,\ldots ,j_k,j}\) for \(j\notin \{j_1,\ldots ,j_k\}\). In particular, for \(k=n-1\), the solution \(\varphi ^{(k+1),j}(t)=\varphi (t,e_n)\gg 0\) corresponding to the solution to Eq. (18) at \(z=e_n\) (i.e., \(k=n\)) has been obtained in Lemma 4.2. This suggests solving the HJB system (18) backward recursively in terms of default states \(z=0^{j_1,\ldots ,j_k}\). Thus, in order to analyze the existence and uniqueness of a positive (classical) solution to the dynamical system (25), we first assume that the HJB system (18) admits a positive unique (classical) solution \(\varphi ^{(k+1),j}(t)\) on \(t\in [0,T]\) for \(j\notin \{j_1,\ldots ,j_k\}\).

We have the following estimate on \(G^{(k)}(t,x)\) given by (27) which is stated in the following lemma. The proof is reported in the “Appendix”.

Lemma 4.3

For each \(k=0,1,\ldots ,n-1\), assume that the HJB system (18) admits a positive unique (classical) solution \(\varphi ^{(k+1),j}(t)\) on \(t\in [0,T]\) for \(j\notin \{j_1,\ldots ,j_k\}\). Then, for any \(x,y\in \mathbb {R}^m\) satisfying \(x,y\ge \varepsilon e_m^{\top }\) with \(\varepsilon >0\), there exists a positive constant \(C=C(\varepsilon )\) depending on \(\varepsilon >0\) only such that

$$\begin{aligned} \left\| G^{(k)}(t,x)-G^{(k)}(t,y)\right\| \le C\left\| x-y\right\| . \end{aligned}$$
(30)

Here \(\Vert \cdot \Vert \) denotes the Euclidian norm.

In order to study the existence and uniqueness of solutions to the HJB system (25), we also need the following comparison result. The proof is delegated to the “Appendix”.

Lemma 4.4

Let \(g_{\kappa }(t):=(g_{\kappa i}(t);\ i=1,\ldots ,m)^{\top }\) with \(\kappa =1,2\) satisfy the following dynamical systems on [0, T] respectively

$$\begin{aligned} \left\{ \begin{aligned} \frac{d}{dt}g_1(t)=&f(t,g_1(t))+\tilde{f}(t,g_1(t)),\ \text { in }(0,T];\\ g_1(0)=&\xi _1, \end{aligned} \right. \quad \quad \left\{ \begin{aligned} \frac{d}{dt}g_2(t)=&f(t,g_2(t)),\ \text { in }(0,T];\\ g_2(0)=&\xi _2. \end{aligned} \right. \end{aligned}$$

Here the functions \(f(t,x),\,\tilde{f}(t,x):[0,T]\times \mathbb {R}^m\rightarrow \mathbb {R}^m\) are Lipschitz continuous w.r.t. \(x\in \mathbb {R}^m\) uniformly in \(t\in [0,T]\). The function \(f(t,\cdot )\) satisfies the type K condition for each \(t\in [0,T]\) (i.e., for any \(x,y\in \mathbb {R}^m\) satisfying \(x\le y\) and \(x_i=y_i\) for some \(i=1,\ldots ,m\), it holds that \(f_i(t,x)\le f_i(t,y)\) for each \(t\in [0,T]\)). If \(\tilde{f}(t,x)\ge 0\) for \((t,x)\in [0,T]\times \mathbb {R}^m\) and \(\xi _1\ge \xi _2\), then \(g_1(t)\ge g_2(t)\) for all \(t\in [0,T]\).

We are now at the position to state the result of existence and uniqueness of positive (classical) solutions to the HJB system (25).

Theorem 4.5

For each \(k=0,1,\ldots ,n-1\), assume that the HJB system (18) admits a positive unique (classical) solution \(\varphi ^{(k+1),j}(t)\) on \(t\in [0,T]\) for \(j\notin \{j_1,\ldots ,j_k\}\). Then, there exists a unique positive (classical) solution \(\varphi ^{(k)}(t)\) on \(t\in [0,T]\) of the HJB system (18) at the default state \(z=0^{j_1,\ldots ,j_k}\) (i.e., the HJB system (25) admits a unique positive (classical) solution).

Proof

For a constant \(a>0\), consider the following truncated dynamical system given by

$$\begin{aligned} \left\{ \begin{aligned} \frac{d}{dt}\varphi _a^{(k)}(t)=&-A^{(k)}\varphi ^{(k)}_a(t)-G^{(k)}_{a}(t,\varphi _a^{(k)}(t)),\ \text { in }[0,T);\\ \varphi _a^{(k)}(T)=&\frac{1}{\gamma }e_m^{\top }, \end{aligned} \right. \end{aligned}$$
(31)

where the truncated nonlinearity \(G_a^{(k)}(t,x):=G^{(k)}(t,x\vee ae_m^{\top })\) for \((t,x)\in [0,T]\times \mathbb {R}^m\). Thanks to Lemma 4.3, there exists a positive constant \(C=C(a)\) which depends on \(a>0\) only such that for all \(t\in [0,T]\),

$$\begin{aligned} \big \Vert G_a^{(k)}(t,x)-G_a^{(k)}(t,y)\big \Vert \le C\Vert x-y\Vert ,\qquad x,y,\in \mathbb {R}^m, \end{aligned}$$
(32)

i.e., \(G^{(k)}_a(t,x)\) is globally Lipschitz continuous w.r.t. \(x\in \mathbb {R}^m\) uniformly in \(t\in [0,T]\). By reversing the flow of time, consider \(\tilde{\varphi }_a^{(k)}(t):=\varphi _a^{(k)}(T-t)\) for \(t\in [0,T]\). Then \(\tilde{\varphi }_a^{(k)}(t)\) satisfies the following dynamical system given by

$$\begin{aligned} \left\{ \begin{aligned} \frac{d}{dt}\tilde{\varphi }_a^{(k)}(t)=&A^{(k)}\tilde{\varphi }^{(k)}_a(t)+G^{(k)}_{a}(T-t,\tilde{\varphi }_a^{(k)}(t)),\ \text { in }(0,T];\\ \tilde{\varphi }_a^{(k)}(0)=&\frac{1}{\gamma }e_m^{\top }. \end{aligned} \right. \end{aligned}$$
(33)

Let \(\psi ^{(k)}(t)=(\psi _i^{(k)}(t);\ i=1,\ldots ,m)^{\top }\) satisfy the following dynamical system:

$$\begin{aligned} \left\{ \begin{aligned} \frac{d}{dt}\psi ^{(k)}(t)=&A^{(k)}\psi ^{(k)}(t),\quad \text { in }(0,T];\\ \psi ^{(k)}(0)=&\frac{1}{\gamma }e_m^{\top }. \end{aligned} \right. \end{aligned}$$
(34)

Recall the \(m\times m\)-dimensional matrix of coefficients \(A^{(k)}\) given by (26). Then, we have that \([A^{(k)}]_{ij}=q_{ij}\) for all \(i\ne j\) using (26). Since \(Q=(q_{ij})_{m\times m}\) is the generator of the Markov chain, it holds that \(q_{ij}\ge 0\) for all \(i\ne j\). Hence \([A^{(k)}]_{ij}\ge 0\) for all \(i\ne j\) and thus the linear function \(A^{(k)}x\) is of type K in \(x\in \mathbb {R}^m\). Also since \(\psi ^{(k)}(0)=\frac{1}{\gamma }e_m^{\top }\gg 0\), it follows from Lemma 4.1 that the dynamical system (34) admits a unique (classical) solution \(\psi ^{(k)}(t)\) on [0, T] and moreover \(\psi ^{(k)}(t)\gg 0\) for all \(t\in [0,T]\). Set

$$\begin{aligned} \varepsilon ^{(k)}:=\min _{i=1,\ldots ,m}\left\{ \inf _{t\in [0,T]}\psi _i^{(k)}(t)\right\} . \end{aligned}$$
(35)

Then, by the continuity of \(\psi ^{(k)}(t)\) in \(t\in [0,T]\) and the fact that \(\psi ^{(k)}(t)\gg 0\) for all \(t\in [0,T]\), we have that \(\varepsilon ^{(k)}>0\). Further, by virtue of estimates (32) and (A.7) in the Appendix, together with the initial condition \(\varphi _a^{(k)}(0)=\psi ^{(k)}(0)=\frac{1}{\gamma }e_m^{\top }\gg 0\), it follows from Lemma 4.4 that

$$\begin{aligned} \tilde{\varphi }_a^{(k)}(t)\ge \psi ^{(k)}(t)\ge \varepsilon ^{(k)}e_m^{\top },\quad \text {for all}\ t\in [0,T]. \end{aligned}$$
(36)

Notice that the positive constant \(\varepsilon ^{(k)}\) is independent of \(a>0\). Then, for \(a\in (0,\varepsilon ^{(k)})\), it holds that

$$\begin{aligned} G_a^{(k)}(T-t,\tilde{\varphi }^{(k)}_a(t))=G^{(k)}\big (T-t,\tilde{\varphi }^{(k)}_a(t)\vee ae_m^{\top }\big )=G^{(k)}(T-t,\tilde{\varphi }^{(k)}_a(t)). \end{aligned}$$

This yields that for \(a\in (0,\varepsilon ^{(k)})\), the function \(\tilde{\varphi }^{(k)}_a(t)\) solves the dynamical system given by

$$\begin{aligned} \left\{ \begin{aligned} \frac{d}{dt}\tilde{\varphi }_a^{(k)}(t)=&A^{(k)}\tilde{\varphi }^{(k)}_a(t)+G^{(k)}(T-t,\tilde{\varphi }_a^{(k)}(t)),\ \text { in }(0,T];\\ \tilde{\varphi }_a^{(k)}(0)=&\frac{1}{\gamma }e_m^{\top }. \end{aligned} \right. \end{aligned}$$

By the uniqueness of the solution to the dynamical system (33) and using the estimate (36), it follows that, for \(a\in (0,\varepsilon ^{(k)})\), \(\varphi _a^{(k)}(t):=\tilde{\varphi }_a^{(k)}(T-t)\) on [0, T] is the unique (classical) solution to the HJB system (25). Thus, we complete the proof of the theorem. \(\square \)

We next turn to the characterization of the optimal strategy \((\pi ^{(k)},l)\in {{\mathcal {U}}}^{(k)}\) at the default state \(z=0^{j_1,\ldots ,j_k}\) where \(k=0,1,\ldots ,n-1\). Let us recall the HJB system (25), i.e.,

$$\begin{aligned} \left\{ \begin{aligned} \frac{d}{dt}\varphi ^{(k)}(t)=&-A^{(k)}\varphi ^{(k)}(t)-G^{(k)}(t,\varphi ^{(k)}(t)),\quad \text { in }[0,T);\\ \varphi ^{(k)}(T)=&\frac{1}{\gamma }e_m^{\top }. \end{aligned} \right. \end{aligned}$$

Theorem 4.5 shows that the above system admits a unique positive (classical) solution \(\varphi ^{(k)}(t)\) on [0, T] and moreover \(\varphi ^{(k)}(t)\ge \varepsilon ^{(k)}e_m^{\top }\) for all \(t\in [0,T]\) using (36). Here \(\varepsilon ^{(k)}>0\) is given by (35). Then, by virtue of the equality (A.8) given in the Appendix, there exists a positive constant \(C(\varepsilon ^{(k)})\) depending on \(\varepsilon ^{(k)}>0\) such that for each \(i=1,\ldots ,m\),

$$\begin{aligned}&G^{(k)}_i(t,\varphi ^{(k)}(t,i))\nonumber \\&\quad =\sup _{\begin{array}{c} (\pi ^{(k)},l)\in \mathcal{U}^{(k)}\\ \Vert \pi ^{(k)}\Vert ^2+l^2\le C(\varepsilon ^{(k)}) \end{array}}\left\{ \sum _{j\notin \{j_1,\ldots ,j_k\}}(1-\pi _{j}^{(k)})^\gamma h_{j}^{(k)}(i)\varphi ^{(k+1),j}(t,i)+H^{(k)}((\pi ^{(k)},l),i)\varphi ^{(k)}(t,i)\right\} . \end{aligned}$$
(37)

Here, for each \(i=1,\ldots ,m\), \(\varphi ^{(k+1),j}(t,i)\) on \(t\in [0,T]\) is the i-th element of the positive (classical) solution \(\varphi ^{(k+1),j}(t)\) of the HJB system (18) at the default state \(z=0^{j_1,\ldots ,j_k,j}\) for \(j\notin \{j_1,\ldots ,j_k\}\). It is not difficult to verify that, for each \(i=1,\ldots ,m\) and fixed \(t\in [0,T]\),

$$\begin{aligned} \sum _{j\notin \{j_1,\ldots ,j_k\}}(1-\pi _{j}^{(k)})^\gamma h_{j}^{(k)}(i)\varphi ^{(k+1),j}(t,i)+H^{(k)}((\pi ^{(k)},l),i)\varphi ^{(k)}(t,i) \end{aligned}$$

is strictly concave in \((\pi ^{(k)},l)\in {{\mathcal {U}}}^{(k)}\). Also notice that the space \({{\mathcal {U}}}^{(k)}\cap \{(\pi ^{(k)},l);\ \Vert \pi ^{(k)}\Vert ^2+|l|^2\le C(\varepsilon ^{(k)})\}\) is compact. Hence, there exists a unique optimum \((\pi ^{(k,*)},l^*)\in \mathcal{U}^{(k)}\) such that

$$\begin{aligned}&(\pi ^{(k,*)},l^*)=(\pi ^{(k,*)}(t,i),l^*(t,i))\nonumber \\&\quad =\underset{\begin{array}{c} (\pi ^{(k)},l)\in \mathcal{U}^{(k)}\\ \Vert \pi ^{(k)}\Vert ^2+l^2\le C(\varepsilon ^{(k)}) \end{array}}{\mathrm {arg\,max\, }}\left\{ \sum _{j\notin \{j_1,\ldots ,j_k\}}(1-\pi _{j}^{(k)})^\gamma h_{j}^{(k)}(i)\varphi ^{(k+1),j}(t,i)+H^{(k)}((\pi ^{(k)},l),i)\varphi ^{(k)}(t,i)\right\} \nonumber \\&\quad =\underset{(\pi ^{(k)},l)\in \mathcal{U}^{(k)}}{\mathrm {arg\,max\, }}\left\{ \sum _{j\notin \{j_1,\ldots ,j_k\}}(1-\pi _{j}^{(k)})^\gamma h_{j}^{(k)}(i)\varphi ^{(k+1),j}(t,i)+H^{(k)}((\pi ^{(k)},l),i)\varphi ^{(k)}(t,i)\right\} \end{aligned}$$
(38)

for all \(i=1,\ldots ,m\).

We conclude this section with a verification theorem whose proof is reported in the “Appendix”.

Theorem 4.6

At any default state \(z=0^{j_1,\ldots ,j_k}\) for \(k=0,1,\ldots ,n\), let \(\varphi (t,z)\) be the unique positive (classical) solution to the dynamical system of HJB equations (18) (i.e., for \(k=n\), \(\varphi (t,z)=\varphi (t,e_n)\) is given in Lemma 4.2 and for \(k=0,1,\ldots ,n-1\), \(\varphi (t,z)=\varphi ^{(k)}(t)\) is given in Theorem 4.5). Also let the optimal strategy \((\pi ^{*},l^*)=(\pi ^*(t,i,z),l^*(t,i,z))\) for \(i=1,\ldots ,m\) be given by (23) for \(k=n\) and given by (38) for \(k=0,1,\ldots ,n-1\). Then, we have that

  1. (i)

    For \((t,x,i,z)\in [0,T]\times \mathbb {R}_+\times \{1,\ldots ,m\}\times {{\mathcal {S}}}\), and any admissible feedback strategy \((\pi ,l)\in {{\mathcal {U}}}\), it holds that

    $$\begin{aligned} x^\gamma \varphi (t,i,z)\ge \mathbb {E} \big [U(X^{\pi ,l}(T))\mid X^{{\pi },l}(t)=x,Y(t)=i,Z(t)=z\big ]. \end{aligned}$$
  2. (ii)

    The value function V(txiz) for \((t,x,i,z)\in [0,T]\times \mathbb {R}_+\times \{1,\ldots ,m\}\times {{\mathcal {S}}}\) admits the following representation

    $$\begin{aligned} V(t,x,i,z)= \mathbb {E} \big [U(X^{\pi ^*,l^*}(T))| X^{\pi ^*,l^*}(t)=x,Y(t)=i,Z(t)=z\big ]=x^{\gamma }\varphi (t,i,z). \end{aligned}$$

5 Numerical analysis

In this section, we investigate the sensitivity of the optimal strategy of stocks and risk control to changes in market parameters. The sensitivity analysis is performed on a simple market model consisting of two defaultable stocks and a riskless bond, i.e., \(n=2\). In this market model, it follows from (3) that the pre-default prices of stocks are given by

$$\begin{aligned} \left\{ \begin{array}{ll} \frac{dS_1(t)}{S_1(t)}=\{\mu _1(Y(t))+h_1(Y(t),Z(t))\}dt+\sum _{j=1}^2\sigma _{1j}(Y(t))dW_j(t);\\ \\ \frac{dS_2(t)}{S_2(t)}=\{\mu _2(Y(t))+h_2(Y(t),Z(t))\}dt+\sum _{j=1}^2\sigma _{2j}(Y(t))dW_j(t), \end{array} \right. \end{aligned}$$

where \(Z:=(Z_1,Z_2)\in {{\mathcal {S}}}=\{0,1\}^2\) is the two-dimensional default state process of stocks and W is a two-dimensional Brownian motion (i.e., \(d=2\)). The regime-switching process Y is a continuous-time (conservative) Markov chain with state space \(\{1,2\}\) (i.e., \(m=2\)). The claim (risk) per policy in the risk control is then given by

$$\begin{aligned} dC(t) =\,&c(Y(t))dt+\sum _{j=1}^2\phi _j(Y(t))dW_j(t) + \bar{\phi }(Y(t))d\bar{W}(t)\nonumber \\&+\sum _{(i,z)\in \{1,2\}\times \{0,1\}^2}g(Y(t-)){\mathbb {1}}_{Y(t-)=i,Z(t-)=z}dN_{i,z}(t). \end{aligned}$$

Here \(\bar{W}\) is a scalar Brownian motion (i.e., \(\bar{d}=1\)) and \(N_{i,z}\) for \((i,z)\in \{1,2\}\times \{0,1\}^2\) are independent Poisson processes with respective intensities \(\nu ^{z}(i):=\nu (i,z)\). Throughout the section, we use the following benchmark parameters given in Table 1. In particular, we use the notation \(h_k^{z}:=(h_k(1,z),h_k(2,z))\) to represent the vector of default intensities of the k-th stock at the default state \(z\in \{0,1\}^2\).

Table 1 Market parameters values

Moreover, we set the risk aversion parameter to \(\gamma =0.5\). The generator of the Markov chain Y and the volatility matrix of stocks are given respectively by

$$\begin{aligned} Q=Q_0=\left[ \begin{matrix} -0.5&{}0.5\\ 1&{}-1\\ \end{matrix}\right] ,\quad \sigma (1)=\left[ \begin{matrix} 0.7&{}0\\ 0&{}1\\ \end{matrix}\right] ,\quad \sigma (2)=\left[ \begin{matrix} 1&{}0\\ 0&{}1.5\\ \end{matrix}\right] . \end{aligned}$$
Fig. 1
figure 1

Dependence of the optimal strategies of stocks and risk control on default intensities at a given regime. Top panel: the dependence of the optimal strategies of stock 1 and risk control on the default intensity of stock 1 in regime 2. The default state \(z=(0,1)\). Bottom panel: the dependence of the optimal strategies of stock 2 and risk control on the default intensity of stock 2 in regime 1. The default state \(z=(1,0)\)

We first perform a comparative statics analysis to examine how the default risk premia affect the optimal strategies of stocks and risk control of the insurer. Figure 1 displays the optimal strategy of stocks and risk control in a given regime at different times when the default intensity of a stock varies. Consider first the situation in which stock 1 is alive and stock 2 has defaulted (i.e., it corresponds to the default state \(z=(0,1)\)). The top left graph of Fig. 1 indicates that, as the stock 1’s default intensity becomes higher in regime 2, i.e., \(h_1^{(0,1)}(2)\) increases, the insurer reduces his/her investment in the defaultable stock 1. Recall that, for a fixed regime \(i\in \{1,2\}\), \(\nu ^{z}(i)\) represents the jump intensity of the claim (risk) per policy in the risk control at the default state \(z\in \{0,1\}^2\). Under the benchmark parameter configuration, we have \(\nu ^{(1,1)}(2)>\nu ^{(0,1)}(2)\) and \(\nu ^{(1,1)}(1)>\nu ^{(1,0)}(1)\). This implies that a default event can result in an increase in the expected number of claims that occur during a fixed period of time. In other words, when the default intensity of a stock increases, not only the defaultable stocks but the liabilities become riskier. The top right graph of Fig. 1 shows that, as the default intensity of stock 1 increases, the insurer would reduce his/her investment in the stock and cede more liabilities to reinsurers at the same time, by considering the higher risk in both stocks and liabilities. This line of reasoning is also confirmed by the bottom graphs of Fig. 1 in the case where stock 1 has defaulted and the default intensity of stock 2 will increase (i.e., it corresponds to the default state \(z=(1,0)\)).

Fig. 2
figure 2

Dependence of optimal strategies of stocks and risk control in regime 1 on volatility of stocks at different times

We next give an illustration of how market volatility impacts the optimal investment strategy of stocks and risk control. Figure 2 plots the optimal strategy of stocks and risk control in regime 1 at different times when the volatility of stocks varies. The default states considered here are \(z=(0,1)\) and (1, 0). A comparison between the left panel and the right panel of Fig. 2 shows that the insurer decreases his/her investment in stocks and allocates a larger proportion of wealth to the liability, when the volatility of stocks increases. This is exactly consistent with the intuition. This can be also confirmed from the right panel of Fig. 2. It also demonstrates that the optimal strategy for the liability is more sensitive to the changes of volatility of stocks than that to the changes in time. Consequently, the above comparison exploits that the optimal strategy of the liability is more sensitive to the changes in risk than that to the changes in time.

Fig. 3
figure 3

Dependence of the optimal strategy of both stocks on the default intensity \(h^{(0,0)}_2(1)\) of stock 2 in regime 1. The current default state \(z=(0,0)\), i.e. both stocks are alive. Left panel: dependence of the optimal strategy of stock 1 on the default intensity \(h^{(0,0)}_2(1)\) of stock 2 in regime 1; Right panel: dependence of the optimal strategy of stock 2 on the default intensity \(h^{(0,0)}_2(1)\) of stock 2 in regime 1

Fig. 4
figure 4

Dependence of the optimal strategy of both stocks on the default intensity \(h^{(0,0)}_1(2)\) of stock 1 in regime 2. The current default state \(z=(0,0)\), i.e. both stocks are alive. Left panel: dependence of the optimal strategy of stock 2 in regime 2 on the default intensity \(h^{(0,0)}_1(2)\) of stock 1 in regime 2; Right panel: dependence of the optimal strategy of stock 1 in regime 2 on the default intensity \(h^{(0,0)}_1(2)\) of stock 1 in regime 2

Fig. 5
figure 5

The difference of value functions between two regimes given different generators of Markov chain Y at different default states \(z=(0,0)\), (1, 0), (0, 1) and (0, 0)

We finally assess the impact of default contagion on the optimal investment strategy of stocks and the value function respectively. In particular, we explain how to disentangle the direct and indirect (contagion) effects of an increase in the default intensity. Figure 3 and 4 illustrate how default contagion impacts the investment strategy of the stock. They suggest that when the default intensity of one stock increases, the insurer tends to reduce his/her investment in both stocks when both stocks are alive. This fact reflects the contagion property of default in this model: when one asset has higher default probability, the contagion property of default makes the investor reduce his/her investment in the other asset as well. As it appears from the left panel of Fig. 3, when the default contagion of stock 2 increases, the insurer decreases the proportion of wealth allocated to stock 1. This occurs because at the default of stock 2, the default intensity of stock 1 will instantaneously increase (an upward jump in the default intensity from \(h_1^{(0,0)}=(0.5,0.75)\) to \(h_1^{(0,1)}=(0.7,1)\)), inducing a higher default risk of stock 1. Consequently, the risk averse insurer would allocate a smaller proportion of wealth to this stock. Notice that at the default of stock 1, the default intensity of stock 2 will instantaneously increase because there is an upward jump in the default intensity from \(h_2^{(0,0)}=(0.75,1.1)\) to \(h_2^{(1,0)}=(0.9,1.3)\). The right panel of Fig. 4 confirms a similar trend for stock 2, however, the indirect contagion effect becomes more pronounced for the case of stock 2.

The direct effect of the default intensity is shown in the right panel of Fig. 3 (resp. in the right panel of Fig. 4). For a fixed default intensity of stock 1 (resp. stock 2), the insurer will invest less wealth in stock 1 (resp. stock 2) when the time to maturity decreases. In this regard, it might be noted that the conditional survival probability of stocks \( \mathbb {P} (\tau _i>T|{{\mathcal {G}}}_t)\) with \(t<T\) is given by \(\mathbf 1 _{\tau _i>t} \mathbb {E} [e^{-\int _t^Th_i^{Z(s)}(Y(s))ds}|\mathcal {G}_t]\). As expected, this probability is decreasing with respect to the default intensity \(h_i^z\) and for shorter time to maturity, all else being equal, the rate of change of this probability with respect to the default intensity becomes smaller (i.e., all else being equal, the conditional survival probability is not too sensitive to the default intensity when t tends to T). Therefore, at an increase in the default intensity of stock 1 (resp. stock 2), the insurer tends to decrease investment in stock 1 (resp. stock 2) for shorter time to maturity. Moreover, the insurer will allocate less proportion of his/her wealth to stock 1 (resp. stock 2) as the default intensity of stock 1 (resp. stock 2) increases. Similar observation has also been made in Jiao et al. [12].

Figure 5 depicts the difference of value functions between two regimes at four different default states \(z=(0,0)\), (1, 0), (0, 1) and (1, 1) respectively. The graphs in Fig. 5 confirm how the change of the absolute values of elements in the generator Q affects the difference of value functions between two regimes. At each default state, the difference of value functions between two regimes becomes tinier for larger absolute values of elements in the generator Q. This happens because a larger absolute value of the elements in Q will result in a more frequent regime switching of the Markov chain. Consequently, the insurer relies more on his/her investment strategy rather than the regime he/she is in when faced with a market with frequent regime switching.