Since the precursory research of Markowitz  , the mean-variance (MV) criterion has become the most commonly used theoretical assumption and basis in portfolio selection and has been extended to many different kinds of applications. For example, Merton  studied the portfolio selection under a continuous time setting. By the embedding techniques, Li and Ng  and Zhou and Li  transformed the original portfolio selection problem into the auxiliary problem which is then solved by the dynamic programming approach.
However, previous works focused only on the static market state. In reality, the market state includes different states. For example, when the market is at the bullish state, the market response may be enthusiastic and the market may be profitable beyond the expectation of the public. When the state is bearish, investors will have pessimistic attitude toward the market and the return rates of assets may not be positive. Therefore, the regime-switching model, which is pioneered by Neftci  , has become one of the most important extensions of the MV portfolio selestion problem, and for details we refer the reader to the works of Zhou and Yin  , Yin and Zhou  , Çakmak and Özekici  , Xie  and Elliott et al.  .
Since the early regime-switching models only concern the problems with fixed investment period, recently the uncertain time horizon framework has become another important branch of the MV portfolio selection problem. For the works on uncertain time horizon, we refer the reader to Guo and Hu  , Yi et al.  , Wu and Li  and Yao et al.  . Besides, the study of Karatzas and Wang  , Martellini and UrosÌŇevicÌĄ  and Blanchet-Scalliet et al.  further regarded the asset price as an uncertain factor which affects the investment time horizon.
From the existing literature on portfolio selection in a regime-switching market, there are two important factors that are always neglected. Firstly, there is very few research on the extreme market state in which a company might proclaim the bankruptcy. In such an extreme state like the financial crisis in 2008, companies in the market are struggling with heavy liability that bankruptcy is the best option for themselves. Investors who invest in such companies can only retrieve part of the funds from the bankrupt company. Because of universality of the company bankruptcy in this market state, investors would rather invest the money to the risk-less asset than risky assets in order to avoid the investment risk. In reality, bankruptcy is not a rare situation. According to the statistical data by www.afsa.gov.au, the number of business related bankruptcy in Australia for just the June quarter 2018 is 1213, which suggests that it is fairly meaningful and realistic to consider the bankruptcy state.
The other factor is the exit probability which relies on the time and the market state. In this context, when the investment background becomes worse or the market state is currently being bearish, it is more likely that investors will quit the market to avoid the investment risk. On the other hand, the exit probability may differ as time goes by, for example, an investor generally quits the market after the investment reaches maturity, which means that the exit probability is higher at the end of the time horizon than any other time points. Based on the above consideration, we cannot predetermine the state-dependent time horizon since the market state is unknown prior to the corresponding time point, which suggests that this assumption is different and much more realistic than those in the existing literature. Because both the bankruptcy state and the state-dependent investment time horizon often occur in the real world, it is significant and necessary to combine and study these two factors with the MV portfolio selection problem in the regime-switching market. Wu and Zeng  studied the portfolio selection with bankruptcy state, but do not consider the factor of exit probability. Based on the multi-period mean-variance portfolio selection. Wu et al.  assumed that the uncertain time horizon depends on the market state, however, the exit probability is not considered. Because of this novel research angle in this paper, the wealth process becomes fairly different from previous formulations, and we assume that the conditional exiting probability depends on the current market state including the bankruptcy state. Therefore, in order to obtain the optimal strategy and the corresponding efficient frontier, innovative expressions of the wealth formulation and the iteration process are needed, which is the main difficulty and contribution in this paper. Besides, we prove that our work is a general model including several existing models in literature as special cases. By comparing the efficient frontiers in different situations, numerical examples illustrate that both of the two factors affect the investment strategy and the corresponding efficient frontier significantly.
The rest of this paper is organized as follows. Section 2 introduces the mean-variance formulation of the portfolio selection problem under the regime-switching framework, and the auxiliary problem is also given. The closed-form expression of the optimal strategy in the auxiliary problem is established in Section 3. Section 4 is devoted to detailed transformation and derivation of the optimal strategy and efficient frontier of the original problem. Sections 5 and 6 provide extreme cases and numerical analysis respectively. The conclusion of this paper is presented in Section 7.
2. Problem Formulation
This paper assumes that an investor enters the market at time 0 with initial wealth . Denote by the market state at time and assume that is a time-homogeneous Markov chain with a transition matrix Q. Let L denote the bankruptcy state in which the investor will get back of the wealth from the bankrupt company, where refers to the retrieval rate which is assumed to be a random variable ranging between . Since in the bankruptcy market state risky assets will have similar economic performance, this paper assumes that there are only one risky asset and one risk-less asset in the market in order to underline the effects of the bankruptcy state on the optimal investment strategy. Let and signify the return rate of the risky asset and the risk-less asset respectively. With regard to the state-dependent exiting probability, suppose that the investor quits the market with the probability which depends on the current market state. Let represent the exit time and define
which satisfies .
Throughout this paper, some notations need to be made, we summarize them as follows:
N1. It is unnecessary to define , because the company goes bankrupt and the risky asset has no investment value at state L. For , define , which means the difference between the return rate of the risky asset and risk-less asset at time , and for , denote by the expectation of at time and assume it to be nonnegative. Besides, we define .
N2. represents the investment amount into the risky asset at time and means a set of strategies within the investment time horizon.
N3. For any time-dependent matrix and any vector , define where is the zero vector and where is the unit matrix.
N4. is the entry of transition matrix Q which means one-step transition probability from market state i to state j. signifies k-step transition probability which is the entry of , the kth power of transition matrix Q. Besides, define with representing the identity matrix.
N5. For any matrix and any vector , represents the ith row of A and means the ith element of a, and we define to be a matrix in which , and is a column vector which is equivalent to where is a column vector whose elements are all 1.
N6. is a column vector whose ith element is
N7. is a column vector whose ith element is
N8. is a column vector whose ith element is
N9. is a column vector whose ith element is
N10. is a column vector whose ith element is
2.2. Wealth Process and Optimization Problem
Now define the dynamics of the wealth with as follows:
where represents the function whose value is 1 when . Moreover, we generally suppose that the initial market state . Otherwise, the investor needs to save all the wealth into his bank account from the beginning, which is a trivial question.
For each time point, the investor makes rational strategy to optimize terminal wealth. This paper studies this portfolio selection problem under mean-variance criterion in which the investment risk is measured by the terminal wealth variance. Considering the dependence of the exit probability on the market state and the fixed expectation of terminal wealth d, the objective function under a strategy is presented as follows:
where denotes and stands for respectively.
Let be the optimal strategy. Then the portfolio is an efficient portfolio if there exists no strategy such that and
and at least one inequality holds true.
is called an efficient point and the set of all efficient points is called the efficient frontier.
According to , we have
by embedding a Lagrange multiplier into problem (Luenberger  ), the original problem is transformed into the auxiliary problem which has no constraint condition:
The Lemma below gives the relationship between the problem and :
Lemma 1 Given that the value function of the problem at the beginning is , and the corresponding optimal strategy is denoted by , then the value function of the problem at time 0 is , and its optimal strategy is where is the one which satisfies .
Note that , and because has no effect on the choice of the optimal strategy, we neglect to obtain the problem as follows:
which is equivalent to problem .
2.3. Important Assumptions
565t = Throughout this paper, we make the following important assumptions:
A1 Assume that for any i, , always holds true. Otherwise, we do not need to consider the problem in Ttime horizon.
A2 The market state is independent of the return rates of the risky asset and the risk-less asset, and the return rate of the risky asset and the risk-less asset are also independent of each other, which can be expressed as follows:
for all and , where is the probability based on information up to time t and is the Borel σ-algebra on .
A3 , which means that the exit probability is only dependent on the current market state , and the time before and after the current market state has no effect on the current exit probability.
A4 For and , assume that
is positive definite.
A5 The investment strategy is self-finance, which means that there is no exogenous infusion or withdrawal of money during the investment time horizon.
A6 During the investment time horizon, short selling, borrowing and lending are not prohibited, and transaction costs are ignored.
3. Solution for Problem
In order to derive the value functions and the optimal strategy of problem , we need to further transform the objective function.
By using the law of total probability, we have the following formulation:
Note that the law of total probability is being applied on the first line and the assumption A2 on the third line of Equation (3). Therefore, by using the above formulation, the problem can be rewritten as follows:
Now we consider the optimal strategy for the problem by using the dynamic programming approach. Define the value function as follows:
When , we have the following Bellman’s equations:
When , an investor will invest all the money into the bank account and has wealth of at time . Therefore, the investor will possess the
terminal wealth of that only depends on the return of the
risk-less asset after time t. Based on the state-dependent exit probability, the value function then can be shown to be as follows:
Lemma 2 For and , and .
Proof. From A4, we have
from which, we get
Then we obtain the following from the above equation:
which can be rewritten as follows:
According to Equation (9) and N8, we get that . Then we can deduce that from N10.
Note that the above lemma is used to guarantee the existence of the optimal strategy for problem which is presented in the following theorem:
Theorem 1 The optimal investment strategy for is of the following form:
The corresponding optimal value functions are as follows:
Proof. (i) First, we prove Equation (12) according to Equation (6), for , we have
Based on A2, we rewrite Equation (13) as follows:
Note that Equation (14) is equivalent to Equation (12), which means that Equation (12) holds true for .
Then we prove the expressions(10)-(11) for by using mathematical induction. First, we show that the expressions are true for in (ii), and then in (iii) prove that if the expressions hold true for , then they are also true for .
(ii) For , based on Equation (4) and (5) and (12), we have
As in Lemma 2, the optimal solution for exists and can be obtained by setting to yield
Substituting Equation (15) into the expression for , we have
Hence, Equations (10) and (11) are true for .
(iii) Assume that Equation (10), (11) and (12) hold true for , then when , we have
Substituting Equation (2) into Equation (17), we have
Note that in Equation (18), when ; when , where is the retrieval rate of the money that has been invested into the bankrupt company.
Then we rewrite Equation (18) as follows:
According to N8 and N9, we rewrite Equation (19) as follows:
As in Lemma 2, the optimal solution for exists and can be obtained by , we then have
Substituting Equation (21) into Equation (20), we obtain
Based on N6, N7 and N10, we know that Equation (21) and (22) are equivalent to Equation (10) and (11) respectively, which means that Equation (10) and (11) hold true when .
4. Solution for Problem
Based on Theorem 1 and the relationship between the problem and , we can immediately obtain the value function for as follows:
From Lemma 1, in order to obtain the optimal strategy and the corresponding value function for the problem , we first maximize Equation (23) with respect to . Note that , which suggests that the optimal in Equation (23) exists. Let , then we have
Substituting Equation (24) into Equation (23), we have the maximum of as follows:
Therefore, based on Equation (25) and Lemma 1, we have the following theorem:
Theorem 2 The optimal investment strategy for is of the following form:)
The corresponding efficient frontier is of the following form:
From Equation (27), the variance has the global minimum
which occurs at .
The corresponding optimal strategy is as follows:
5. Special Cases
In this section, we prove that the model in this paper is a general form of those in the existing literature and includes the existing models as special cases.
Case 1. In this case, we assume that the investment time horizon is fixed, which means that the probability of exit at time t, , but . In other words, investors are much more safer during the investment horizon. Then the important parameters are shown as follows:
The corresponding efficient frontier is
Case 2. Based on Case 1, by further assuming that the risk-less asset is independent of the market state, we have the following equations:
We obtain the corresponding efficient frontier from Equation (28) as follows:
which coincides with that in Wu and Zeng  whose research does not involve uncertain time horizons.
Case 3. Based on the two cases above, we assume that there is no bankruptcy state, which means that it is impossible to reach market state L from state i . Therefore, according to Wu and Zeng 
and where . Based on the assumptions in
this paper, some important notations in Çakmak and Özekici  are shown as follows:
Based on the equations above, we have the following equations:
Then based on the equations above and Equation (29), we have the following corresponding efficient frontier when there is no bankruptcy state:
which is in accordance with that in Çakmak and Özekici  .
6. Numerical Analysis
This section has three parts and focuses on the changes in the efficient frontier. The first part studies the different transition probabilities to bankruptcy state . In the second part we consider the effect of various state-dependent exit probability . The third part focuses on the effect of the factor of the retrieval rate .
In numerical analysis, we assume that there are three market states during the four-period time horizon including the bullish state, the bearish state and the bankrupt state represented by and 3 respectively. Note that the investment condition under the bullish market state ( ) is better than that under the bearish market state ( ) which in turn is superior to the one under the bankrupt state ( ). In the bankrupt state, the company invested goes bankrupt and the investor can get back of the wealth. Besides, assume that the initial wealth and the initial market state , and other parameters are as follows:
We define the transition matrix Q as follows:
Besides, we define the state-dependent exit probability at each time point as follows:
Case 1. In this case, we focus on the effects of different transition probabilities from state to on the corresponding efficient frontiers. Assume in Q and we then calculate the efficient frontier respectively. Note that when n increases, the probability of entering the bankrupt state decreases, which suggests that the company tends to be more safer. Besides, in order to make comparison we also consider the case with no bankrupt state ( ). Figure 1 shows the corresponding efficient frontiers based on different n.
From Figure 1 we can see that when n increases, namely, the transition probability to bankrupt state L decreases, the corresponding efficient frontier moves down to get closer to the efficient frontier with no bankrupt state which is at the lowest position in Figure 1, and the slope of the efficient frontier also gets smaller. This figure is reasonable because in order to obtain the same level of the expected terminal wealth, the investor will take more risks if there is a bankrupt state in the market, namely, they have to face the possibility that the invested company goes bankrupt and they lost their investment. Otherwise, the investor does not need to worry about the bankruptcy risks and consequently has relatively low variance of the investment.
Case 2. This case underlines the importance of the state-dependent exit probability. Besides the state-dependent exit probability mentioned above, we define another two sets of probabilities as follows in order to make a comparison and show the differences.
Table 2 shows indifference between the market state and the exit probability, namely, the exit probability becomes deterministic and is just like that in literature. In Table 3, we underlines the difference between the bullish state and the bearish state. The bankrupt state, however, has the same exit probability with that in the bearish state, which suggests that the exit probability is partially dependent on the market state. On the other hand, Table 1 shows the total dependence of the exit probability on the market state. Besides, we assume that n = 8 and the other parameters are the same as those at the beginning of this section. We then obtain the results as shown in Figure 2.
Figure 1. Mean-variance efficient frontiers for Case 1.
Figure 2. Mean-variance efficient frontiers for Case 2.
Table 1. Three different sets of probabilities.
With an increase in the exit probability under the bankruptcy state during the time horizon, the efficient frontier moves downward. However, the slope of the efficient frontier with Table 2 is larger than those with Table 1 and Table 3.
Table 2. The same set of probabilities.
Table 3. Two different sets of probabilities.
This result is realistic and logical. When the exit probability is deterministic and independent of the market state, people will take higher investment risks for the sake of the same level of the expected terminal wealth. This is because when the exit probability depends on the market state, for example, Table 1, the investor quits the market with higher exit probability when the market is being the bankruptcy state. Regardless of whatever reasons the investor quits the market, and the bankruptcy market state makes it easier for the company to go bankrupt and this high exit probability indeed provides more possibility for the investor to quit the market and prevent further investment loss. Therefore, the dependency of exit probability on the market state is like a “fuse” that indirectly protects people from further investment loss. On the other hand, investors who are under a situation like Table 2 or Table 3, when the market state is being the worst, their exit probability is always unchanged. Hence, the exit probability makes no extra contribution to the protection for the investment.
Case 3. This case considers the impact of δ on the corresponding efficient frontier. Note that δ stands for the retrieval part of the wealth after bankruptcy happens. We assume that there are five sets of data about the expectation of δ and are shown as follows: (Table 4)
Note that we assume that the variance of δ is unchanged ( ). Besides, let and use the state-dependent exit probability as in Table 1, and the other parameters remain unchanged. We then have the results as shown in Figure 3.
From Figure 3 we see that when the expectation of δ increases, the efficient frontier moves downward and its slope also decreases. When the expectation of δ is large, one will have high expectation of terminal wealth which can obtain the global minimum variance, which is not surprising, as one knows that bankruptcy has little impact on their investment since they can get more money back from the bankrupt company. Therefore, one has smaller global minimum variance and larger corresponding expectation. Besides, the efficient frontier with larger δ has smaller slope, this is because when people get the money back
Table 4. The expectation of δ.
Figure 3. Mean-variance efficient frontiers for Case 3.
from the bankrupt company, they invest it into the risk-less asset. Hence, this kind of investment situation is always of relatively small investment risks from the beginning to the end.
Based on multi-period mean-variance portfolio selection under the regime-switching framework, we consider two fairly new and important factors: the bankruptcy state and the state-dependent exit probability, both of which are fairly meaningful in the real world. When the market state is in the bankruptcy state, the company goes bankrupt and the investor can only get part of the investment back. On the other hand, there are exit probabilities that depend on the market state: the exit probabilities under bad states tend to be larger than that in good states. We then create an innovative expression for the wealth process and value functions by dynamic programming, then we obtain the closed-form of optimal strategy and the efficient frontier. Our study shows that 1) the model in this paper generalizes those in literature, when ignoring certain factors, we can derive the previous models and results; 2) in order to obtain the same level of terminal wealth expectation, investors will take more investment risks when it is easier for the market state to enter the bankruptcy state; 3) when the exit probability depends on the bad market state such as the bearish state and the bankruptcy state, the efficient frontier moves down and its slope gets larger, which suggests that the high exit probability provides more possibility for the investor to quit the market and prevent further investment loss; 4) when the retrieval parameter δ becomes larger, the efficient frontier moves down and its slope decreases, which suggests that investors will take less risks to obtain the same level of expected terminal wealth.
 Zhou, X. and Yin, G. (2003) Markowitz’s Mean-Variance Portfolio Selection with Regime Switching: A Continuous-Time Model. SIAM Journal on Control and Optimization, 42, 1466-1482.
 Yin, G. and Zhou, X.Y. (2004) Markowitz’s Mean-Variance Portfolio Selection with Regime Switching: From Discrete-Time Models to Their Continuous-Time Limits. IEEE Transactions on Automatic Control, 49, 349-360.
 Xie, S. (2009) Continuous-Time Mean-Variance Portfolio Selection WITH Liability and Regime Switching. Insurance: Mathematics and Economics, 45, 148-155.
 Elliott, R.J. and Siu, T.K. (2010) On Risk Minimizing Portfolios under a Markovian Regime Switching Black-Scholes Economy. Annals of Operations Research, 176, 271-291.
 Yi, L., Li, Z. and Li, D. (2008) Multi-Period Portfolio Selection for Asset-Liability Management with Uncertain Investment Horizon. Journal of Industrial & Management Optimization, 4, 535-552. https://doi.org/10.3934/jimo.2008.4.535
 Wu, H. and Li, Z. (2011) Multi-Period Mean-Variance Portfolio Selection with Markov Regime Switching and Uncertain Time-Horizon. Journal of Systems Science and Complexity, 24, 140-155. https://doi.org/10.1007/s11424-011-9184-z
 Yao, H., Zeng, Y. and Chen, S. (2013) Multi-Period Mean-Variance Asset-Liability Management with Uncontrolled Cash Flow and Uncertain Time-Horizon. Economic Modelling, 30, 492-500.
 Blanchet-Scalliet, C., El Karoui, N., Jeanblanc, M. and Martellini, L. (2008) Optimal Investment Decisions When Time-Horizon Is Uncertain. Journal of Mathematical Economics, 44, 1100-1113.
 Wu, H. and Zeng, Y. (2013) Multi-Period Mean-Variance Portfolio Selection in a Regime-Switching Market with a Bankruptcy State. Optimal Control Applications and Methods, 34, 415-432. https://doi.org/10.1002/oca.2027
 Wu, H., Zeng, Y. and Yao, H. (2014) Multi-Period Markowitz’s Mean-Variance Portfolio Selection with State-Dependent Exit Probability. Economic Modelling, 36, 69-78.