1 Introduction

The famous work of Harry M. Markowitz [33, 34] inaugurated a new era in modern finance. Markowitz’s mean-variance portfolio selection has become one of the most prominent modern finance theories since its inception.

Numerous Markowitz’s models with new features have been studied in the literature. In the realm of continuous-time framework, Richardson [37] first applied martingale method to study Markowitz’s mean-variance portfolio selection problem. Zhou and Li [46] used an embedding technique and stochastic linear-quadratic (LQ) control theory to study the problem. Li, Zhou and Lim [28] considered the problem with no-shorting constraints. Hu and Zhou [22] extended it to the case with random coefficients and cone constraints on the control variable. Czichowsky and Schweizer [7] provided the most general solutions for cone-constrained Markowitz’s problem including new effects resulting from the jumps in the price process. Lv, Wu and Yu [31] studied Markowitz’s problem with random horizon in an incomplete market setting. Xiong and Zhou [42], and Xiong, Xu and Zheng [41] investigated the problem under partial information. Zhou and Yin [47], Hu, Shi and Xu [20, 21] considered the problem under regime switching and trading constraints.

As a variant of Markowitz’s problem, the mean-variance (or quadratic) hedging problem was introduced by Duffie and Richardson [13] and Schweizer [38]. Pham [36] extended the problem to a general incomplete market with semimartingale price process. Gourieroux, Laurent and Pham [17] introduced Numéraire to the problem. The most general model was instigated by Cerny and Kallsen [3]. We refer to Schweizer [39] for an overview of the topic. Usually, the mean-variance portfolio selection and hedging problems are considered either for discounted prices or in the presence of a risk-free asset. Cerny, Czichowsky, and Kallsen [4] provided a solution to both problems that is symmetric and allows for all assets to be risky.

Stochastic LQ control method is widely used to study mean-variance portfolio selection and hedging problems. This method is extremely powerful when dealing with problems with trading constraints and random coefficients (see, e.g. [24, 28, 30, 45,46,47]), but less powerful when dealing with problems with state constraints such as bankruptcy prohibition. The latter kind of problems is often dealt by martingale method (which usually requires complete market setting) or by partial differential equation (PDE) method (which requires Markovian market setting). For instance, Bielecki, Jin, Pliska and Zhou [2] investigated continuous-time Markowitz’s problem with bankruptcy prohibition. Using martingale method, they turned the dynamic stochastic control problem into a static random variable chosen problem that was eventually solved by optimization method. Li and Xu [27] studied Markowitz’s problem with both trading and bankruptcy prohibition constraints by PDE method. Their idea is first to transform the problem into an equivalent one with only bankruptcy prohibition constraint, then to solve the latter by the method of [2]. Xia [40] established the relationship between Markowitz’s problem and the expected utility maximization problem with non-negative marginal utility in incomplete market with bankruptcy prohibition. Hou and Xu [19] examined the effect of intractable claims on the trading strategy in Markowitz’s problem by martingale approach.

The optimal trading strategies obtained in the aforementioned papers are typically trading continuously all the time, which are not consistent with real practice most of time. Dai, Xu and Zhou [8] studied Markowitz’s problem with proportional transaction costs by PDE method. To solve the associated Hamilton–Jacobi–Bellman (HJB) equation, they first derived a related double-obstacle PDE problem through an intuitive argument. The solvability of the latter PDE was completed resolved by PDE method so that they can get a classical solution to the original HJB equation. They showed that the optimal tradings only happen when the stock price arrives at a selling-stock boundary or at a buying-stock boundary. This is a discontinuous-time trading (DTT ) strategy which fits the real practice better than those continuous-time trading (CTT ) strategies suggested by most existing models.

All the aforementioned papers assume that there is no difference between the borrowing rate and saving rate in the market, namely the borrowing and saving rates are the same all the time even though they may be modeled as stochastic processes. But, as is well-known, a gap between the two rates always exists, which is fairly large sometimes, in practice. As borrowing rate is often higher than saving rate, it discourages/panelizes investors to borrow money. Different from a vast amount of no-gap-market models in the literature, only a very limited number of papers studied gap-market models. In the book Karatzas and Shreve [23], a utility maximization in a gap-market model is studied by martingale and duality methods. For continuous price processes, the mean-variance portfolio selection problem is rather close to the utility maximization problem. Although the quadratic functional is not always increasing, it can be shown that the optimal wealth process should stay always in the domain where the quadratic functional is strictly increasing and hence behaves like a utility function (see, Delbaen and Schachermayer [12]). Therefore, the method of Karatzas and Shreve [23] may be applied to Markowitz’s problem, but it cannot provide a description of the optimal borrowing, saving and all-in-stock regions such as their connectedness and monotonicity. Other investment and pricing problems are also studied in gap-market models. For instance, Fleming and Zariphopoulou [15], Xu and Chen [43] considered optimal investment and consumption problems; Bergman [1], Korn [25], and Cvitanic and Karatzas [6] studied option pricing problems; Guan [18] studied a utility maximization problem.

Fu, Lari-Lavassani and Li [16] is the only paper we can identify in the literature which tried to solve Markowitz’s problem in a continuous-time market with different borrowing and saving rates. They constructed a piecewise quadratic solution to the HJB equation, but did not verify if the solution is the value function of the original problem. Their constructed solution is not of \(C^{3,2}\) smooth, but we will show the value function is of \(C^{3,2}\) smooth in this paper, so [16] indeed did not get the right value function or the optimal strategy. Therefore, the problem is still open and we will fill this gap.

This paper investigates Markowitz’s portfolio selection problem in a continuous-time Black–Scholes market with different borrowing and saving rates. We show that the whole trading area is divided by a borrowing boundary and a saving boundary into three ascending trading regions, corresponding to the optimal strategies of borrowing money, putting all wealth in the stock and saving money. The existence of the three trading regions was already observed for utility maximization problem by Fleming and Zariphopoulou in [15]. We prove that these regions are connected and ordered, so that our results can provide the following financial insights. When an investor’s wealth is far from her target, she must borrow money to invest in the stock so as to maximize the chance to achieve her goal; by contrast, if her wealth is sufficiently close to her target, she does not need to invest all her wealth in the stock and should save some in the money account to reduce her risk; while in the middle all-in-stock region, she should keep all her wealth in the stock so that no trading is needed inside the region.

Compared to no-gap market models, the all-in-stock region is new. In the other two regions, the trading strategies are of the same form as the no-gap case, except for that one should use the borrowing rate in the borrowing-money region and the saving rate in the saving-money region. Therefore, our optimal strategy is a mixture of CTT strategy (as suggested by most continuous-time models) and DTT strategy (as suggested by models with transaction costs): one does not need to trade in the middle all-in-stock region, and has to continuously trade the stock in the borrowing-money and saving-money regions.

Although both the presence of transaction costs (such as [8, 10, 11]) and the presence of gap between the borrowing and saving rates lead to similar optimal DTT strategies, the reasons behind are fairly different. In transaction costs models, trading frequently directly increases transaction costs, so one should not trade all the time, leading to the existence of no-trading regions. According our gap-market model, one should not borrow money when the marginal cost of borrowing at a high rate is higher than the marginal benefit of extra leveraging, and one should not save money when the marginal benefit resulted from the low return is not high enough to compensate for giving up a better return-risk trade-off provided by the stock, so the existence of no-trading region is due to the gap between the borrowing and saving rates.

Mathematically speaking, it is very important to notice that the diverging of the borrowing and saving rates forces the wealth dynamics to become piecewise linear, and no longer linear. As a consequence, the stochastic LQ control theory cannot be applied and new stochastic control theory is called for to solve the problem. Indeed, one can apply stochastic LQ control methods to solve Markowitz’s problem only when the value function of the problem is of a quadratic form, in which case one reduces to determining the coefficients of quadratic function by solving the so-called Riccati equation. Because of the diverging of the borrowing and saving rates in our model, the associated HJB equation is a fully nonlinear PDE and does not admit any solution in quadratic form. Hence, the problem cannot reduce to solving some Riccati equation. By contrast, because of the infinite time horizon setting, the HJB equation in Fleming and Zariphopoulou [15] is an ordinary differential equation, which is easier to study than our PDE. Because of this, the method of [15] cannot be applied to our model. Instead, we adopt the PDE argument used in Dai and Yi [10] and Guan [18] to solve our problem. We first transform the associated HJB equation into a semi-linear parabolic PDE through an intuitive argument. Adopting some standard PDE tools including the truncation method, the Leray-Schauder fixed point theorem, the embedding theorem and the Schauder estimation, we derive a solution to the semi-linear parabolic PDE, from which we eventually construct a \(C^{3,2}\) smooth solution to the original HJB equation. Different from [10, 16, 18], we show that the constructed solution is indeed the value function to our mean-variance problem through a verification theorem. An optimal feedback strategy is also obtained during this process (where the smoothness of the value function plays an important role). The first-order smoothness of the borrowing and saving boundaries are obtained as well under some slightly stronger conditions on the market parameters.

The reminder of this paper is organized as follows: In Sect. 2, we formulate a mean-variance portfolio selection problem under different borrowing and saving rates. In Sect. 3, we present our main theoretical results including the smoothness of the value function and provide an optimal control to the problem. Numerical examples are also provided to justify our theoretical results. Sections 46 are devoted to the proofs of the main technical results. We first derive a semi-linear parabolic PDE from the original fully nonlinear HJB equation through an intuitive argument in Sect. 4; then show that the parabolic PDE has a classical solution by PDE method in Sect. 5; and Sect. 6 completes the proof of the main results presented in Sect. 3. Some concluding remarks are given in Sect. 7.

2 Model Formulation

We call a filtered complete probability space \((\Omega , {{\mathcal {F}}}, {{\mathbb {P}}}, \{{{\mathcal {F}}}_t\}_{t\ge 0})\) the financial market. And assume that the filtration \(\{{{\mathcal {F}}}_t\}_{t\ge 0}\) is generated by a standard one-dimensional Brownian motion \(\{W_t, t\ge 0\}\) defined in the probability space, augmented with all \({{\mathbb {P}}}\)-null sets.

The market consists of a risk-free money account and a continuously traded stock. The saving rate and the borrowing rate of the money account are different, denoted by \(r_1\) and \(r_2\), respectively. Economically speaking, the borrowing rate shall be higher than the saving rate. The stock price process \(S^1>0\) follows a geometric Brownian motion:

$$\begin{aligned} \textrm{d}S_t^1=S_t^1\big (\mu \textrm{d}t+\sigma \textrm{d}W_t\big ), \end{aligned}$$

where \(\mu \) is the appreciation rate, and \(\sigma \) is the volatility rate of the stock. We assume that the market parameters \(r_1\), \(r_2\), \(\mu \) and \(\sigma \) are constants and satisfy \(\sigma >0\) and

$$\begin{aligned} \mu>r_2>r_1. \end{aligned}$$
(1)

Remind that \(r_1\), \(r_2\), \(\mu \) are not necessary to be positive, which happens in many financial markets right now.

Consider an agent (“She”) faced with an initial endowment x and an investment horizon [tT]. Let \(X_s\) and \(\pi _s\) denote her total wealth and dollar amount invested in the stock at time s, respectively. When \(X_s>\pi _s\), the agent saves the extra money of the amount \(X_s-\pi _s\) in the money account to earn interests at the saving rate \(r_1\); whereas when \(X_s<\pi _s\), the agent borrows the money of the amount \(\pi _s-X_s\) from the money account at the borrowing rate \(r_2\). Assume that the trading of shares is self-financed and takes place continuously, and there are no transaction costs or taxes. Then, the wealth process \(X_s\) of the agent satisfies the following stochastic differential equation (SDE):

$$\begin{aligned} \begin{array}{rl} \textrm{d}X_s&{}=\big [\big (r_1\chi _{X_s>\pi _s}+r_2\chi _{X_s<\pi _s}\big )(X_s-\pi _s)+\mu \pi _s\big ]\textrm{d}s+\sigma \pi _s\textrm{d}W_s,\;\; t\le s\le T,\\ X_t&{}=x. \end{array} \end{aligned}$$
(2)

Here, \(\chi _{S}\) is the indicator function for a statement S: it is equal to 1 if the statement S is true, and 0 otherwise.

We call the process \(\pi =\{\pi _s\}_{s\in [t,T]}\), a portfolio of the agent. Define the set of admissible portfolios as

$$\begin{aligned} \Pi _t:=L^2_{{\mathcal {F}}}([t,T];{{\mathbb {R}}}), \end{aligned}$$

where \(L^2_{{\mathcal {F}}}([t,T];{\mathbb {R}})\) denotes the set of all \({\mathbb {R}}\)-valued, \({{\mathcal {F}}}_s\)-progressively measurable stochastic processes \(f(\cdot )\) on [tT] with \({{\mathbb {E}}}\int _t^T|f(s)|^2\textrm{d}s<+\infty \). For any admissible portfolio \(\pi \in \Pi _t\), the SDE (2) admits a unique strong solution \(X_{\cdot }\) on [tT].

Given a constant target \(d>0\), the agent’s objective is to find an admissible portfolio \(\pi ^*\in \Pi _t\) to solve the following portfolio selection problem

$$\begin{aligned} V(x,t)=\inf \limits _{\pi \in \Pi _t}{{\mathbb {E}}}\big [(X_T-d)^2 \mid X_t=x \big ],\quad (x,t)\in Q^T, \end{aligned}$$
(3)

where

$$\begin{aligned} Q^T=\big \{(x,t)\mid \;xe^{r_1(T-t)}<d,\;0\le t< T\big \}. \end{aligned}$$

If such an admissible portfolio \(\pi ^*\in \Pi _t\) exists, we call it an optimal portfolio for the problem (3). The agent’s target d shall be higher than the outcome of saving all her money in the money account, so we put the constraint \(xe^{r_1(T-t)}<d\), leading to the above admissible region \(Q^T\).

The main aim of this paper is to determine the optimal value function V(xt) and find an optimal portfolio to the stochastic control problem (3).

Remark 2.1

The standard Markowitz’s problem can be formulated as

$$\begin{aligned} \inf \limits _{\pi \in \Pi _t}&\quad \textrm{Var}(X_T),\quad \mathrm {s.t.}\quad {{\mathbb {E}}}\big [X_T\big ]=z,\quad X_t=x, \end{aligned}$$
(4)

where \(z >0\) and \(xe^{r_1(T-t)}<z\). Let \(V_{MV}(x,t, z)\) denote its optimal value. Then, the set

$$\begin{aligned} \Big \{\big (\sqrt{V_{MV}(x,t, z)},\; z\big ): z>xe^{r_1(T-t)}\Big \} \end{aligned}$$

is called the efficient mean-variance frontier. By the Lagrange duality theorem (see Luenberger [26]), we have

$$\begin{aligned} V_{MV}(x,t, z)=\sup _{d>z} \big [V(x,t,d)-(d-z)^2\big ], \end{aligned}$$
(5)

where \(V(x,t,d)=V(x,t)\) defined by (3). Indeed, the optimal d is determined by

$$\begin{aligned} \frac{\partial }{\partial d}V(x,t,d)=2(d-z),\quad d>z. \end{aligned}$$
(6)

In order to determine the efficient mean-variance frontier, it is unnecessary to solve the optimization problem in (5), or equivalently, to solve (6). Indeed, by (5) and (6), the efficient mean-variance frontier can be expressed as

$$\begin{aligned} \bigg \{\bigg (\sqrt{V(x,t, d)-\frac{1}{4}\Big (\frac{\partial }{\partial d}V(x,t,d)\Big )^2}, \; d-\frac{1}{2}\frac{\partial }{\partial d}V(x,t,d)\bigg ): d>xe^{r_1(T-t)}\bigg \}. \end{aligned}$$

By the above relationship, it suffices to solve the portfolio selection problem (3) in order to solve the standard Markowitz’s problem (4). Our proceeding analysis will also show that numerically solving V(xtd) for each fixed d can reduce to solving the approximation equation in a bounded domain (54). Clearly, the latter can be computed by standard such as finite difference method.

Remark 2.2

When bankruptcy is prohibited in the market, we need to replace \(Q^T\) by a bounded domain

$$\begin{aligned} \big \{(x,t)\mid \;0<xe^{r_1(T-t)}<d,\;0\le t< T\big \}. \end{aligned}$$

Meanwhile, we need to put an extra boundary condition \(V(0,t)=d^2\), \(0\le t< T\) into the HJB equation (7) below. Our argument, after minor adjustment, still works for that case. We encourage the interested reader to write down the details.

3 Main Results

Using the standard viscosity theory (see, e.g. Grandall and Lions [5], Yong and Zhou [44]), one can prove that the value function of (3) is a viscosity solution to the following HJB equation with boundary and terminal conditions:

$$\begin{aligned} \begin{array}{ll} V_t+\inf \limits _{\pi }\Big (\frac{1}{2}\sigma ^2\pi ^2V_{xx}+\Big ((r_1\chi _{\pi<x}+r_2\chi _{\pi > x})(x-\pi )+\mu \pi \Big )V_x\Big )=0\quad \hbox {in}\quad Q^T,\\ V(e^{-r_1(T-t)} d,t)=0,\quad 0\le t<T,\\ V(x,T)=(x-d)^2,\quad x< e^{-r_1(T-t)} d. \end{array} \end{aligned}$$
(7)

This paper does not adopt the viscosity approach because viscosity solution usually does not lead to good smoothness of the value function. Instead, we will prove that the above HJB equation (7) admits a classical solution V (see the precise definition in Theorem 3.1 below) by PDE method directly. This together with a verification result (see Theorem 3.2 below) can guarantee that V is the value function of the problem (3).

Theorem 3.1

(Solvability of the HJB Equation (7)) There exists a solution

$$\begin{aligned} V\in C^{3,2}\big (\overline{Q^T}\setminus \{x=e^{-r_1 (T-t)}d\}\big )\bigcap C\big (\overline{Q^T}\big ) \end{aligned}$$

to the HJB equation (7) such that

$$\begin{aligned}&V_x<0 , \end{aligned}$$
(8)
$$\begin{aligned}&V_{xx}>0 \end{aligned}$$
(9)

in \(Q^T\), and

$$\begin{aligned} \lim \limits _{x\rightarrow e^{-r_1 (T-t)}d-}V_x=0,\quad \lim \limits _{x\rightarrow -\infty }V_x=-\infty ,\quad \forall \;t\in [0,T]. \end{aligned}$$
(10)

Proof

We leave the proof to Sect. 6.1. \(\square \)

Figure 1 illustrates the function V(xt), based on Theorem 3.1.

Fig. 1
figure 1

The solution of the HJB Equation (7): V(xt) with fixed t

3.1 Optimal Portfolio

Let V be given in Theorem 3.1 and we divide the whole trading area

$$\begin{aligned} Q^T=\big \{(x,t)\mid \;xe^{r_1(T-t)}<d,\;0\le t< T\big \} \end{aligned}$$

into three regions:

$$\begin{aligned} {\textbf {Borrowing-money Region}} \, {\mathfrak {B}}&:=\Big \{(x,t)\in Q^T\;\Big |\;-\frac{\mu -r_2}{\sigma ^2}\frac{V_{x}}{V_{xx}}>x\Big \},\\ {\textbf {All-in-stock Region}} \, {\mathfrak {N}}&:=\Big \{(x,t)\in Q^T\;\Big |\;-\frac{\mu -r_2}{\sigma ^2}\frac{V_{x}}{V_{xx}}\le x\le -\frac{\mu -r_1}{\sigma ^2}\frac{V_{x}}{V_{xx}}\Big \}, \\ {\textbf {Saving-money Region}} \, {\mathfrak {S}}&:=\Big \{(x,t)\in Q^T\;\Big |\;-\frac{\mu -r_1}{\sigma ^2}\frac{V_{x}}{V_{xx}}<x\Big \}. \end{aligned}$$

The following result shows that they are connected regions and separated by two free boundaries.

Proposition 3.1

(Optimal Trading Regions) We have

$$\begin{aligned} {\mathfrak {B}}&=\Big \{(x,t)\mid x<B(t),\;t\in [0,T)\Big \},\\ {\mathfrak {N}}&=\Big \{(x,t)\mid B(t)\le x\le L(t),\;t\in [0,T)\Big \},\\ {\mathfrak {S}}&=\Big \{(x,t)\mid L(t)<x<e^{-r_1(T-t)} d,\;t\in [0,T)\Big \}, \end{aligned}$$

where \(B(\cdot )\) and \(L(\cdot )\) are, respectively, called the borrowing and saving boundaries, defined by

$$\begin{aligned} B(t):=V_x^{-1}(\cdot ,t)(-e^{b(T-t)}),\quad L(t):=V_x^{-1}(\cdot ,t)(-e^{l(T-t)}), \end{aligned}$$

with \(V_x^{-1}(\cdot ,t)\) being the inverse with respect to (w.r.t.) the spatial argument x, and the two functions \(b(\cdot )\) and \(l(\cdot )\) are given by (20) and (21). Moreover, we have the estimate

$$\begin{aligned} 0<B(t)<L(t)<e^{-r_1(T-t)} d,\quad t\in [0,T], \end{aligned}$$

and the terminal values

$$\begin{aligned} B(T)=\frac{\mu -r_2}{\sigma ^2+\mu -r_2}d,\quad L(T)=\frac{\mu -r_1}{\sigma ^2+\mu -r_1}d. \end{aligned}$$

Proof

We leave the proof to Sect. 6.2. \(\square \)

Figure 2 illustrates the borrowing and saving boundaries, based on Proposition 3.1.

Fig. 2
figure 2

The optimal trading regions

Remark 3.1

In fact,

$$\begin{aligned} B(t)=\sup \Big \{x\;\Big |\;-\frac{\mu -r_2}{\sigma ^2}\frac{V_{x}}{V_{xx}}>x,\; (x,t)\in Q^T\Big \}, \end{aligned}$$

and

$$\begin{aligned} L(t)=\inf \Big \{x\;\Big |\;-\frac{\mu -r_1}{\sigma ^2}\frac{V_{x}}{V_{xx}}<x, \; (x,t)\in Q^T\Big \}. \end{aligned}$$

We will also establish the first-order smoothness of the boundaries \(B(\cdot )\) and \(L(\cdot )\) under certain conditions (see Proposition 5.1).

Theorem 3.2

(Verification Theorem) The function V given in Theorem 3.1 is the same as the value function V defined by (3). Moreover, the optimal portfolio to the problem (3), given in the feedback form, is

$$\begin{aligned} \pi (x,t)= {\left\{ \begin{array}{ll} -\frac{\mu -r_2}{\sigma ^2}\frac{V_{x}(x,t)}{V_{xx}(x,t)}, &{} (x,t)\in {\mathfrak {B}}, \\ x, &{} (x,t)\in {\mathfrak {N}}, \\ -\frac{\mu -r_1}{\sigma ^2}\frac{V_{x}(x,t)}{V_{xx}(x,t)}, &{} (x,t)\in {\mathfrak {S}}. \end{array}\right. } \end{aligned}$$

Proof

We leave the proof to Sect. 6.3. \(\square \)

We have the following financial findings from the above theoretical results. When one’s wealth is far from her target (i.e. \(x<B(t)\)), she must borrow money to invest in the stock so as to maximize the chance to achieve her goal d. By contrast, if her wealth is sufficiently close to her target (i.e. \(x>L(t)\)), she does not need to invest all her wealth in the stock and can save some in the money account to reduce her risk. In the middle range (i.e. \(B(t)\le x\le L(t)\)), she does not need to borrow or save money, and shall invest all her wealth in the stock so that no trading happens there. Therefore, we see the optimal strategy is a mixture of CTT strategy in the first two scenarios (as suggested by most continuous-time models) and DTT strategy in the last scenario (as suggested by models with transaction costs).

Also, the optimal portfolio is long in the stock in all scenarios, so it is never optimal to short sale the stock. As a consequence, the portfolio is still optimal if we restrict us to the control set with no-shorting constraint:

$$\begin{aligned} \Big \{\pi _s\in L^2_{{\mathcal {F}}}([t,T];{{\mathbb {R}}})\;\Big |\; \pi _s\ge 0,\; s\in [t,T]\Big \} \end{aligned}$$

in the problem (3).

When \(r_2\rightarrow r_1\), the optimal feedback portfolio reduces to

$$\begin{aligned} \pi (x,t)=-\frac{\mu -r_1}{\sigma ^2} \frac{V_{x}(x,t)}{V_{xx}(x,t)}. \end{aligned}$$

This recovers the classical optimal portfolio when there is no gap between the borrowing and saving rates. In this case, continuously tradings happen all the time, and the all-in-stock region is a zero measure set.

3.2 Numerical Study

We now present numerical examples to depict the behaviors of the borrowing and saving boundaries as well as the optimal value when the borrowing and saving rates change.

Fig. 3
figure 3

The borrowing and saving boundaries \(B(\cdot )\) and \(L(\cdot )\) under various saving rates \(r_1\) and borrowing rates \(r_2\)

Figure 3 plots the saving and borrowing boundaries under various pairs of saving and borrowing rates \((r_1, r_2)\), where \(d=10\), \(\mu =0.15\), \(\sigma ^2=0.10\) and \(T=3\) are fixed. The borrowing boundary is always on the left of the saving boundary. As the gap between the borrowing and saving rates becomes smaller, the borrowing boundary moves to the right whereas the saving boundary moves to the left, becoming closer. Thus, Borrowing-money Region \({\mathfrak {B}}\) and Saving-money Region \({\mathfrak {S}}\) expand, whereas All-in-stock Region \({\mathfrak {N}}\) shrinks. The latter becomes a curve when the gap between the borrowing and saving rates disappears, in which case, the optimal trading strategy becomes a continuously trading one all the time. This is consistent with the common financial intuition that one should trade more frequently if the gap becomes smaller, because the marginal benefit of extra leveraging becomes higher as the costs of borrowing money become less.

Fig. 4
figure 4

The value function V under various saving rates \(r_1\) and borrowing rates \(r_2\)

The left and right panels of Fig. 4 display, respectively, the value function against the wealth position and time under various pairs of saving and borrowing rates \((r_1, r_2)\), where \(d=10\), \(\mu =0.15\), \(\sigma ^2=0.10\) and \(T=3\) are the same as in Fig. 3. Intuitively speaking, the smaller the gap between the borrowing and saving rates, the smaller the risk (i.e. the value function). Both the left and right panels of Fig. 4 confirm this. We also see from the left panel that the bigger the wealth position the smaller the risk, since bigger wealth position is closer to the fixed target. Meanwhile, the right panel demonstrates that the shorter the time to the maturity, the higher the risk, since shorter time to the maturity means less trading opportunities and less likely to achieve the goal.

Fig. 5
figure 5

The borrowing and saving boundaries \(B(\cdot )\) and \(L(\cdot )\) under various return rates \(\mu \)

Figure 5 depicts the borrowing and saving boundaries under various return rates \(\mu \), where \(r_1=0.02\), \(r_2=0.08\), \(\sigma ^2=0.10\) and \(d=10\) are fixed. These pictures show that the two boundaries move to the right as \(\mu \) increases. It seems that the closer the time to the maturity day, the faster the speed to move to the right. As the return rate of the stock increases, the role of the gap should become less important, encouraging one in a bad wealth position to borrow money to invest in the stock, discouraging one in a good wealth position to save money. Hence, as \(\mu \) increases, Borrowing-money Region \({\mathfrak {B}}\) shall expand, whereas Saving-money Region \({\mathfrak {S}}\) and All-in-stock Region \({\mathfrak {N}}\) shall shrink. The above pictures confirm this financial intuition.

Fig. 6
figure 6

The borrowing and saving boundaries \(B(\cdot )\) and \(L(\cdot )\) under various volatility rates \(\sigma \)

Figure 6 displays the borrowing and saving boundaries under various volatility rates \(\sigma \), where \(r_1=0.02\), \(r_2=0.08\), \(\mu =0.15\) and \(d=10\) are the same as Fig. 5. Similar to Fig. 5, the borrowing and saving boundaries move to the right as \(\sigma \) decreases. This is not surprising since no matter increasing \(\mu \) or decreasing \(\sigma \) will lead to an increment in the Shape ratio of the stock, making the stock more attractive to the investor. Therefore, Borrowing-money Region \({\mathfrak {B}}\) expands, and Saving-money Region \({\mathfrak {S}}\) shrinks, that is, one tends to borrow money to invest in the stock and is less likely to sell the stock to earn the saving rate. However, opposite to Fig. 5, All-in-stock Region \({\mathfrak {N}}\) expends here. We think, as \(\sigma \) decreases, the uncertainty becomes less, hence less frequently tradings are enough to achieve the goal. In other words, one has to trade more frequently to control the risk if \(\sigma \) increases.

Fig. 7
figure 7

The optimal portfolio \(\pi (x,t)\) under various times t

Figure 7 displays the optimal proportion \(\pi (x,t)/x\) and the optimal portfolio \(\pi (x,t)\) under various times t, where \(r_1=0.02\), \(r_2=0.08\), \(d=10\), \(\mu =0.15\), \(\sigma =0.15\) and \(T=3\) are fixed. The above pictures show that \(\pi (x,t)=x\) in All-in-stock Region \({\mathfrak {N}}\). Figure 7b, c show that, as wealth x increases to the discounted target \(e^{-r_1(T-t)}d\), the net amount \(\pi (x,t)\) invested in the stock is not globally monotone increasing or decreasing. Indeed, it is first decreasing in Borrowing-money Region \({\mathfrak {B}}\), then increasing All-in-stock Region \({\mathfrak {N}}\), and finally decreasing to zero in Saving-money Region \({\mathfrak {S}}\). However, we can observe from Fig. 7a that the proportion invested in the stock is globally monotone decreasing to zero as x increases. This is not surprising because one is expected to invest less proportion in the stock to reduce the risk as wealth approaches the discounted target.

Figure 7a also shows that the proportion invested in the stock becomes bigger in Saving-money Region \({\mathfrak {S}}\) as the time to maturity is closer. This is because one has to take a higher risk when there is less time available to achieve the target. By contrast, the behavior of the optimal proportion in Borrowing-money Region \({\mathfrak {B}}\) is quite complicate so that we cannot draw the same conclusion. But we can see that the slope of the optimal proportion in Borrowing-money Region \({\mathfrak {B}}\) becomes flatter as time approaches maturity, so the less time to maturity, the less sensitive to wealth position. Meanwhile, an opposite phenomenon is observed in Saving-money Region \({\mathfrak {S}}\).

The remaining part of this paper is devoted to the rigorous proofs for the theoretical results stated in Sect. 3.

4 Related Semi-Linear PDE

To study the fully nonlinear PDE (7), in this section, we transform it into a semi-linear PDE (17) that satisfies the usual structural conditions by a heuristic argument. Many a priori estimates of the solution will be used in this process. In the following Sect. 5, we will rigorously prove the existence and uniqueness of the solution to the PDE (17) as well as those prior estimates used, and finally we will construct a solution to the PDE (7) from the solution to the PDE (17) in Sect. 6.

Our argument in the rest part of this section is intuitive and it will lead to a more tractable PDE (17) which will service as our starting point of the theoretical treatment in the next section.

Our subsequent argument is based on the following hypotheses

$$\begin{aligned} V_x < 0,\quad V_{xx} > 0,\quad (x,t)\in Q^T, \end{aligned}$$
(11)

and

$$\begin{aligned} \lim \limits _{x\rightarrow e^{-r_1 (T-t)}d-}V_x=0,\quad \lim \limits _{x\rightarrow -\infty }V_x=-\infty ,\quad t\in [0,T].\end{aligned}$$
(12)

These hypotheses will be eventually proved in Theorem 3.1.

In order to solve the optimization problem in the HJB equation (7), write

$$\begin{aligned} H(\pi ):=\frac{1}{2}\sigma ^2\pi ^2V_{xx}+\big ((r_1\chi _{x>\pi }+r_2\chi _{x<\pi })(x-\pi )+\mu \pi \big )V_x, \end{aligned}$$

and

$$\begin{aligned} \pi ^*_i:=-a_i\frac{V_{x}}{V_{xx}},\quad a_i:=\frac{\mu -r_i}{\sigma ^2},\quad i=1,2. \end{aligned}$$

By our assumption (1), \(a_1>a_2>0\), so that it follows from (11) that \(\pi ^*_1>\pi ^*_2\). Consequently, only three possible scenarios can happen, which are demonstrated in Fig. 8.

Fig. 8
figure 8

Three possible cases

Correspondingly, we have

$$\begin{aligned} \hbox {argmin}_{\pi } H(\pi )= {\left\{ \begin{array}{ll} -a_1\frac{V_{x}}{V_{xx}}, &{}-a_1\frac{V_{x}}{V_{xx}}<x,\\ x, &{}-a_2\frac{V_{x}}{V_{xx}}\le x\le -a_1\frac{V_{x}}{V_{xx}},\\ -a_2\frac{V_{x}}{V_{xx}}, &{}-a_2\frac{V_{x}}{V_{xx}}>x. \end{array}\right. } \end{aligned}$$

Inserting this into (7), we get

$$\begin{aligned}&-V_t+\frac{\sigma ^2 a_1^2}{2}\frac{V_x^2}{V_{xx}}+(\sigma ^2a_1-\mu )xV_x=0, \quad -a_1\frac{V_{x}}{V_{xx}}<x,\nonumber \\&-V_t-\frac{\sigma ^2}{2}x^2V_{xx}-\mu xV_x=0, -a_2\frac{V_{x}}{V_{xx}}\le x\le -a_1\frac{V_{x}}{V_{xx}},\nonumber \\&-V_t+\frac{\sigma ^2 a_2^2}{2}\frac{V_x^2}{V_{xx}}+(\sigma ^2a_2-\mu )xV_x=0, -a_2\frac{V_{x}}{V_{xx}}>x,\nonumber \\&V(e^{-r_1(T-t)} d,t)=0, 0\le t<T,\nonumber \\&V(x,T)=(x-d)^2, x<d. \end{aligned}$$
(13)

This is a fully nonlinear free boundary problem that does not satisfy the general structural conditions of nonlinear parabolic equation, so it is hard to apply the existing results to study it directly. We need to rewrite it in a more tractable form.

By (11), V should be a convex function. This motives us to apply the dual transformation (see, e.g., Pham [35]) to simplify (13). To this end, let

$$\begin{aligned} v(y,t):=\inf \limits _{x< e^{-r_1(T-t)}d}\big (V(x,t)+xy\big ),\quad y>0,\;\;0\le t\le T. \end{aligned}$$

Thanks to the hypotheses (11) and (12), we get \(v(0,t)=0\). By (12), for each fixed \(t\in [0,T]\), the optimal x corresponding to y is

$$\begin{aligned} x=x(y,t):=V_x^{-1}(\cdot ,t)(-y),\quad y>0, \end{aligned}$$

where \(V_x^{-1}(\cdot ,t)\) is the inverse of \(V_x(\cdot ,t)\). This gives the following correspondence between v(yt) and V(xt),

$$\begin{aligned} v(y,t)&=V(x(y,t),t)+x(y,t)y,\\ v_y(y,t)&=V_x(x(y,t),t)x_y(y,t)+y x_y(y,t)+x(y,t)=x(y,t),\\ v_{yy}(y,t)&=x_y(y,t)=\frac{-1}{V_{xx}(x(y,t),t)},\\ v_t(y,t)&=V_t(x(y,t),t)+V_x(x(y,t),t)x_t(y,t)+y x_t(y,t)=V_t(x(y,t),t). \end{aligned}$$

It then follows from (13) that

$$\begin{aligned}&-v_t-\frac{1}{2}\sigma ^2 a_1^2y^2v_{yy}-(\sigma ^2a_1-\mu ) yv_y=0, -\frac{v_y}{v_{yy}}>a_1y,\nonumber \\&-v_t+\frac{\sigma ^2}{2}\frac{v_y^2}{v_{yy}}+\mu yv_y=0, a_2y\le -\frac{v_y}{v_{yy}}\le a_1y,\nonumber \\&-v_t-\frac{1}{2}\sigma ^2 a_2^2y^2v_{yy}-(\sigma ^2a_2-\mu ) yv_y=0, -\frac{v_y}{v_{yy}}<a_2y,\nonumber \\&v(0,t)=0, 0\le t<T,\nonumber \\&v(y,T)=-\frac{1}{4}y^2+d y, y>0. \end{aligned}$$
(14)

Now we introduce

$$\begin{aligned} u:=-v_y. \end{aligned}$$

After differentiating (14) w.r.t. y, we obtain an equation for u:

$$\begin{aligned}&{-}u_t{-}\frac{1}{2}\sigma ^2 a_1^2y^2u_{yy}{+}(-\sigma ^2a_1^2-\sigma ^2a_1+\mu )yu_y+(\mu -\sigma ^2a_1)u{=}0, -\frac{u}{u_y}>a_1y,\nonumber \\&{-}u_t{-}\frac{\sigma ^2}{2}\big (\frac{u}{u_y}\big )^2u_{yy}{+}\sigma ^2 u+\mu yu_y{+}\mu u{=}0, a_2y\le -\frac{u}{u_y}\le a_1y,\nonumber \\&-u_t-\frac{1}{2}\sigma ^2 a_2^2y^2u_{yy}{+}(-\sigma ^2a_2^2{-}\sigma ^2a_2{+}\mu )yu_y+(\mu -\sigma ^2a_2)u{=}0, -\frac{u}{u_y}<a_2y,\nonumber \\&u(y,T){=}\frac{1}{2}y-d, y>0. \end{aligned}$$
(15)

Making a transformation \(u(y,t)=w(z,s)\) for \(s=T-t\), \(z=\ln y\), we get

$$\begin{aligned} u_t=-w_s,\quad u_y=w_z\frac{1}{y},\quad u_{yy}=\big (w_{zz}-w_z\big )\frac{1}{y^2}, \end{aligned}$$

so that (15) becomes

$$\begin{aligned}&w_s-\frac{1}{2}\sigma ^2 a_1^2w_{zz}+\big (\mu -\frac{1}{2}\sigma ^2a_1^2-\sigma ^2a_1\big )w_z+(\mu -\sigma ^2a_1)w=0, -\frac{w}{w_z}>a_1,\nonumber \\&w_s-\frac{\sigma ^2}{2}\Big (\frac{w}{w_z}\Big )^2\big (w_{zz}-w_z\big )+\sigma ^2 w+\mu w_z+\mu w=0, a_2\le -\frac{w}{w_z}\le a_1,\nonumber \\&w_s-\frac{1}{2}\sigma ^2 a_2^2w_{zz}+\big (\mu -\frac{1}{2}\sigma ^2a_2^2-\sigma ^2a_2\big )w_z+(\mu -\sigma ^2a_2)w=0, -\frac{w}{w_z}<a_2,\nonumber \\&w(z,0)=\frac{1}{2}e^z-d, z\in {{\mathbb {R}}}. \end{aligned}$$
(16)

For convenience, we define a function

$$\begin{aligned} A(\xi ):=\min \big \{\max \{a_2,-\xi \}, a_1\big \}= {\left\{ \begin{array}{ll} a_1, &{}-\xi >a_1, \\ -\xi , &{} a_2\le -\xi \le a_1,\\ a_2, &{}-\xi <a_2. \end{array}\right. } \end{aligned}$$

It is clearly a 1-Lipschitz-continuous bounded decreasing function. Now we can rewrite (16) in a compact form as an initial value problem

$$\begin{aligned}&w_s-{{\mathcal {T}}}w=0 \quad \hbox {in}\quad Q_T:={{\mathbb {R}}}\times (0,T],\nonumber \\&w(z,0)=\frac{1}{2}e^z-d,\quad z\in {{\mathbb {R}}}, \end{aligned}$$
(17)

where

$$\begin{aligned} {{\mathcal {T}}}w:=\frac{1}{2}\sigma ^2A^2\Big (\frac{w}{w_z}\Big )w_{zz} -\Big [\mu -\frac{1}{2}\sigma ^2A^2\Big (\frac{w}{w_z}\Big )-\sigma ^2A\Big (\frac{w}{w_z}\Big )\Big ]w_z -\Big [\mu -\sigma ^2A\Big (\frac{w}{w_z}\Big )\Big ]w. \end{aligned}$$

By definition we have

$$\begin{aligned} 0<a_2\le A(\cdot )\le a_1, \end{aligned}$$

so (17) is a semi-linear parabolic PDE, which satisfies the usual structural conditions. We will study its solvability and properties in the next section.

5 Solvability of the PDE (17)

We have got a semi-linear parabolic PDE (17) through an intuitive argument in the previous section. From now on, we do a rigorous analysis and focus on the solvability and properties of the PDE (17) in this section.

We first introduce several constants that will be used throughout the paper:

$$\begin{aligned} \theta _1:=\sigma ^2 a_1^2-2r_1,\quad \theta _2:=\sigma ^2 a_2^2-2r_2, \end{aligned}$$

and

$$\begin{aligned} k:=\max \Big \{2\sigma ^2 a_1+4\sigma ^2 a_1^2,\;\theta _1\Big \}, \quad \kappa :=2\mu +\sigma ^2 (3a_1+1)(a_1+1). \end{aligned}$$

Our main theoretical result is stated as follows:

Theorem 5.1

There exists a solution \(w\in C^{2+\alpha ,1+\frac{\alpha }{2}} \big ({{\mathbb {R}}}\times [0,T]\big )\) (for some \(\alpha \in (0,1)\)) to the PDE (17) such that

$$\begin{aligned} \frac{1}{2} e^{\theta _2 s} e^z-e^{-r_1 s} d\le&w \le \frac{1}{2} e^{\theta _1 s} e^z-e^{-r_2 s} d, \end{aligned}$$
(18)

and

$$\begin{aligned} \frac{1}{2}e^{-\kappa s} e^z\le&w_z\le \frac{1}{2}e^{k s}e^z. \end{aligned}$$
(19)

Proof

The proof, which needs some results of Sobolev space and a priori estimation method of parabolic equations, is cumbersome, so we put it in Appendix 1. \(\square \)

In the rest part of this paper, we fix a solution w as in Theorem 5.1. Based on it, we will construct solutions to (15), (14), (13) and (7) in the following subsections. In particular, Theorem 3.2 will ensure such w is indeed unique.

Remark 5.1

The exact values of \(\theta _1\), \(\theta _2\), k and \(\kappa \) in Theorem 5.1 are not important. We just need to make sure that w and \(w_z\) are growth exponentially in z, which will suffice to ensure such solution w to (17) is unique.

5.1 Free Boundaries of (17)

In order to study the properties of (17), we define three sets

$$\begin{aligned} {{\mathcal {B}}}&:=\Big \{(z,s)\in Q_T\;\Big |\;-\frac{w}{w_z}< a_2\Big \}, \\ {{\mathcal {N}}}&:=\Big \{(z,s)\in Q_T\;\Big |\;a_2\le -\frac{w}{w_z}\le a_1\Big \}, \\ {{\mathcal {S}}}&:=\Big \{(z,s)\in Q_T\;\Big |\;-\frac{w}{w_z}> a_1\Big \}, \end{aligned}$$

and define two free boundaries

$$\begin{aligned} b(s)&:=\;\sup \Big \{z\in {{\mathbb {R}}}\;\Big |\;-\frac{w}{w_z}(z,s)\ge a_2\Big \}\nonumber \\ {}&=\sup \big \{z\in {{\mathbb {R}}}\mid (w+a_2 w_z)(z,s)\le 0\big \},\quad s\in (0,T], \end{aligned}$$
(20)
$$\begin{aligned} l(s)&:=\inf \Big \{z\in {{\mathbb {R}}}\;\Big |\;-\frac{w}{w_z}(z,s)\le a_1\Big \}\nonumber \\ {}&=\inf \big \{z\in {{\mathbb {R}}}\mid (w+a_1 w_z)(z,s)\ge 0\big \},\quad s\in (0,T], \end{aligned}$$
(21)

where we used \(w_z>0\) to get the second expressions in above. They will be used to study the properties of the optimal portfolio for our original problem (3). Because \(a_1>a_2\) and \(w_z>0\), we see \(b(s)>l(s)\) for all \(s\in (0,T]\).

We have the following estimates for the two boundaries \(b(\cdot )\) and \(l(\cdot )\).

Lemma 5.1

For any \(s\in (0,T]\),

$$\begin{aligned} b(s)< \ln (2d)-(r_1+\theta _2)s. \end{aligned}$$
(22)

Proof

If \(z\ge \ln (2d)-(r_1+\theta _2)s\), then by \(a_2>0\) and the lower bounds in (18) and (19) we have

$$\begin{aligned} w(z,s)+a_2w_z>\frac{1}{2} e^{\theta _2 s} e^z-e^{-r_1 s} d\ge 0 \end{aligned}$$

implying (22). \(\square \)

Lemma 5.2

For any \(s\in (0,T]\),

$$\begin{aligned} l(s)\ge \ln (2d)-\ln (a_1+e^{(\theta _2-k)s})-(r_1+k)s. \end{aligned}$$
(23)

Proof

If \(z<\ln (2d)-\ln (a_1+e^{(\theta _1-k)s})-(r_2+k)s\), by the upper bounds in (18) and (19) we have

$$\begin{aligned} w+a_1w_z\le & {} \frac{1}{2} e^{\theta _1 s} e^z-e^{-r_2 s} d+a_1\frac{1}{2}e^{k s}e^z\\= & {} \frac{1}{2}e^{k s}e^z\big (e^{(\theta _1-k)s}-2e^{-(r_2+k) s-z} d+a_1\big )<0, \end{aligned}$$

which implies (23). \(\square \)

Define two functions

$$\begin{aligned} I:=w+a_2 w_z \end{aligned}$$

and

$$\begin{aligned} f(s):=\sup \{z\in {{\mathbb {R}}}\mid I(z,s)< 0\},\quad s\in (0,T]. \end{aligned}$$

By definition, we have \(f(s)\le b(s)\).

Lemma 5.3

If \(f_*(s_0-)< f^*(s_0)\) for some \(s_0\in (0,T]\), then

$$\begin{aligned} I(z,s_0)=0,\quad \forall z\in (f_*(s_0-),f^*(s_0)), \end{aligned}$$
(24)

where \(f_*(s_0-):=\liminf \limits _{s\rightarrow s_0-}f(s)\) and \(f^*(s_0):=\limsup \limits _{s\rightarrow s_0}f(s)\).

Proof

By the continuity of I and the definition of f(s), we have

$$\begin{aligned} I(z,s_0)\ge 0,\quad z\ge f_*(s_0-). \end{aligned}$$
(25)

If (24) were not true, then there would exits \(z_0\in (f_*(s_0-),f^*(s_0))\) such that \(I(z_0,s_0)>0\). Owing to the continuity, we would have

$$\begin{aligned} I(z_0,s)>0,\;s\in (s_0-\varepsilon ,s_0+\varepsilon ) \end{aligned}$$
(26)

for sufficiently small \(\varepsilon >0\). Since \(z_0>f_*(s_0-)\), we could suppose \(z_0>f(s_0-\varepsilon )\) so that

$$\begin{aligned} I(z,s_0-\varepsilon )\ge 0,\quad z>z_0. \end{aligned}$$
(27)

Now we would prove \(I> 0\) in

$$\begin{aligned} \mathcal{D}:=(z_0,+\infty )\times (s_0-\varepsilon ,s_0+\varepsilon ). \end{aligned}$$

Indeed, suppose \(\psi \) is the unique solution to

$$\begin{aligned}&\psi _s-\frac{1}{2}\sigma ^2 a_2^2\psi _{zz}+\big (\mu -\frac{1}{2}\sigma ^2a_2^2-\sigma ^2a_2\big )\psi _z+(\mu -\sigma ^2a_2)\psi =0 \quad \hbox {in}\quad {{\mathcal {D}}},\nonumber \\&\big (\psi +a_2\psi _z\big )(z_0,s)=I(z_0,s),\quad s\in (s_0-\varepsilon ,s_0+\varepsilon ),\nonumber \\&\psi (z,s_0-\varepsilon )=w(z,s_0-\varepsilon ),\quad z> z_0. \end{aligned}$$
(28)

under the exponential growth conditions on \(\psi \) and \(\psi _z\). Differentiating the equation in (28) w.r.t. z, we have

$$\begin{aligned} \psi _{zs}-\tfrac{1}{2}\sigma ^2 a_2^2\psi _{zzz}+\big (\mu -\tfrac{1}{2}\sigma ^2a_2^2-\sigma ^2a_2\big )\psi _{zz}+(\mu -\sigma ^2a_2)\psi _z=0 \quad \hbox {in}\quad {{\mathcal {D}}}, \end{aligned}$$

So \(\Psi =\psi +a_2\psi _z\) satisfies

$$\begin{aligned}&\Psi _s-\frac{1}{2}\sigma ^2 a_2^2\Psi _{zz}+\big (\mu -\frac{1}{2}\sigma ^2a_2^2-\sigma ^2a_2\big )\Psi _z+(\mu -\sigma ^2a_2)\Psi =0 \quad \hbox {in}\quad {{\mathcal {D}}},\nonumber \\&\Psi (z_0,s)=I(z_0,s),\quad s\in (s_0-\varepsilon ,s_0+\varepsilon ),\nonumber \\&\Psi (z,s_0-\varepsilon )=I(z,s_0-\varepsilon ),\quad z> z_0. \end{aligned}$$

Using (26) and (27), by the strong maximum principle, we have \(\Psi > 0\) in \({{\mathcal {D}}}\). Define a function

$$\begin{aligned} \Gamma (x,y)= \left\{ \begin{array}{ll} a_2, &{} x+a_2 y\ge 0, \\ a_1, &{} x+a_2 y< 0 \quad \hbox { and }\quad x+a_1 y\le 0, \\ -\frac{x}{y},\;\;&{} x+a_2 y< 0 \quad \hbox { and }\quad x+a_1 y> 0. \end{array} \right. \end{aligned}$$

Then (28) can be rewritten as

$$\begin{aligned}&\psi _s-\frac{1}{2}\sigma ^2 \Gamma ^2(\psi ,\psi _z)\psi _{zz}+\big (\mu -\frac{1}{2}\sigma ^2\Gamma ^2(\psi ,\psi _z) -\sigma ^2\Gamma (\psi ,\psi _z)\big )\psi _z\nonumber \\ {}&\quad +\big (\mu -\sigma ^2\Gamma (\psi ,\psi _z)\big )\psi =0,\nonumber \\&\big (\psi +a_2\psi _z\big )(z_0,s)=\big ( w+a_2w_z\big )(z_0,s),\quad s\in (s_0-\varepsilon ,s_0+\varepsilon )\nonumber \\&\psi (z,s_0-\varepsilon )=w(z,s_0-\varepsilon ),\quad z> z_0. \end{aligned}$$

Since \(w_z>0\) by (19), we have \(\Gamma (w,w_z)=A(w/w_z)\). Hence, \(\psi =w\) also satisfies the above system, by the uniqueness of its solution, we conclude that \(\psi =w\) in \({{\mathcal {D}}}\). Consequently, \(I=\Psi >0 \) in \({{\mathcal {D}}}\). But, by the definition of \(f(s_0)\), we would have \(f(s)\le z_0\) for \(s\in (s_0-\varepsilon ,s_0+\varepsilon )\) so that

$$\begin{aligned} f^*(s_0)=\limsup \limits _{s\rightarrow s_0}f(s)\le z_0, \end{aligned}$$

contradicting to \(z_0\in (f_*(s_0-),f^*(s_0))\). \(\square \)

Lemma 5.4

Given \(s\in (0,T]\), we have

$$\begin{aligned} I(z,s)\le 0,\quad \forall \; z\le f(s). \end{aligned}$$
(29)

Proof

Denote

$$\begin{aligned} {{\mathcal {C}}}:=\{(z,s)\mid z\le f(s),\;s\in (0,T]\}. \end{aligned}$$

If (29) were not true, i.e. I would take positive values in \({{\mathcal {C}}}\). Since \(\limsup \limits _{z\rightarrow -\infty }I(z,s)<0\) for any \(s\in (0,T]\) by (18) and (19), there would exist \((z_0,s_0)\in \overline{{{\mathcal {C}}}}\) such that \(I(z_0,s_0)=\max \limits _{(z,s)\in \overline{{{\mathcal {C}}}}}I(z,s)>0.\) Note that \((z_0,s_0)\in \overline{{{\mathcal {C}}}}\) implies

$$\begin{aligned} z_0\le f^*(s_0)=\limsup \limits _{s\rightarrow s_0}f(s). \end{aligned}$$

By Lemma 5.3 we would have

$$\begin{aligned} z_0< f_*(s_0-)=\liminf \limits _{s\rightarrow s_0-}f(s). \end{aligned}$$

Therefore, \(I>0\) in

$$\begin{aligned} {{\mathcal {D}}}:=(z_0-\varepsilon ,z_0+\varepsilon )\times (s_0-\varepsilon ,s_0)\subset {{\mathcal {C}}} \end{aligned}$$

for sufficiently small \(\varepsilon >0\). Then, \(A(w/w_z)=a_2\) in \({{\mathcal {D}}}\), so I would satisfy a linear equation in \({{\mathcal {D}}}\). However, as \((z_0,s_0)\) is the maximum point of I in \({{\mathcal {D}}}\), it is impossible by the maximum principle. \(\square \)

By Lemma 5.4, we see \(I(z,s_0)\ge 0\) for any \(z> z_0\) if \(I(z_0,s_0)>0\). We continue to prove the following stronger conclusion.

Lemma 5.5

Given \(s_0\in (0,T]\), we have \(I(z,s_0)>0\) for any \(z> z_0\) if \(I(z_0,s_0)>0\).

Proof

By the continuity of I, there exists \(0<\varepsilon <s_0\) such that

$$\begin{aligned} I(z_0,s)>0,\quad s\in (s_0-\varepsilon ,s_0]. \end{aligned}$$

By Lemma 5.4, we further have

$$\begin{aligned} I(z,s)\ge 0,\quad (z,s)\in (z_0,+\infty )\times (s_0-\varepsilon ,s_0] \end{aligned}$$

and I satisfies a linear equation in \((z_0,+\infty )\times (s_0-\varepsilon ,s_0]\). By the strong maximum principle we conclude \(I>0\) in \((z_0,+\infty )\times (s_0-\varepsilon ,s_0]\). \(\square \)

By Lemma 5.5 and the definition (20), we conclude

Lemma 5.6

We have

$$\begin{aligned} {{\mathcal {B}}}=\{(z,s)\mid z>b(s),\;s\in (0,T]\} \end{aligned}$$
(30)

with

$$\begin{aligned} b(0+)=\ln (2d)-\ln (1+a_2). \end{aligned}$$

Similarly, we can prove

Lemma 5.7

We have

$$\begin{aligned} {{\mathcal {S}}}=\{(z,s)\mid z<l(s),\;s\in (0,T]\} \end{aligned}$$
(31)

with

$$\begin{aligned} l(0+)=\ln (2d)-\ln (1+a_1). \end{aligned}$$

Recall that \(l(s)<b(s)\), so the above two lemmas imply

Lemma 5.8

We have

$$\begin{aligned} {{\mathcal {N}}}=\{(z,s)\mid l(s)\le z\le b(s),\;s\in (0,T]\}. \end{aligned}$$

Next, we prove that the boundaries \(b(\cdot )\) and \(l(\cdot )\) are smooth when the coefficients meet certain conditions.

Proposition 5.1

If the coefficients satisfy the following conditions

$$\begin{aligned}{} & {} {\mu >0,} \end{aligned}$$
(32)
$$\begin{aligned}{} & {} \sigma ^2 a_2^2+r_1-2 r_2 \ge 0, \end{aligned}$$
(33)
$$\begin{aligned}{} & {} 1+\frac{2 r_1}{\mu -r_1}-2 a_1+a_2\ge 0, \end{aligned}$$
(34)

then the boundaries \(b(\cdot )\), \(l(\cdot )\in C^1((0,T])\).

To prove this conclusion, we need

Lemma 5.9

Under the condition (33), we have

$$\begin{aligned} w_s+r_1 w\ge 0. \end{aligned}$$
(35)

Proof

The condition (33) is equivalent to

$$\begin{aligned} \theta _2=\sigma ^2 a_2^2+2 \sigma ^2 a_2-2 \mu \ge -r_1. \end{aligned}$$

Denote \(\varphi =e^{r_1 s} w\), by the first inequality in (18) we have

$$\begin{aligned} \varphi (z,s)\ge \frac{1}{2}e^{(\theta _2+r_1)s}e^z-d\ge \frac{1}{2}e^z-d=\varphi (z,0),\quad (z,s)\in Q_T. \end{aligned}$$

For any \(\Delta s\in (0,T)\), let \(\overline{\varphi }(z,s):=\varphi (z,s+\Delta s)\), then by above and the equation in (17), we have

$$\begin{aligned}&\overline{\varphi }_s-r_1 \overline{\varphi }-{{\mathcal {T}}} \overline{\varphi }=0 \quad \hbox {in}\quad Q_{T-\Delta s},\nonumber \\&\overline{\varphi }(z,0)=\varphi (z,\Delta s)\ge \varphi (z,0),\quad z\in {{\mathbb {R}}}. \end{aligned}$$

By the comparison principle we have \(\overline{\varphi }\ge \varphi \) in \(Q_{T-\Delta s}\), which implies \(\varphi _s\ge 0\), so \(w_s+r_1 w\ge 0\). \(\square \)

Lemma 5.10

Under the conditions (32), (33) and (34),

$$\begin{aligned} {\partial }_z\Big (\frac{w}{w_z}\Big )>0 \quad \textrm{in}\quad {{\mathcal {N}}}. \end{aligned}$$
(36)

Proof

Recall that \(w<0\), \(w_z>0\) and \(a_2\le A(\frac{w}{w_z})=-\frac{w}{w_z}\le a_1\) in \( {{\mathcal {N}}}\), so

$$\begin{aligned} A^2\Big (\frac{w}{w_z}\Big ) w_{zz}=\Big (\frac{w}{w_z}\Big )^2 w_{zz}=w \Big (1-{\partial }_z\Big (\frac{w}{w_z}\Big )\Big ) \quad \textrm{in}\quad {{\mathcal {N}}}. \end{aligned}$$

By the equation in (17) and Lemma 5.9 we have

$$\begin{aligned} \frac{\sigma ^2}{2}w \Big (1-{\partial }_z\Big (\frac{w}{w_z}\Big )\Big )&= w_s+\Big (\mu -\frac{1}{2}\sigma ^2A^2\Big (\frac{w}{w_z}\Big )-\sigma ^2A\Big (\frac{w}{w_z}\Big )\Big )w_z +\Big (\mu -\sigma ^2A\Big (\frac{w}{w_z}\Big )\Big )w\\&= w_s-\frac{\mu }{A\Big (\frac{w}{w_z}\Big )}w+\frac{1}{2}\sigma ^2A\Big (\frac{w}{w_z}\Big )w +\sigma ^2w+\Big (\mu -\sigma ^2A\Big (\frac{w}{w_z}\Big )\Big )w\\&= w_s-\frac{\mu }{A\Big (\frac{w}{w_z}\Big )}w -\frac{1}{2}\sigma ^2A\Big (\frac{w}{w_z}\Big )w+(\sigma ^2+\mu )w\\&> -r_1 w-\frac{\mu }{a_1}w-\frac{1}{2}\sigma ^2a_2w+(\sigma ^2+\mu )w \\&= \sigma ^2 w\Big ( a_1-\frac{\mu }{\sigma ^2 a_1}-\frac{1}{2} a_2+1\Big )\quad \textrm{in}\quad {{\mathcal {N}}}. \end{aligned}$$

The inequality is strict because \(A\Big (\frac{w}{w_z}\Big )\) cannot equal \(a_1\) and \(a_2\) simultaneously. It follows

$$\begin{aligned} {\partial }_z\Big (\frac{w}{w_z}\Big )> 1-2 \Big ( a_1-\frac{\mu }{\sigma ^2 a_1}-\frac{1}{2} a_2+1\Big )=1-2 a_1+a_2+\frac{2 r_1}{\mu -r_1} \ge 0\quad \textrm{in}\quad {{\mathcal {N}}}.\end{aligned}$$

This completes the proof. \(\square \)

Now, we are ready to prove Proposition 5.1. Let \(J=-w/w_z\), from the definition of \(b(\cdot )\) and \(l(\cdot )\) we have

$$\begin{aligned} J(b(s),s)=a_2,\quad J(l(s),s)=a_1,\quad s\in (0,T]. \end{aligned}$$

When the conditions (33) and (34) hold, the above result shows \(J_z(b(s),s)\) and \(J_z(l(s),s)<0\). So it follows from the implicit function existence theorem that \(b(\cdot )\), \(l(\cdot )\in C^1((0,T])\).

6 Solutions to the HJB Equation (7) and Problem (3)

We are now ready to construct a classical solution to the PDE (7) from the function w given in Theorem 5.1 and deduce the optimal portfolio to the problem (3).

First, we rewritten the PDEs (15) and (14) of u and v in compact forms as follows:

$$\begin{aligned}&-u_t-{{\mathcal {J}}}u=0\quad \hbox {in}\quad (0,+\infty )\times [0,T),\nonumber \\&u(y,T)=\frac{1}{2}y-d,\quad y>0, \end{aligned}$$
(37)

and

$$\begin{aligned}&-v_t-{{\mathcal {H}}}v=0 \quad \hbox {in}\quad (0,+\infty )\times [0,T),\nonumber \\&v(0,t)=0, \qquad 0\le t<T,\nonumber \\&v(y,T)=-\frac{1}{4}y^2+d y,\quad y>0, \end{aligned}$$
(38)

where

$$\begin{aligned} {{\mathcal {J}}}u:= & {} \frac{1}{2}\sigma ^2 A^2\Big (\frac{u}{yu_y}\Big )y^2u_{yy}-\Big (\mu -\sigma ^2A^2\Big (\frac{u}{yu_y}\Big )-\sigma ^2A\Big (\frac{u}{yu_y}\Big ) \Big )yu_y\\ {}{} & {} -\Big (\mu -\sigma ^2A\Big (\frac{u}{yu_y}\Big )\Big )u, \end{aligned}$$

and

$$\begin{aligned} {{\mathcal {H}}}v:=\frac{1}{2}\sigma ^2 A^2\Big (\frac{v_y}{yv_{yy}}\Big )y^2v_{yy}-\Big (\mu -\sigma ^2A\Big (\frac{v_y}{yv_{yy}}\Big )\Big )yv_y. \end{aligned}$$

Lemma 6.1

Let w be given in Theorem 5.1 and let

$$\begin{aligned} u(y,t)=w(\ln y, T-t). \end{aligned}$$

Then \(u\in C^{2+\alpha ,1+\frac{\alpha }{2}}\big ((0,+\infty )\times [0,T]\big )\) is a solution to the PDE (37) such that

$$\begin{aligned} \frac{1}{2} e^{\theta _2 (T-t)} y-e^{-r_1 (T-t)} d\le&u \le \frac{1}{2} e^{\theta _1 (T-t)} y-e^{-r_2 (T-t)} d, \end{aligned}$$
(39)
$$\begin{aligned} \frac{1}{2}e^{-\kappa (T-t)} \le&u_y\le \frac{1}{2}e^{k (T-t)}, \end{aligned}$$
(40)

in \((0,+\infty )\times [0,T]\).

This result can be easily verified, so we omit its proof.

Furthermore, we have

Lemma 6.2

For any \(t\in [0,T]\),

$$\begin{aligned} \lim \limits _{y\rightarrow 0+}u=-e^{-r_1 (T-t)} d,\quad \lim \limits _{y\rightarrow +\infty }u=+\infty , \quad \lim \limits _{y\rightarrow 0+}yu=0, \quad \lim \limits _{y\rightarrow 0+}y^2u_y=0. \end{aligned}$$
(41)

Proof

The second and third limits can be derived from (39), the fourth limit is due to (40). It is left to prove the first limit. Thanks to the estimate (23), there exists

$$\begin{aligned} z_0\in \Big (-\infty , \inf \limits _{s\in [0,T]}l(s)\Big ) \end{aligned}$$

such that \(A(w/w_z)=a_1\) in

$$\begin{aligned} {{\mathcal {D}}}:=(-\infty ,z_0]\times [0,T]. \end{aligned}$$

Thus,

$$\begin{aligned} w_s-\frac{1}{2}\sigma ^2 a_1^2w_{zz}+\big (\mu -\frac{1}{2}\sigma ^2a_1^2-\sigma ^2a_1\big )w_z+(\mu -\sigma ^2a_1)w=0 \quad \hbox {in}\quad {{\mathcal {D}}}. \end{aligned}$$

Let

$$\begin{aligned} M:=\max \left\{ \frac{1}{2}e^{z_0},\max \limits _{s\in [0,T]} w(z_0,s)+e^{-r_1 s}d\right\} \end{aligned}$$

and denote

$$\begin{aligned} \Psi (z,s):=M e^{|\theta _1| s} e^{z-z_0}-e^{-r_1 s} d. \end{aligned}$$

Then

$$\begin{aligned}{} & {} \Psi _s-\frac{1}{2}\sigma ^2 a_1^2 \Psi _{zz}+\Big (-\frac{1}{2}\sigma ^2 a_1^2-\sigma ^2 a_1+\mu \Big )\Psi _z+\Big (\mu -\sigma ^2 a_1 \Big )\Psi \nonumber \\{} & {} \quad \qquad =M e^{|\theta _1| s} e^{z-z_0}\Big (|\theta _1|-\frac{1}{2}\sigma ^2 a_1^2+\Big (-\frac{1}{2}\sigma ^2 a_1^2-\sigma ^2 a_1+\mu \Big )+\Big (\mu -\sigma ^2 a_1 \Big )\Big )\nonumber \\{} & {} \qquad \qquad +e^{-r_1 s} d (r_1-(\mu -\sigma ^2 a_1 ) )\nonumber \\{} & {} \quad \quad \ge 0, \end{aligned}$$

by recalling the definitions of \(\theta _1\) and \(a_1\). Moreover,

$$\begin{aligned}&\Psi (z,0)=Me^{z-z_0}-d\ge \frac{1}{2}e^{z}-d=w(z,0), \quad z\le z_0,\nonumber \\&\Psi (z_0,s)\ge M-e^{-r_1 s}d\ge w(z_0,s), \quad s\in [0,T], \end{aligned}$$

so, by the comparison principle, we get \(\Psi \ge w\) in \({{\mathcal {D}}}\). Together with the first inequality in (18), we have \(\lim \limits _{z\rightarrow -\infty } w=-e^{-r_1s} d\), which implies \(\lim \limits _{y\rightarrow 0+}u=-e^{-r_1 (T-t)} d\). \(\square \)

It follows from (40) and (41) that

$$\begin{aligned} u_y>0,\quad \lim \limits _{y\rightarrow 0+}u=-e^{-r_1 (T-t)} d,\quad \lim \limits _{y\rightarrow +\infty }u=+\infty , \end{aligned}$$

so \(-u\) is one-to-one mapping \((0,+\infty ) \) to \((-\infty , e^{-r_1 (T-t)} d)\) for each \(t\in [0,T)\).

Lemma 6.3

Let u be given in Lemma 6.1. Define

$$\begin{aligned} v(y,t):=-\int _0^yu(\xi ,t)\textrm{d} \xi ,\quad (y,t)\in (0,+\infty )\times [0,T]. \end{aligned}$$

Then \(v\in C^{3,2}\big ((0,+\infty )\times [0,T]\big )\) is a solution to the PDE (38) such that

$$\begin{aligned} -\frac{1}{2} e^{\theta _1 (T-t)} y+e^{-r_2 (T-t)}d\le&v_y \le -\frac{1}{2} e^{\theta _2 (T-t)} y+e^{-r_1 (T-t)} d, \end{aligned}$$
(42)
$$\begin{aligned} -\frac{1}{2}e^{k (T-t)}\le&v_{yy}\le -\frac{1}{2}e^{-\kappa (T-t)}, \end{aligned}$$
(43)

in \((0,+\infty )\times [0,T]\). Moreover, for any \(t\in [0,T]\),

$$\begin{aligned} \lim \limits _{y\rightarrow 0+}v_y=e^{-r_1 (T-t)} d,\quad \lim \limits _{y\rightarrow +\infty }v_y=-\infty , \quad \lim \limits _{y\rightarrow 0+}y v_y=0\quad \lim \limits _{y\rightarrow 0+}y^2 v_{yy}=0. \end{aligned}$$
(44)

Proof

Clearly \(v_y=-u\), so (42), (43) and (44) are the direct consequences of (39), (40) and (41) respectively. Since \(u\in C^{2+\alpha ,1+\frac{\alpha }{2}}\big ((0,+\infty )\times [0,T]\big )\), we have v, \(v_y\in C^{2+\alpha ,1+\frac{\alpha }{2}}\big ((0,+\infty )\times [0,T]\big )\). Moreover, it is easy to check that

$$\begin{aligned} {\partial }_y(-v_t-{{\mathcal {H}}} v)=u_t+{{\mathcal {J}}}u=0 \end{aligned}$$

and

$$\begin{aligned} (-v_t-{{\mathcal {H}}}v)(0,t)=0, \end{aligned}$$

so

$$\begin{aligned} (-v_t-{{\mathcal {H}}} v)(y,t) =(-v_t-{{\mathcal {H}}} v)(0,t)+\int _0^y{\partial }_y(-v_t-{{\mathcal {H}}} v)(\xi ,t)\textrm{d}\xi =0.\end{aligned}$$

Therefore, v is a solution to the PDE (38). As a consequence,

$$\begin{aligned} -v_{tt}-\frac{1}{2}\sigma ^2 A^2\Big (\frac{v_y}{yv_{yy}}\Big )y^2v_{tyy}+\Big (\mu -\sigma ^2A\Big (\frac{v_y}{yv_{yy}}\Big )\Big )yv_{ty}={\partial }_t(-v_t-\mathcal{H} v)=0. \end{aligned}$$

Using the Schauder interior estimation (see [29] Theorem 4.9), we get \(v_t\in C^{2+\alpha ,1+\frac{\alpha }{2}}\big ((0,+\infty )\times [0,T]\big )\), therefore, \(v\in C^{3,2}\big ((0,+\infty )\times [0,T]\big )\). \(\square \)

6.1 Proof of Theorem 3.1

Now we are ready to prove Theorem 3.1. Let v be given in Lemma 6.3. Define

$$\begin{aligned} V (x,t):=\sup \limits _{y>0}\;(v(y,t)-xy),\quad x<e^{r_1 (T-t)}d,\quad t\in [0,T]. \end{aligned}$$
(45)

We come to prove that the above V satisfies the requirements of Theorem 3.1.

For each \(t\in [0,T]\), the estimates (43) and (44) imply \(v_y(\cdot ,t)\) is strictly decreasing and maps \((0,\infty )\) to \((-\infty ,e^{-r_1 (T-t)} d)\), so

$$\begin{aligned} J(x,t):=\hbox {argmax}_{y>0}\;(v(y,t)-xy)= (v_y(\cdot ,t))^{-1}(x)>0, \end{aligned}$$

and

$$\begin{aligned} V (x,t)=v(J(x,t),t)-xJ(x,t),\quad x<e^{r_1 (T-t)}d,\quad t\in [0,T]. \end{aligned}$$
(46)

Also the function \(J(x,t)\in C(Q^T)\) and is strictly increasing w.r.t. x. Therefore,

$$\begin{aligned} V_x(x,t)&=v_y(J(x,t),t)J_x(x,t)-xJ_x(x,t)-J(x,t)=-J(x,t)<0,\\ V_{xx}(x,t)&=-J_x(x,t)=-\partial _x[(v_y(\cdot ,t))^{-1}(x)]=\frac{-1}{v_{yy}(J(x,t),t)}>0,\\ V_t(x,t)&=v_y(J(x,t),t)J_t(x,t)+v_t(J(x,t),t)-xJ_t(x,t)=v_t(J(x,t),t). \end{aligned}$$

As \(v\in C^{3,2}\big ((0,+\infty )\times [0,T]\big )\), we get

$$\begin{aligned} V\in C^{3,2}\big (\overline{Q^T}\setminus \{x=e^{-r_1 (T-t) d}\} \big ). \end{aligned}$$

Since v is a solution to the PDE (38), which is equivalent to (14), one can check that V satisfies the PDE in (13). This together with \(V_x<0\) and \(V_{xx}>0\) shown above implies the PDE in (7).

From (44), we know for any \(t\in [0,T]\),

$$\begin{aligned} \lim \limits _{x\rightarrow e^{-r_1 (T-t)} d-}J(x,t)=0,\quad \lim \limits _{x\rightarrow -\infty }J(x,t)=+\infty . \end{aligned}$$
(47)

So (10) holds. Moreover, (47) and (46) imply

$$\begin{aligned} V(e^{-r_1 (T-t)} d-,t)=v(0+,t)=0, \end{aligned}$$

so the boundary condition in (7) holds.

Now, we verify the terminal condition. Thanks to (42) and \(v(0,t)=0\), we have

$$\begin{aligned} -\frac{1}{4} e^{\theta _1 (T-t)} y^2+e^{-r_2 (T-t)}d y\le v \le -\frac{1}{4} e^{\theta _2 (T-t)} y^2+e^{-r_1 (T-t)} d y, \end{aligned}$$

and consequently,

$$\begin{aligned} V (x,t)&=\sup \limits _{y>0}\;(v(y,t)-xy)\nonumber \\&\ge \sup \limits _{y>0}\Big (-\frac{1}{4} e^{\theta _1 (T-t)} y^2+e^{-r_2 (T-t)}d y-xy\Big )\nonumber \\&=e^{-\theta _1 (T-t)}(e^{-r_2 (T-t)}d-x)^2, \end{aligned}$$
(48)

and

$$\begin{aligned} V (x,t)&\le \sup \limits _{y>0}\Big (-\frac{1}{4} e^{\theta _2 (T-t)} y^2+e^{-r_2 (T-t)}d y-xy\Big )\nonumber \\&= e^{-\theta _2 (T-t)}(e^{-r_1 (T-t)}d-x)^2. \end{aligned}$$
(49)

Letting \(t\rightarrow T\) in the above two inequalities, it follows that V satisfies the terminal condition in (7). This completes the proof of Theorem 3.1.

6.2 Proof of Proposition 3.1

This is the consequence of Lemmas 5.6 and 5.7. Thanks to (8) and (9), we see \((0,t)\in {\mathfrak {B}}\), so \(B(t)>0\).

6.3 Proof of Theorem 3.2

In this section, we prove Theorem 3.2.

Suppose V is the solution to (7) given in Theorem 3.1. Fix any \((x,t)\in Q^T\) and any admissible portfolio \(\pi \in \Pi _t\), let X be the unique strong solution to (2). We set

$$\begin{aligned} {\tau _n=\inf \Big \{s\ge t \;\Big |\; |V_x(X_s,s)|+\int _t^s|\pi _u|^2\textrm{d}u\ge n\Big \}.} \end{aligned}$$

Then

$$\begin{aligned} s\mapsto \int _t^{s\wedge \tau _n\wedge T}V_x(X_u,u)\sigma \pi _u \textrm{d}W_u \end{aligned}$$

is a martingale, whose mean is 0. Therefore, by Itô’s formula and the HJB equation (7),

$$\begin{aligned}&\;{{\mathbb {E}}}[V(X_{T\wedge \tau _n},T\wedge \tau _n)\mid X_t=x ]\nonumber \\&=V(x,t)+{{\mathbb {E}}}\Big [\int _t^{T\wedge \tau _n}\Big (V_t+\frac{1}{2}\sigma ^2\pi _s^2V_{xx}+\Big ((r_1\chi _{X_s>\pi _s}+r_2\chi _{X_s<\pi _s})(X_s-\pi _s)\nonumber \\&\quad +\mu \pi _s\Big )V_x\Big )(X_s,s)\textrm{d}s+\int _t^{T\wedge \tau _n}V_x(X_s,s)\sigma \pi _s \textrm{d}W_s\;\Big |\; X_t=x \Big ]\nonumber \\&\ge V(x,t). \end{aligned}$$
(50)

Using the estimates (48) and (49), we have

$$\begin{aligned} 0\le V(X_{T\wedge \tau _n},T\wedge \tau _n)\le C\big (1+\sup \limits _{s\in [t,T]}|X_s|^2\big ). \end{aligned}$$

By the standard estimate for SDE, the right hand side is integrable, so we can apply the dominated convergence theorem to \({{\mathbb {E}}}[V(X_{T\wedge \tau _n},T\wedge \tau _n)\mid X_t=x ]\), and obtain

$$\begin{aligned} V(x,t)&\le {{\mathbb {E}}}[\lim \limits _{n\rightarrow \infty }V(X_{T\wedge \tau _n},T\wedge \tau _n)\mid X_t=x ]\nonumber \\&={{\mathbb {E}}}[V(X_{T},T)\mid X_t=x ]\nonumber \\&={{\mathbb {E}}}[(X_T-d)^2 \mid X_t=x ]. \end{aligned}$$
(51)

Therefore, we have

$$\begin{aligned} V(x,t)\le \inf \limits _{\pi \in \Pi _t}{{\mathbb {E}}}[(X_T-d)^2 \mid X_t=x ]. \end{aligned}$$
(52)

To show the reverse inequality, define a feedback control

$$\begin{aligned} \pi ^*(x,t)= {\left\{ \begin{array}{ll} -a_1\frac{V_{x}(x,t)}{V_{xx}(x,t)}, &{}-a_1\frac{V_{x}(x,t)}{V_{xx}(x,t)}<x,\\ x, &{}-a_2\frac{V_{x}(x,t)}{V_{xx}(x,t)}\le x\le -a_1\frac{V_{x}(x,t)}{V_{xx}(x,t)},\\ -a_2\frac{V_{x}(x,t)}{V_{xx}(x,t)}, &{}-a_2\frac{V_{x}(x,t)}{V_{xx}(x,t)}>x. \end{array}\right. } \end{aligned}$$

Clearly (42) and (43) imply \(|y v_{yy}|\le C(1+|v_y|)\) for some constant C independent of t, which is equivalent to

$$\begin{aligned} \Big |\frac{V_{x}(x,t)}{V_{xx}(x,t)}\Big |\le C(1+|x|). \end{aligned}$$

This indicates \(\pi ^*(x,t)\) is linear growth in x uniformly for \(t\in [0,T]\). Moreover, because \(V\in C^{3,2}\), \(\pi ^*(x,t)\) is locally Lipschitz continuous. By Mao [32, Theorem 3.4, p.56], there exists a unique strong solution \(X^*\) to the following SDE:

$$\begin{aligned} \begin{array}{rl} \textrm{d}X^*_s&{}=\big [\big (r_1\chi _{X^*_s>\pi ^*(X^*_s,s)}+r_2\chi _{X^*_s<\pi ^*(X^*_s,s)}\big )(X^*_s-\pi ^*(X^*_s,s))\\ &{}\quad +\mu \pi ^*(X^*_s,s)\big ]\textrm{d}s+\sigma \pi ^*(X^*_s,s)\textrm{d}W_s,\quad s\in [t,T],\\ X^*_t&{}=x. \end{array}. \end{aligned}$$
(53)

Furthermore, as \(\pi ^*(x,t)\) is linear growth in x, by Mao [32, Lemma 3.2, p.51], we obtain from (53) that

$$\begin{aligned} {{\mathbb {E}}}\Big [ \sup \limits _{s\in [t,T]}|X^*_s|^2\Big ]<\infty , \end{aligned}$$

which further implies \({\hat{\pi _s}}:=\pi ^*(X^*_s,s)\) is an admissible control in \(\Pi _t\) by the linear growth property of \(\pi ^*(x,t)\) in x. Repeat the preceding argument with the control \({\hat{\pi }}\), then the inequalities in (50) and (51) become equations, giving

$$\begin{aligned} V(x,t)={{\mathbb {E}}}[(X^*_T-d)^2| X_t=x ]. \end{aligned}$$

Compared to (52), we conclude that \(\pi ^*\) is an optimal feedback control to the problem (3), and V is the value function.

7 Concluding Remarks

In this paper, we solved Markowitz’s mean-variance portfolio selection problem in a continuous-time Black–Scholes market with different borrowing and saving rates by PDE methods. A feedback optimal portfolio is provided. Efficiently numerical schemes can be easily developed to calculate it. Different from many existing papers, the optimality of the portfolio is proved by a verification argument, where the smoothness of the value function plays an important role. It is of great interests to extend our model to the case with jumps in stock price. This may lead to some new financial insights.

Clearly, Theorem 3.2 implies the function V given in Theorem 3.1 is unique. As a consequence, we have that the functions w in Theorem 5.1, u in Lemma 6.1 and v in Lemma 6.3 are unique as well. The above uniqueness can be proved by pure PDE argument as well. We leave this to the interested readers.

This paper used PDE method to solve the portfolio selection problem. This approach does not work if the system is not Markovian or d is stochastic in general. So stochastic control theory for piecewise linear quadratic problems is expected to be developed. Of course, it is of great importance to develop such theories and also far beyond the scope of this paper. But we hope our method can inspire the readers to develop such theories.