# Mean-field formulation for mean-variance asset-liability management with cash flow under an uncertain exit time

• Wei Liu , Youfa Sun and Xu Chen
From the journal Open Mathematics

## Abstract

The asset-liability management problem with cash flow under an uncertain exit time has been investigated in this article, which is based on the fundamental framework of the mean-variance model in the multi-period version. The liability and random cash flow will affect asset optimization, while the investor may be forced to withdraw from investments with a random probability at each period in our model. The closed-form expressions for the mean-variance optimal portfolio selection and its corresponding efficient frontier are obtained by employing the mean-field formulation and dynamic programming approach. Moreover, some numerical examples are provided to illustrate the validity and accuracy of the theoretical results.

MSC 2010: 49L20; 91G10; 93E20

## 1 Introduction

With an explosive development of the economy in the recent 50 years, it is becoming more common that lots of private assets have been invested in the financial market. After a series of financial crises, the significance of handling private assets has been attached considerably. Mean-variance formulation is a famous tool that aims at balancing the risk and return of the investment. Owing to the seminal work of Markowitz [1], the mean-variance model has provided a fundamental basis for designing the optimal strategy balancing the contradiction between return and risk. Hundreds of applications and extensions have been developed over the past decade. For instance, Merton [2] derived the analytical expression of the mean-variance efficient frontier in a single-period setting. Li and Ng [3] developed the mean-variance model from the single period to the dynamic discrete-time version and derived the analytical solution by using the embedding method to overcome the difficulty of non-separability. Zhou and Li [4] used the same technique and further introduced the stochastic linear quadratic control as a general framework to solve the continuous-time mean-variance portfolio selection problem. Li et al. [5] developed it with the no-shorting constraint. Moreover, some recent approaches [6,7] based on enhanced index tracking are employed to deal with portfolio optimization.

There is no doubt that the embedding method is indeed a classic way to solve the problems with the nonseparable property. We also need to admit that this method is liable to lead to complicated calculation and inefficiency during the derivation of the optimal portfolio selection if the problem has other constraints, such as uncertain exit time, asset-liability management, and serial correlated returns or risk control over bankruptcy. Typically, we will prefer another method called mean-field formulation to the embedding scheme, where a long list of notations should be established, and an auxiliary problem should be assumed.

The mean-field formulation is a simple but powerful tool to derive the optimal strategy of a multi-period mean-variance portfolio selection problem. By using this method, which was first introduced by Cui et al. [8], we can resolve the mean-variance problem with many other additional constraints and derive the optimal strategy in a simpler and more direct manner. Yi et al. [9] used the mean-field method to study the mean-variance model under the uncertain exit time condition but did not consider the cash flow and liability. Cui et al. [10] extend it to the asset-liability management, but none of them considered the situation of random cash flow or investigated the closed-form of computational formulas for a series of coefficients.

Yao et al. [11] studied the mean-variance model with a given level of expected terminal surplus. Li and Xie [12] studied the optimal investment with stochastic income under the uncertain exit time. They derived the analytical optimal strategy and explicit expression of the efficient frontier by using the Lagrange method and traditional dynamic programming with the additional conditions of endogenous liabilities if the investors exit the market randomly. Wu and Li [13] investigated the multi-period mean-variance model with different market states and stochastic cash flows. A reinforcement learning framework is employed to investigate the continuous-time mean-variance portfolio selection [14]. Ni et al. [15] derived equilibrium solutions of multi-period mean-variance and established a general theory to characterize the open-loop equilibrium control problem. However, all of the literature did not consider the correlation among cash flow, asset, and liability, which should be taken into account in the real world because the random cash flow would be affected by the return rate of companies. For example, the government will provide funding to companies in terms of their past performance. Furthermore, since the analytical solution of the mean-variance model contains the correlation coefficient, the optimal strategy will be changed due to different return rates among the asset, cash flow, and liability. Moreover, the uncorrelated case can be regarded as a special case of the correlated one, of which the correlation coefficient is zero. We extended the special case to the general case.

In this paper, we employed the mean-field formulation [8,9,10] to study the general case of correlation in which the financial parameters are correlated at every period. On the basis of the aforementioned mean-field formulation, we have added some additional conditions such as random cash flow and liability to improve the accuracy of the investment strategy. During each time period, the cash flow and risky investment returns are random variables, while the risk-free investment return is deterministic. Furthermore, we have derived the analytical solutions of the mean-variance model which is lacked by using the embedding method [3,11, 12,13]. Employing the embedding method, the classical model mentioned earlier has certain limitations since they need to define a deterministic expectation of surplus, which is a single-objective optimization problem. Besides, the numerical solution needs some algorithms to compute the corresponding best auxiliary parameter or Lagrangian parameter, which will bring the inaccuracy and complexity in simulation. However, the mean-field formulation is more clear and powerful, which offers an analytical solution scheme in solving the nonseparable problems as the principle of optimality no longer applies. When both cash flow and mean-field formulation are presented in the same model, we shed light on the explicit solutions of the optimal portfolio under mean-variance criteria. In this paper, we are not only concerned about the return rate but also concerned with the volatility in the objective function in terms of a multi-objective optimization problem. We study the portfolio selection problem by adopting the mean field, and consider the cash flow, liability, etc. base on the mean variance model. Compared with the numerical solution, the analytical solution we derived in this paper is more efficient and applicable when the aforementioned additional conditions are added to our model.

The rest of the paper is structured as follows. We construct a mean-variance portfolio selection problem with cash flow and define the meaning of some symbols in Section 2. In Section 3, the considered model is equivalently transferred into a linear quadratic optimal stochastic control problem in the mean-field type. Then, we identify the optimal portfolio strategy with closed-form expressions by adopting the dynamic programming approach in Section 4. Some numerical examples are provided in Section 5 to illustrate the accuracy and efficiency of the optimal strategy. Finally, the conclusion and future work are given in Section 6.

## 2 Multi period mean-variance portfolio selection model

We assume the financial market has one liability, one risk-free asset, and n kinds of risky assets within a time horizon T . Let n t represent the deterministic return of the risk-free asset, m t = [ m t 1 , m t 2 , , m t n ] be the vector of n kinds of risky investment return rate, and y t be the rate of liability at period t . In addition, the investor joins the financial market at the beginning of time period 0 and is proposed to quit the investment at time T . Let w 0 denote the wealth at the beginning, while l 0 denotes the initial liability. Every investor can reallocate his/her portfolio selection to maximize the expected return as well as minimize the risk from the start of every time period between 0 and T .

In different time periods t , the random variable y t and the random vector m t = [ m t 1 , , m t n ] are assumed to be statistically independent and are defined from the probability space ( Ω , , P ) . The first two moments are recognized as the only information about y t and m t . We further define that the covariance matrix is positive definite, i.e.,

Cov m t y t = E m t y t m t y t E m t y t E m t y t 0 .

Then, for t = 0 , 1 , , T 1 , we have

n t 2 n t E [ m t ] n t E [ y t ] n t E [ m t ] E [ m t m t ] E [ m t y t ] n t E [ y t ] E [ y t m t ] E [ y t 2 ] 0 .

Let D t = ( D t 1 , , D t n ) = ( m t 1 n t , , m t n n t ) represent the vector of the risky return rate minus the risk-free return rate. According to the aforementioned assumptions, we get

n t 2 n t E [ D t ] n t E [ y t ] n t E [ D t ] E [ D t D t ] E [ D t y t ] n t E [ y t ] E [ y t D t ] E [ y t 2 ] = 1 0 0 1 I 0 0 0 1 n t 2 n t E [ m t ] n t E [ y t ] n t E [ m t ] E [ m t m t ] E [ m t y t ] n t E [ y t ] E [ y t m t ] E [ y t 2 ] 1 1 0 0 I 0 0 0 1 0 ,

where I denotes the n × n identity matrix, and 0 and 1 denote the n -dimensional all-zero and all-one vectors respectively, which signify that

E [ D t D t ] 0 , n t 2 ( 1 E [ D t ] E 1 [ D t D t ] E [ D t ] ) > 0 , E [ y t 2 ] E [ y t D t ] E 1 [ D t D t ] E [ D t y t ] > 0 .

Therefore, 0 < E [ D t ] E 1 [ D t D t ] E [ D t ] < 1 . To express the equation more concisely, we define the following notations:

(1) Z t E [ D t ] E 1 [ D t D t ] E [ D t ] , Z ˜ t E [ c t D t ] E 1 [ D t D t ] E [ c t D t ] , Z ¯ t E [ y t D t ] E 1 [ D t D t ] E [ D t ] , Z ^ t E [ c t D t ] E 1 [ D t D t ] E [ D t ] , Z ˘ t E [ y t D t ] E 1 [ D t D t ] E [ D t y t ] , Z t ¨ E [ c t D t ] E 1 [ D t D t ] E [ D t y t ] .

At the beginning of every period t , investors’ wealth and liabilities are denoted by w t and Q t , respectively. Therefore, the surplus is denoted by w t Q t . If v t i is the money invested in the i th risky investment for i = 1 , 2 , , n at period t , then w t i = 1 n v t i is the money put into the risk-free investment. In this paper, we suppose the liability is exogenous. In other words, the investor’s strategies cannot affect the liability because of its uncontrollability. Let t = σ ( D 0 , D 1 , , D t 1 , c 0 , c 1 , , c t 1 , y 0 , y 1 , , y t 1 ) represent all the information at the initial moment of t period for t = 1 , 2 , , T 1 , and 0 represent the unimportant σ -algebra over Ω . Thus, E [ 0 ] is equal to the unconditional expectation E [ ] . In this paper, all allowable portfolio selection is limited to be t -adapted Markov controls, i.e., v t = ( v t 1 , v t 2 , , v t n ) t . Therefore, D t and v t are independent and t = σ ( w t , Q t ) .

The investor plans to optimize the portfolio selection during the whole time period. However, the investment might be forced to be changed or abandoned at an uncertain time τ before T because of some accidents or unexpected events such as sudden resignation, serious illness, and colossal consumption. The probability mass function of the exogenous random variable κ is p ˜ t = Pr { κ = t } . Thus, the investor will quit the financial market eventually at time T κ = min { T , κ } . We have

p t Pr { T κ = t } = p ˜ t , t = 1 , 2 , , T 1 , 1 j = 1 T 1 p ˜ j , t = T .

The main investigation of this model is to find the optimal portfolio selection, v t = [ ( v t 1 ) , ( v t 2 ) , , ( v t n ) ] , t = 0 , 1 , , T 1 , which can be equivalent to optimizing the following optimal stochastic control problem,

(2) min Var ( κ ) ( w T κ Q T κ ) λ E ( κ ) [ w T κ Q T κ ] , s.t. w t + 1 = i = 1 n m t i v t i + w t i = 1 n v t i n t + c t = n t w t + D t v t + c t , Q t + 1 = y t Q t , for t = 0 , 1 , , T 1 ,

where λ > 0 represents the risk aversion, and

E ( κ ) [ w T κ Q T κ ] t = 1 T E [ w T κ Q T κ T κ = t ] Pr { T κ = t } = t = 1 T E [ w t Q t ] p t , V ar ( κ ) ( w T κ Q T κ ) t = 1 T Var ( w T κ Q T κ T κ = t ) Pr { T κ = t } = t = 1 T Var ( w t Q t ) p t .

Then, we can rewrite the aforementioned model as follows:

(3) min t = 1 T p t { Var ( w t Q t ) λ E [ w t Q t ] } , s.t. w t + 1 = n t w t + D t v t + c t , Q t + 1 = y t Q t , for t = 0 , 1 , , T 1 .

Since the smoothing property is no longer valid on the variance term, we cannot decompose the nonseparable problem into a stage wise backward recursion formulation, which can be tackled with traditional dynamic programming method. We solve it by employing the mean-field method.

## 3 Mean-field formulation

First, we construct the mean-field type of model (3). According to the independence between D t and v t , y t and Q t , the dynamic equations of the expectation of the wealth and liability can be represented as follows:

(4) E [ w t + 1 ] = n t E [ w t ] + E [ D t ] E [ v t ] + E [ c t ] , E [ w 0 ] = w 0 , E [ Q t + 1 ] = E [ y t ] E [ Q t ] , E [ Q 0 ] = Q 0 ,

with t = 0 , 1 , , T 1 .

Combining the dynamic equations in (3) and (4), we have

(5) w t + 1 E [ w t + 1 ] = n t ( w t E [ w t ] ) + D t v t E [ D t ] E [ v t ] + ( c t E [ c t ] ) = n t ( w t E [ w t ] ) + D t ( v t E [ v t ] ) + ( D t E [ D t ] ) E [ v t ] + ( c t E [ c t ] ) , w 0 E [ w 0 ] = 0 , Q t + 1 E [ Q t + 1 ] = y t ( Q t E [ Q t ] ) + ( y t E [ y t ] ) E [ Q t ] , Q 0 E [ Q 0 ] = 0 .

Therefore, we can equivalently reformulate problem (3) into a linear quadratic optimal problem in the mean-field type.

(6) min t = 1 T p t { E [ ( w T Q T E [ w T Q T ] ) 2 ] λ E [ w T Q T ] } , s.t. { E [ w t ] , E [ Q t ] , E [ v t ] } satisfies dynamic equation (4) , { w t E [ w t ] , Q t E [ Q t ] , v t E [ v t ] } satisfies dynamic equation (5), for t = 0 , 1 , , T 1 .

Thus, we are able to solve it by the dynamic programming method since it is separable.

## 4 The optimal strategy

With the notations given in (1), the seven parameters of the sequence { β t } , { η t } , { ξ t } , { ζ t } , { ψ t } , { δ t } , and { Δ t } are deterministic by the following backward recursions

β t = β t + 1 ( s t ) 2 ( 1 Z t ) + p t , η t = η t + 1 ( s t E [ y t ] s t Z ¯ t ) + p t , ξ t = ξ t + 1 E [ y t 2 ] η t + 1 2 β t + 1 1 B t + p t , ζ t = ζ t + 1 s t + p t , ψ t = ψ t + 1 E [ y t ] 2 λ η t + 1 ( E [ y t c t ] E [ y t ] E [ c t ] ) + 2 η t + 1 λ E [ c t ] + λ ζ t + 1 2 β t + 1 ( E [ y t ] Z t Z ¯ t ) + Z ^ t Z ¯ t Z ^ t E [ y t ] 1 Z t + Z t ¨ + p t , δ t = ξ t + 1 ( E [ y t 2 ] E [ y t ] 2 ) + δ t + 1 ( E [ y t ] ) 2 η t + 1 2 β t + 1 Z ˘ t E [ y t ] 2 + ( Z ¯ t E [ y t ] ) 2 1 Z t , Δ t = Δ t + 1 + β t + 1 E [ ( c t ) 2 ] β t + 1 E [ c t ] 2 λ ζ t + 1 E [ c t ] β t + 1 E [ c t ] + λ ζ t + 1 2 β t + 1 Z ^ t 2 Z t 1 Z t 2 E [ c t ] + λ ζ t + 1 2 β t + 1 Z ^ t Z ^ t + Z ˜ t Z ^ t 2 ,

with boundary conditions defined as follows:

β T = p T , η T = p T , ξ T = p T , ζ T = p T , ψ T = p T , δ T = 0 , Δ T = 0 .

The solution scheme adopted in this paper involves two steps. The first step is to construct the cost-to-go functional and derive the backward recursion. The second step is to prove that it still holds at each period according to mathematical induction. Thus, the optimal portfolio strategy can be obtained in the following theorem.

## Theorem 1

Assume that the return rates among asset, liability, and cash flow are correlated. Thus, we have the optimal portfolio selection of problem (6) as follows:

v t E [ v t ] = s t ( w t E [ w t ] ) E 1 [ D t D t ] E [ ( D t ) ] + η t + 1 β t + 1 1 ( Q t E [ Q t ] ) E 1 [ D t D t ] E [ y t D t ] ,

E [ v t ] = ( E [ D t D t ] E [ D t ] E [ D t ] ) 1 E [ c t D t ] E [ c t ] E [ D t ] λ ζ t + 1 2 β t + 1 E [ D t ] η t + 1 β t + 1 ( E [ y t D t ] E [ y t ] E [ D t ] ) E [ Q t ] .

The expected value of optimal wealth can be derived as follows:

E [ w t ] = w 0 k = 0 t 1 s k + j = 0 t 1 E [ c j ] + λ ζ j + 1 2 β j + 1 Z ^ j E [ y j ] + Z ¯ j Z j 1 Z j Z ^ j + Z ¯ j + E [ c j ] l = j + 1 t 1 s l ,

for t = 1 , 2 , , T . Here, ( ) = 1 , ( ) = 0 .

If the additional condition of liability is not considered in our case, the original model (6) would be degenerated to the one mentioned by Yao et al. [11], which will be introduced in the following corollary.

## Remark 1

Assume that an investor participates in the initial investment under uncertain exit time without liability. Thus, the degenerated problem is equivalently reformulated as the following mean-variance model.

(7) min t = 1 T p t { E [ ( w t E [ w t ] ) 2 ] λ E [ w t ] } , s.t. E ( v t E [ v t ] ) = 0 , E [ w t ] satisfies dynamic equation (4) , w t E [ w t ] satisfies dynamic equation (5) .

The optimal strategies of problem 7 are represented as follows:

v t E [ v t ] = n t ( w t E [ w t ] ) E 1 [ D t D t ] E [ D t ] , E [ v t ] = w ζ t + 1 2 β t + 1 1 1 Z t E 1 [ D t D t ] E [ D t ] .

Thus, we get the optimal expected level of wealth

E [ w t ] = w 0 k = 0 t 1 s k + w 2 j = 0 t 1 ζ j + 1 β j + 1 Z j 1 Z j = j + 1 t 1 s .

The optimal strategy of the model in Corollary 1 can be obtained according to Theorem 1, which is consistent with the results derived by Yao et al. [11]. Therefore, the accuracy of the solution derived in this paper has been verified. In comparison, Zhu et al. [16] analyzed the Lagrangian problem via the embedding method and were unable to obtain an analytical form of the optimal objective value function. Thus, they invoked a prime-dual iterative algorithm to identify the optimal Lagrangian multiplier vector. Moreover, compared with the classical embedding method, which needs a Bellman equation and the Lagrangian multiplier, the mean-field formulation has been employed in this paper, which avoids the complicated computation. In the following section, a few numerical examples from real-world applications are given to demonstrate the efficiency of the obtained optimal strategy.

## 5 Numerical example

According to the data given in the study by Elton et al. [17], we investigate a portfolio selection consisting of S&P 500 (SP), the index of emerging market (EM), and small stock (MS) of the U.S. market. Moreover, we consider uncertain exit time and cash flow in the model. Table 1 presents three different assets, a liability, and a random cash flow, and it also presents the expected values, variances, and the correlation coefficients among them. The annual risk free return rate is set as 5 % ( n t = 1.05 ). Here, we ignore the case of uncorrelation between D t and c t , i.e., the return rates and cash flow are correlated.

Table 1

Data for assets and cash flow

SP EM MS Cashflow Liability
Expected return 14 % 16 % 17 % 1 10 %
Standard deviation 18.5 % 30 % 24 % 20 % 20 %
Correlation coefficient
SP 1 0.64 0.79 ρ 1 ρ ^ 1
EM 0.64 1 0.75 ρ 2 ρ ^ 2
MS 0.79 0.75 1 ρ 3 ρ ^ 3
Cashflow ρ 1 ρ 2 ρ 3 1 ρ ^ 4
Liability ρ ^ 1 ρ ^ 2 ρ ^ 3 ρ ^ 4 1

Thus, for every period t , we have the following matrices:

E [ D t ] = 0.09 0.11 0.12 , Cov ( D t ) = 0.0342 0.0355 0.0351 0.0355 0.0900 0.0540 0.0351 0.0540 0.0576 , E [ D t D t ] = 0.0423 0.0454 0.0459 0.0454 0.1021 0.0672 0.0459 0.0672 0.0720 .

The correlation coefficient between cash flow and i th asset is defined as ρ = ( ρ 1 , ρ 2 , ρ 3 ) , while the coefficient between liability and i th asset is defined as ρ ^ = ( ρ 1 ^ , ρ 2 ^ , ρ 3 ^ ) , according to the definition we have

ρ i = Cov ( c t , D t i ) Var ( c t ) Var ( D t i )

and

ρ i ^ = Cov ( y t , D t i ) Var ( y t ) Var ( D t i ) .

In addition, we define the correlation of the cash flow and liability ρ 4 ^ as follows:

ρ 4 ^ = Cov ( c t , y t ) Var ( c t ) Var ( y t ) .

Then, we have

E [ c t D t i ] = E [ c t ] E [ D t i ] + ρ i Var ( c t ) Var ( D t i ) ,

E [ y t D t i ] = E [ y t ] E [ D t i ] + ρ i ^ Var ( y t ) Var ( D t i ) ,

E [ c t y t ] = E [ c t ] E [ y t ] + ρ 4 ^ Var ( c t ) Var ( y t ) ,

E [ c t 2 ] = E [ c t ] 2 + Var ( c t ) ,

E [ y t 2 ] = E [ y t ] 2 + Var ( y t ) .

Assume that ρ = ( ρ 1 , ρ 2 , ρ 3 ) = ( 0.3 , 0.5 , 0.2 ) , ρ ^ = ( ρ 1 ^ , ρ 2 ^ , ρ 3 ^ ) = ( 0.2 , 0.4 , 0.3 ) and ρ 4 ^ = 0.1 . Then,

Cov D t c t = Cov ( D t ) Cov ( c t , D t ) Cov ( c t , D t ) Var ( c t ) = 0.0342 0.0355 0.0351 0.0092 0.0355 0.0900 0.0540 0.0300 0.0351 0.0540 0.0576 0.0120 0.0092 0.0300 0.0120 0.0400 0 .

Substituting the data in the equations, we have E [ c t D t ] = ( 0.0898 , 0.1510 , 0.1440 ) . Moreover, we define the following notations to make the solution more concise,

T 1 = E 1 [ D t D t ] E [ D t ] = 1.0589 0.1196 1.1033 , T 2 = E 1 [ D t D t ] E [ c t D t ] = 0.3490 0.4493 1.6365 , T 3 = E 1 [ D t D t ] E [ y t D t ] = 1.0411 0.1754 0.8209 .

Z t = 0.2145 , Z ^ t = 0.2144 , Z ˜ t = 0.2507 ,

Z ¯ t = 0.0241 , Z ˘ t = 0.0218 , Z t ¨ = 0.0488 .

## Example 1

An example with the terminal exit time

The probability mass function κ is defined as follows:

( α 1 , α 2 , α 3 , α 4 , α 5 ) = ( 0 , 0 , 0 , 0 , 1 ) ,

for t = 1 , 2 , 3 , 4 , 5 . By applying the result of Theorem 1, the optimal portfolio selection of this numerical example can be obtained as follows:

v 0 = 1.02 ( w 0 3.0477 ) T 1 + 1.2053 T 2 Q 0 , v 1 = 1.02 ( w 1 3.2001 ) T 1 + 1.1503 T 2 Q 1 , v 2 = 1.02 ( w 2 3.3601 ) T 1 + 1.0979 T 2 Q 2 , v 3 = 1.02 ( w 3 3.5281 ) T 1 + 1.0478 T 2 Q 3 , v 4 = 1.02 ( w 4 3.7045 ) T 1 + 1.0000 T 2 Q 4 .

Under the certain exit time, we derive the final optimal surplus as follows, E ( w 5 Q 5 ) = 3.3897 and Var ( w 5 Q 5 ) = 0.6135 , respectively.

## Example 2

An example without liability under uncertain exit time

Consider the example as corollary. Here, we ignore the information of liability, i.e., ignore the last line and last column of Table 1 and do not fix the terminal expectation but balance the variance and expectation by the trade-off parameter.

Assume that an investor plans a five-period investment with an initial wealth w 0 = 1 and that the trade-off parameter w = 1 , but he may exit the market at any time t ( t = 1 , 2 , 3 , 4 , 5 ).

To investigate the impact of uncertain exit time on the optimal policy and efficient frontier clearly, we choose four different probability mass functions at the exit time κ , α ( i ) = ( α 1 ( i ) , α 2 ( i ) , α 3 ( i ) , α 4 ( i ) , α 5 ( i ) ) , ( i = 1 , 2 , 3 , 4 ) , as follows:

α ( 1 ) = ( 0.1 , 0.15 , 0.2 , 0.25 , 0.3 ) ,

α ( 2 ) = ( 0 , 0.1 , 0.1 , 0.3 , 0.5 ) ,

α ( 3 ) = ( 0 , 0 , 0.1 , 0.2 , 0.7 ) ,

α ( 4 ) = ( 0 , 0 , 0 , 0 , 1 ) ,

where α ( 4 ) represents that the investor must exit the market at the terminal time.

Then, the optimal expected wealth level

E [ w ] ( i ) = ( E [ w 1 ] ( i ) , E [ w 2 ] ( i ) , E [ w 3 ] ( i ) , E [ w 4 ] ( i ) , E [ w 5 ] ( i ) ) , i = 1 , 2 , 3 , 4 ,

which are given by

E [ w ] ( 1 ) = ( 1.2675 , 1.5210 , 1.7659 , 2.0055 , 2.2423 ) , E [ w ] ( 2 ) = ( 1.3006 , 1.5723 , 1.8304 , 2.0756 , 2.3159 ) ,

E [ w ] ( 3 ) = ( 1.3220 , 1.6125 , 1.8781 , 2.1304 , 2.3735 ) , E [ w ] ( 4 ) = ( 1.3451 , 1.6557 , 1.9392 , 2.2017 , 2.4483 ) .

Therefore, the optimal strategy is specified as follows:

v 0 ( 1 ) * = ( 1.05 w 0 + 2.0635 ) T 1 , v 0 ( 2 ) * = ( 1.05 w 0 + 2.2182 ) T 1 , v 1 ( 1 ) * = ( 1.05 w 1 + 2.2175 ) T 1 , v 1 ( 2 ) * = ( 1.05 w 1 + 2.3291 ) T 1 , v 2 ( 1 ) * = ( 1.05 w 2 + 2.3841 ) T 1 , v 2 ( 2 ) * = ( 1.05 w 2 + 2.4879 ) T 1 , v 3 ( 1 ) * = ( 1.05 w 3 + 2.5596 ) T 1 , v 3 ( 2 ) * = ( 1.05 w 3 + 2.6384 ) T 1 , v 4 ( 1 ) * = ( 1.05 w 4 + 2.7423 ) T 1 , v 4 ( 2 ) * = ( 1.05 w 4 + 2.8159 ) T 1 ,

v 0 ( 3 ) * = ( 1.05 w 0 + 2.3182 ) T 1 , v 0 ( 4 ) * = ( 1.05 w 0 + 2.4256 ) T 1 , v 1 ( 3 ) * = ( 1.05 w 1 + 2.4341 ) T 1 , v 1 ( 4 ) * = ( 1.05 w 1 + 2.5468 ) T 1 , v 2 ( 3 ) * = ( 1.05 w 2 + 2.5558 ) T 1 , v 2 ( 4 ) * = ( 1.05 w 2 + 2.6742 ) T 1 , v 3 ( 3 ) * = ( 1.05 w 3 + 2.7103 ) T 1 , v 3 ( 4 ) * = ( 1.05 w 3 + 2.8079 ) T 1 , v 4 ( 3 ) * = ( 1.05 w 4 + 2.8735 ) T 1 , v 4 ( 4 ) * = ( 1.05 w 4 + 2.9483 ) T 1 ,

where T 1 is the same as Example 1. The optimal variances under the best strategy can be derived as follows:

Var ( w ) ( i ) = ( Var [ w 1 ] ( i ) , Var [ w 2 ] ( i ) , Var [ w 3 ] ( i ) , Var [ w 4 ] ( i ) , Var [ w 5 ] ( i ) ) , i = 1 , 2 , 3 , 4

which are given as follows:

Var ( w ) ( 1 ) = ( 0.1731 , 0.2824 , 0.3489 , 0.3860 , 0.4026 ) , Var ( w ) ( 2 ) = ( 0.2299 , 0.3555 , 0.4260 , 0.4554 , 0.4626 ) , Var ( w ) ( 3 ) = ( 0.2710 , 0.4190 , 0.4882 , 0.5146 , 0.5140 ) , Var ( w ) ( 4 ) = ( 0.3188 , 0.4930 , 0.5744 , 0.5978 , 0.5860 ) .

Thus,we have

E ( κ ) [ w 5 κ ] ( 1 ) = 1.8821 , Var ( κ ) ( w 5 κ ) ( 1 ) = 0.3467 , E ( κ ) [ w 5 κ ] ( 2 ) = 2.1209 , Var ( κ ) ( w 5 κ ) ( 2 ) = 0.4461 , E ( κ ) [ w 5 κ ] ( 3 ) = 2.2753 , Var ( κ ) ( w 5 κ ) ( 3 ) = 0.5115 , E ( κ ) [ w 5 κ ] ( 4 ) = 2.4483 , Var ( κ ) ( w 5 κ ) ( 4 ) = 0.5860 .

Figure 1 depicts the efficient frontier with different probability mass function of the exit time. We can see that the one exits at the terminal time gets the most expected wealth return at the same risk level compared with others. It is also indicated that if the investment is more stable, the investors can obtain higher expected returns at the same level of the risk, which is consistent with the real life.

Figure 1

Efficient frontiers with different probability mass functions of exit time.

## Example 3

An example under uncertain exit time with liability

The probability mass function of an exit time κ is defined as follows:

( D 1 , D 2 , D 3 , D 4 , D 5 ) = ( 0.10 , 0.15 , 0.2 , 0.25 , 0.3 ) .

Thus, the optimal expected value of assets in different time periods is given by

E [ w ] = ( 4.3710 , 5.7834 , 7.2450 , 8.7621 , 10.3403 ) .

Suppose the initial wealth of the investor w 0 = 3 , initial liability Q 0 = 1 , and risk aversion parameter λ = 1 , we can derive the optimal portfolio selection after substituting the number to the aforementioned equations in Theorem 1:

v 0 = 1.05 ( w 0 4.9032 ) T 1 T 2 + 0.1595 T 3 Q 0 , v 1 = 1.05 ( w 1 6.1660 ) T 1 T 2 + 0.2377 T 3 Q 1 , v 2 = 1.05 ( w 2 7.4853 ) T 1 T 2 + 0.3458 T 3 Q 2 , v 3 = 1.05 ( w 3 8.8694 ) T 1 T 2 + 0.5373 T 3 Q 3 , v 4 = 1.05 ( w 4 10.3209 ) T 1 T 2 + 1.0000 T 3 Q 4 .

Furthermore, the final value of mean and variance under the optimal strategy are E ( κ ) ( w 5 κ ) = 8.0462 and Var ( κ ) ( w 5 κ ) = 0.3901 , respectively.

Following Example 2, we choose four different probability mass functions at the exit time κ , α ( i ) = ( α 1 ( i ) , α 2 ( i ) , α 3 ( i ) , α 4 ( i ) , α 5 ( i ) ) , ( i = 1 , 2 , 3 , 4 ) , as follows:

α ( 1 ) = ( 0.1 , 0.15 , 0.2 , 0.25 , 0.3 ) , α ( 2 ) = ( 0 , 0.1 , 0.1 , 0.3 , 0.5 ) , α ( 3 ) = ( 0 , 0 , 0.1 , 0.2 , 0.7 ) , α ( 4 ) = ( 0 , 0 , 0 , 0 , 1 ) .

Figure 2 is the efficient frontier of M–V model with liability and random cashflow under uncertain exit time. It can be seen that as the expectation go up, the more stable the investment, the less risk it takes, which has the same conclusion as Figure 1. Actually, Example 2 is a special case of Example 3, where we degenerate the term of liabilities to zero.

Figure 2

Efficient frontiers with different exit time.

## 6 Conclusion

The focus of the paper is placed on investigating the optimal strategy of multi-period mean-variance model with cash flow, and liability under uncertain exit time. It is a nonseparable dynamic programming problem that cannot be solved by the traditional method. In this paper, we transform the original model into a mean-field type and apply a dynamic programming approach and matrix theory to derive the optimal strategy explicitly. Our methods are shown to be much more efficient and accurate compared with other methods in the literature. For further research, we will try to employ the mean-field method to derive the mean-variance model with various additional conditions such as regime switching, bankruptcy constraints, and time inconsistency.

## Acknowledgements

The authors express their appreciation for the anonymous referees comments and suggestions.

1. Funding information: This work was sponsored by the Philosophy and Social Science Planning Project of Guangdong Province (Grant No. GD20YGL12), Basic and Applied Basic Project of Guangzhou City (Grant No. 202102020629), Philosophy and Social Science Planning Project of Guangzhou City (Grant No. 2021GZGJ48), National Natural Science Foundation of China (Grant No. 71771058), and Guangdong Basic and Applied Basic Research Foundation (Grant No. 2020A1515110991).

2. Conflict of interest: The authors state no conflict of interest.

## Appendix

The Proof of Theorem 1

## Proof

Given an information set t , it is easy to know it has the following cost-to-go functional

J t ( E [ w t ] , w t E [ w t ] , E [ Q t ] , Q t E [ Q t ] ) = min v t E [ J t + 1 ( E [ Q t + 1 ] , Q t + 1 E [ Q t + 1 ] , E [ w t + 1 ] , w t + 1 E [ w t + 1 ] ) t ] + p t ( w t Q t E [ w t Q t ] ) 2 p t λ E [ w t Q t ] .

From time t + 1 , we have the following cost-to-go functional:

(8) J t + 1 = β t + 1 ( w t + 1 E [ w t + 1 ] ) 2 2 η t + 1 ( w t + 1 E [ w t + 1 ] ) ( Q t + 1 E [ Q t + 1 ] ) + ξ t + 1 ( Q t + 1 E [ Q t + 1 ] ) 2 + λ ψ t + 1 E [ Q t + 1 ] λ ζ t + 1 E [ w t + 1 ] + δ t + 1 E [ Q t + 1 ] 2 + Δ t + 1 .

Next, we will prove that the aforementioned formulation (7) still hold at time t according to mathematical induction. For the given σ -algebra at period t , we have

J t ( E [ w t ] , w t E [ w t ] , E [ Q t ] , Q t E [ Q t ] ) = E [ J t + 1 ( E [ w t + 1 ] , w t + 1 E [ w t v ] , E [ Q t + 1 ] , Q t + 1 E [ Q t + 1 ] ) t ] + p t ( w t Q t E [ w t Q t ] ) 2 p t λ E [ w t Q t ] = E [ β t + 1 ( w t + 1 E [ w t + 1 ] ) 2 2 η t + 1 ( w t + 1 E [ w t + 1 ] ) ( Q t + 1 E [ Q t + 1 ] ) λ ζ t + 1 E [ w t + 1 ] + ξ t + 1 ( Q t + 1 E [ Q t + 1 ] ) 2 + δ t + 1 E [ Q t + 1 ] 2 + λ ψ t + 1 E [ Q t + 1 ] + Δ t + 1 t ] + p t ( w t Q t E [ w t Q t ] ) 2 p t λ E [ w t Q t ] = E [ β t + 1 [ s t ( w t E [ w t ] ) + D t ( v t E [ v t ] ) + ( D t E [ D t ] ) E [ v t ] + ( c t E [ c t ] ) ] 2 + ( D t E [ D t ] ) E [ v t ] + ( c t E [ c t ] ) ] + ξ t + 1 [ y t ( Q t E [ Q t ] ) + ( y t E [ y t ] ) E [ Q t ] ] 2 2 η t + 1 [ y t ( Q t E [ Q t ] ) + ( y t E [ y t ] ) E [ Q t ] ] [ s t ( w t E [ w t ] ) + D t ( v t E [ v t ] ) λ ζ t + 1 ( s t E [ w t ] + E [ D t ] E [ v t ] + E [ c t ] ) + λ ψ t + 1 E [ y t ] E [ Q t ] + δ t + 1 ( E [ y t ] E [ Q t ] ) 2 + Δ t + 1 t ] + p t ( w t Q t E [ w t Q t ] ) 2 p t λ E [ w t Q t ] = β t + 1 [ s t 2 ( w t E [ w t ] ) 2 + ( v t E [ v t ] ) E [ D t D t ] ( v t E [ v t ] ) + ( E [ ( c t ) 2 ] E