A Modified Markowitz Multi-Period Dynamic Portfolio Selection Model Based on the LDIW-PSO

Modern financial market is an extremely complicated nonlinear system, while gaming and speculation in the market makes the returns and risks of financial assets a great deal of uncertainty. How to construct an effective portfolio, realize the maximization of portfolio returns and the minimization of risks, and optimize the investment capital allocation efficiency are becoming increasingly a hot topic. This paper discusses a revised Markowitz Multi-period Dynamic portfolio mode by introducing LDIW-PSO in the process of solving the optimal investment weight. The LDIW-PSO has greatly improved the efficiency of searching the optimal weight of the portfolio. In addition, this paper introduces exponential-revised Sharpe ratio (Ex-Sharpe) as the objective function and adopts the optimal variance bound to reflect the real risk preferences of the investors in the financial markets better and modify covariance estimation errors of Mean-Variance model. The empirical study results show that the LDIW-PSO is very suitable for solving the dynamic portfolio model, and the exponential-revised Sharpe ratio can reflect financial market investment situation accurately and avoid covariance errors effectively.


Introduction
Modern financial market is an extremely complicated nonlinear system, while gaming and speculation in the market makes the returns and risks of financial assets a great deal of uncertainty.How to construct an effective portfolio, realize the maximization of portfolio returns and the minimization of risks, and optimize the investment capital allocation efficiency is becoming increasingly a hot topic.Markowitz (1952) put forward the portfolio model, using mean to show earnings of portfolio expectations and variance to measure the risks of portfolio.He established the Mean-Variance model to optimize investment configuration of portfolio and laid the foundation of modern financial portfolio model theories.After that, studies on portfolio model began to emerge in endlessly, but problems of positive of covariance estimates, extremum weight problems caused by the fluctuation of rate of return and covariance fast estimation in large-scale portfolio were also found by people gradually.Many scholars try to resolve the limitations of the Mean-Variance model by loosening model hypothesis condition and simplifying model assumptions.Based on the study of the Markowitz, Sharpe and others (1964) proposed the Capital Assets Pricing model (CAPM), describing the relationship between the assets returns and risks, the market returns and risks accurately.On the basis of the CAPM, Ross (1976) proposed the Arbitrage Pricing Theory(APT), associating the expected returns of assets and multiple linear factors.
In addition to simplifying the portfolio model assumptions, researchers have been trying to solve difficulties of portfolio model in the framework of the Markowitz Mean-Variance Model.However, before the intelligent algorithm came out, the problem of covariance fast estimation of large-scale portfolio in Markowitz Portfolio Model was unable to be solved effectively and the fast calculation of optimal investment weight was facing with many difficulties.Therefore, application of portfolio model of large-scale in financial market is not realistic.In recent years, along with the rapid development of artificial intelligence technology, various kinds of intelligent algorithm are springing up constantly.Holland and Goldberg (1989) put forward the genetic algorithm (GA), simulated Darwin's genetic selection and biological evolution process of natural selection, searched the solution domain and got the optimal value.Kennedy and Eberhart (1995) proposed the Particle Swarm optimization algorithm (PSO), simulated the process of birds feed on and searched the global optimal solution.At the same time, the application of intelligent optimization algorithm to solve large-scale portfolio weight estimation problem have been recognized increasingly.Aranha and Hitoshi (2009) came up with a portfolio expressive method and solved the model based on the genetic algorithm.Hirasawa solved time adaptive problem of portfolio optimization model by establishing the genetic network programming model (Chen, Mabu, & Hirasawa, 2010).Alberto Fernández and Sergio Gomez (2007) solved the portfolio optimization problem by using the neural network algorithm.
These literature have applied optimization algorithm to solve portfolio model, but the application of optimization algorithm to solve multi-period dynamic portfolio selection model has not received attentions yet.Traditional intelligent algorithm has defects such as slow convergence speed and being trapped into local optimal solution easily, which will greatly affect the multi-period dynamic portfolio solution efficiency.PSO based on the strategy of LDIW can solve the problem of insufficient optimization in the process of convergence effectively (Arasomwan & Adewumi, 2013).So we applied PSO based on the strategy of LDIW in this article, successfully solved the establishment of large-scale portfolio investment weight problem under the framework of Markowitz mean -variance.We used Rolling Forecast to establish the weights of multi-period dynamic portfolio and got portfolio returns in multi-period.After getting investment returns, we compared portfolio returns with the stock market returns in China and made a comparison between the variation of returns under the condition of short selling and without short selling.We also validated the effectiveness of the Markowitz multi-period dynamic portfolio in Chinese stock market.

Markowitz Multi-Period Dynamic Portfolio Selection Model
The Multi-period Dynamic Portfolio Selection Model in this paper complies with the following assumptions according to the Mean-Variance Model of Markowitz (Markowitz, 1952): 1) All kinds of assets n are risky, and the rate of return is fluctuant.
2) Short selling is allowed, that is, 3) The rate of return of all assets accords with normal distribution, and each rate is linearly independent.4) Investment on each asset is infinitely divisible.5) There is no transaction cost.
Supposed that there are s portfolio cycles and the window day is s in the first p investment period.A certain portfolio has N kinds of risk securities, thus the logarithm return series of the first i kind of securities should be , , i p q r in the first q day of the first p investment period.
depending on the historical yield estimation, and we estimates the covariance matrix F as following equation 1: Assumed the weight of the first i kind securities in the portfolio in the first p investment period is , ip x , and its logarithm return series is ,, i p q r .So we construct the investment weight matrix p X and the rate of return matrix p R in the first p investment period as following equation 2: We define the expected return


(4) In practice, considering the proportion of capital, the sum of weights in the portfolio must be 1.Because short selling is allowed, the weight of each stock can be less than 0. Given leverage t, the absolute value of investment ratio of each security should be no more than t.The portfolio must satisfy the constraint conditions as following equation 5: In this article, we take t as 1, meaning that the current trading is a non-leveraged deal.
In order to make the portfolio to achieve the optimal configuration, we construct the exponential-revised Sharpe ratio (Ex-Sharpe) p SR to measure the efficiency of investment, as equation 6, which gives more attention to increase of rate of return in degree under the unit risk and reflects the investors' appetite for risk in the investment market more accurately.
To reflect the investor's risk preference better, we also fixed the estimation deviation problem of variance caused by the non-positive definite covariance matrix in the traditional portfolio model.We set up the Optimal Variance Boundary for portfolio to reflect the investors' appetite for risk better, as shown in equation 7.In this article, is 0.0005, is 0.25.
Combined with the classic Mean-Variance Model proposed by Markowitz (1952), the dynamic portfolio optimization problem can eventually turns into the optimal investment proportion each period within the boundary of the variance.
After obtaining the optimal weight p X in the first p period, we adopt the method of the rolling investment, applying the weight in the first p period to the next investment period.After holding the portfolio over an investment cycle, we calculate the dynamic investment return in the first p+1 period according to each asset return of the next investment period, as following equation 10.
(10) Repeat this process s-1 times and get returns of s-1 investment period.the income Sum up all of these returns and get the comprehensive return of multi-period dynamic portfolio, as following equation 11.


  , ,......, as the current position of the particle i ,   1 2 , ,......, , meaning that the best location the whole particle swarm have searched for in time k.The specific solving steps are as follow: Step 1: Initialize the particle population.Set .Randomly generate L particles k k ( ( ), ( )) k p X l V l  according to the specific problem, of which , are respectively the position vector and the velocity vector of the first l particle.
Step 2: Calculate the current fitness of each particle ( ), ( ) ( . Step 3: Update the local and global optimal individual.Find out the best fitness value of each individual so far, written as ()   k p F l , and record its corresponding position vector x l  ( ), ( ),..., ( )) .Find out the best fitness value of the whole group () k g F l so far, and record its corresponding position vector as ()

., ( )) .
Step 4: Update the position vector and the velocity vector of individual and produce the next generation of particle swarm.In order to prevent the particles away from the search space, the particles' velocities are limited in [ , ] max max vv  in each dimension.To avoid being trapped into the local optimum and speed up the convergence speed of the algorithm, we introduce the inertia weight ω to update the speed, as following equations 12 and 13, where rand is the random number varying in [0,1], c 1 and c 2 are acceleration coefficients, and we take as 0.5 and 1.5 from experience.ω is the inertia weight, which can control the algorithm's searching ability and avoid falling into the local optimum.The calculation formula of ω adheres to the principles of the LDIW, as equation 14.
(14) Under the principles of the LDIW, the inertia weight of particle swarm velocity ω presents a decreasing trend with the increase of algebra.Under this strategy, PSO can search a large area of space when evolution algebra is smaller, and avoid falling into local optimum at the early stage of optimization.While when evolution algebra is bigger, because of the decrease of the permission to weight, it can search the space around of the current particle more careful in later period.For large-scale multi-period Portfolio optimization problem, avoiding plunging into local optimum in the early period and fine search for optimal solution in later period are particularly important due to the dimensions of the portfolio are wide, and a small change in weight can dramatically change portfolio performance.Therefore, LDIW-PSO is very suitable for large-scale portfolio optimization problem.
According to discoveries by Shi and Eberhart (1999), when is 0.95 and min  is 0.2, the optimization effect achieves the best.So we use these two values for a linear weighted ω.
Stept 5: Examine whether it meets the algorithm iterative termination conditions, as shown in equation 15.If it does, then stop the iteration and output the optimal result, otherwise, make 1 k k   and turn to b.The terminating condition is k K  , where K is the preset maximum number of iterations to avoid excessive optimization and in this article we set it as 800 generations.
In the equation,  is the given accuracy.

The Empirical Results
In order to better reflect the representative investment research objects in China security market, we select 50 constituent stocks in Shanghai 50 index as the research object, and introduce the Shanghai composite index as the market average.The sample selection time is from January 1, 2011 to October 31, 2014, 925 samples in all.
i max  The stock quote data in this article comes from Yahoo Finance.Tab.1 reflects some basic statistical indicators of rate of return data of these 50 stocks.Figure 1 shows the rate of return of the Shanghai composite index in 925 trading days.Due to the large number of samples, we choose the window period as 25 days, namely we adjust the weight of portfolio every other 25 days.We adopt rolling forecast method to transact data, namely the establishment of the portfolio weight in the current period is based on the covariance of rate of return in the previous period.Figure 3 shows the solving process of PSO in MATLAB.According to the investment weight of each investment period in Figure 4, we can see that the stock weight changes obviously in 37 investment period and there is no continuously extreme weight, which illustrate the effectiveness of the portfolio strategy.We can also distinguish strengths and weaknesses of stocks in current investment period from 15 stocks successfully.According to Figure 5, the probability of totalitarian appearing in the early and late stage of the investment period is bigger, while less at intervals throughout the whole investment period, which express that divergence is more serious at the beginning and the end of investment period.Under this situation, an effective portfolio strategy can not only avoid risks, but also make profits from price gap. Figure 6 shows prices of the top 10 stocks fluctuate greater in the portfolio and they often appear extreme weights, while because of the steady prices of the last 5 stocks, they appear rare extreme.From this perspective, an effective portfolio can also identify historical volatility size of stocks.
The returns of portfolio are shown in Figure 7.According to the results in Figure 7, we can find that after optimization of portfolio, the rate of return accumulated is significantly higher than the rate of return of the Shanghai composite index, which means that under the condition of short-selling, portfolio under the framework of Mean-Variance Model is more efficient than the market index, and adopting PSO in optimizing the dynamic portfolio equation is also in good effect.And its calculation is very fast, so it can be generalized in the capital market.

Conclusions
After carrying on the empirical analysis of the LDIW-PSO Multi-period Dynamic Portfolio Selection Model created in this paper, we found that LDIW-PSO improve the convergence of optimization algorithm and have a great effect on avoiding local optimum in solving process.While the multi-period dynamic portfolio selection model under the framework of Markowitz has a large number of stocks in a portfolio, and small changes in weights of stocks can have a huge impact on the final result, so it is very suitable to use LDIW-PSO to solve.The final optimization results also illustrate its strong reliability.
In addition, in the construction of the model, we use Ex-Sharpe and optimal variance boundary to reflect returns risks preferences of investors better in financial markets and modify the estimation bias issues of covariance in the Mean-Variance portfolio model.The empirical results show that these two methods play an important role in modifying models, at the same time, they also enhance the reliability of solving optimal weights.
According to the stocks weights value data solved in the empirical research, we can find that portfolio with a long-term price trend, moderate volatility and a strong negative correlationship is suitable for the Multi-period Dynamic Portfolio Model constructed in this paper.However, for the portfolio in a price shock, with a common price trend and abnormal volatility of stock, results may not be perfect when using this model.Therefore, choosing a suitable portfolio to be applied to the dynamic portfolio model is also very important.
Based on the empirical results, we can get the following conclusions: LDIW-PSO is well suited to optimize the investment portfolio model, and the Ex-Sharpe can reflect the risks preferences of investors in the capital market well.The structure of this model is simple, and its calculation is fast.Its investments have a great effect, and are suitable for generalizing in the capital market.
Particle Swarm Optimization Algorithm (PSO) Based on the Strategy of LDIW The Particle Swarm Optimization algorithm was presented by Kennedy and Eberhart in 1995 as a group intelligent algorithm.It regards each particle as no volume and flying in an uncertain speed in certain search space.And its speed adjusts in time according to their historical and their peers' experiences.The basic principles are: set   1 2

Figure 1 .
Figure 1.The rate of return of the Shanghai composite index

Figure 3 .
Figure 3.The solving process of PSO

Figure 4 .
Figure 4.The investment weights of 15 stocks in 37 periods

Figure 7 .
Figure 7. Contrast figure of returns in each period and returns accumulated of the portfolio as the best fitness location it has experienced, which is known as the best position an individual obtain in time k .The best position the whole particle swarm have searched for is

Table 1 .
The statistical properties of rate of return of the Shanghai composite index and some of the Shanghai 50 index