Portfolio selection based on a nonlinear neural network: An application on the Istanbul Stock Exchange (ISE30)

Heuristic techniques have used frequently in portfolio optimization problem. However, almost none of these techniques used a neural network to allocate the proportion of stocks. The main goal of portfolio optimization problem is minimizing the risk of portfolio while maximizing the expected return of the portfolio. This study tackles a neural network in order to solve the portfolio optimization problem. The data set is the daily price of Istanbul Stock Exchange-30 (ISE-30) from May 2015 to May 2017.  This study uses Markowitz’s Mean-Variance model. Indeed, the portfolio optimization model is quadratic programming (QP) problem. Therefore, many heuristic methods were used to solve portfolio optimization method such as particle swarm optimization, ant colony optimization etc. In fact, these methods do not satisfy stock markets demands in the financial world. This study proposed a nonlinear neural network to solve the portfolio optimization problem.


INTRODUCTION
Portfolio optimization problem is a very prominent issue in the …nancial world. Up to 1950's, traditional portfolio approach was dealing with just minimizing risk. Harry Markowitz had proposed modern portfolio theory [1,2] which is the kernel of portfolio optimization. In this problem, the main goal is that while maximizing the expected return, in the meanwhile risk of portfolio is minimizing. Markowitz's portfolio optimization problem is denominated mean-variance model. Indeed, the mean-variance model serves to estimate the proportion of stocks that investors 1710 ILGIM YAM AN AND TÜRKAN ERBAY DALKILIÇ will buy and hold. However, the optimization method is not su¢ cient for today's …nance world. The main problem is solving a large-scale quadratic programming problem. Actually, this problem is an NP-hard (non-deterministic polynomial time hardness) problem which requires long computing time. Konno and Yamazaki [3] replace risk function in Markowitz mean-variance model with the absolute deviation of risk function and formulates a mean absolute deviation portfolio optimization model. Many models are generated based on Markowitz mean-variance model. Mean-Var model is proposed by Jorion [4]. Simaan [5], compares the mean-variance model with the mean absolute deviation model. Moreover, Rockafellar and Uryaser [6], studied mean-cvar model. Yan [7] proposed multi-period semi-variance model. Junhui et al. [8], presented nonlinear futures hedging model based on skewness risk and kurtosis risk. These models which owing to probability theory, need the exact estimation: mean of return, variance, and covariance.
In operational research, Konno and Wijayanayake [9] proposed a branch and bound algorithm for calculating the optimal solution of a portfolio selection problem under concave transaction costs and minimal transaction unit constraints. For the portfolio selection algorithm, Lai et al. [10] used a double-stage genetic. Chen and Yaotang [11] suggested a partitioned portfolio insurance strategy and a relational genetic algorithm centered relational encoding to optimize the new partitioned portfolio insurance strategy. Charpentier and Oulidi [12] proposed a simple method to estimate the optimal allocation based on a Value-at-Risk minimization constraint, in addition, it derives empirical-con…dence intervals. Juan [13] considered portfolio optimization algorithm for multi-objective planning. Presented method formed genetic algorithm with multi-objective optimization portfolio planning system. Yutao et al. [14] o¤ered a memetic immune algorithm for multi-objective optimization by introducing the pareto dominance which is based on descent operator and the di¤erential evolution operator. Jie et al. [15] presented an optimization model of microgrid multi-objective economic dispatch that adopted the maximum fuzzy satisfaction degree method in order to alter the multi-objective optimization problem to a non-linear single-objective optimum problem.
After developing in the fuzzy set theory, the fuzzy theory has been used in the many portfolio optimization research. Yong et al. [16] represent a bi-objective mixed project portfolio selection model and a fuzzy mixed projects and securities portfolio optimization model. Jiuping et al. [17] proposed an integrated fuzzy random portfolio selection model with a chance constraint. Thus, the developed model consists of fuzzy random returns and the equivalent partitions of two types of chance constraints.
In order to solve QP problems, simplex method, interior point method, active set method and gradient projection method are commonly preferred. These methods could not meet real-life requirements beside require much computational time and cost. In 1985, in order to solve linear programming problem, Tank and Hop…eld [18] proposed recurrent neural network based on a gradient method. The major advantage of this method is its implementation by using analog electronic circuits. These circuits operate in parallel, which leads to minimizing computational time. That study pioneered the neural network models. Kennedy and Chua [19] proposed a method based on Karush-Kuhn-Tucker conditions which guaranteed convergence. However, this method merely gives an approximated optimal solution. Maa and Schanblatt [20] developed a two-phase model that meets the exact solution. Unfortunately, their model which is relatively complex requires a careful system parameter selection. Zhang and Constantinides [21] invented the lagrangian programming neural network. In this method, dummy variables are presented as new variables in order to cope with inequality constraints. Resulting variables bring about the high dimension which have need for more computation. Dissimilarly, Wang [22] added a time-variant variable to the neural network to solve the linear programs. Xia [23] overcomes all these obstacles by solving primal and dual problems simultaneously. In 2000, Nguyen [24] presented a recurrent neural network model having Xia's models advantages. Moreover, it has faster convergence rate and a more intuitive economic interpretation. In 2014, QP problems can solve with the improved model proposed by Yan [25].
Portfolio optimization model as a backbone of the …nance theory whose neural networks are used to plot e¢ cient frontier associated with the portfolio selection problem [26]. Recently, the neural network has been frequently used in …nancial expectations. Bohra [26] classi…ed stocks with a membership of expected returns.
In this study, proposed the neural network is adapted to solve portfolio optimization problem by solving primal and dual problems simultaneously. In this respect, we use ISE-30 dataset to solve the nonlinear neural network. This paper is organized as: In section 2, portfolio selection is given. In section 3, recurrent nonlinear neural network is described. In section 4, we propose a nonlinear neural network algorithm for solving portfolio selection problem. In Section 5, we present some experimental results. In Section 6, we …nish with some discussion.

PORTFOLIO SELECTION
The trade-o¤ between risk and expected return is a very important issue for the investors. Standard portfolio optimization is presented in 1959 by Markowitz. The main purpose of this problem is to minimize risk while ensuring that the portfolio has an expected return of R and that the proportions sum to one. Standard portfolio optimization determines stocks proportions (x i : i = 1; 2; :::; N ) where N indicates number of stocks that investors could be selected. The standard portfolio optimization problem is a nonlinear programming model that is shown by Eq. (1).
:::; N Expected return of portfolio, risk of portfolio and Sharpe Ratio denotes with respectively; where N is the number of assets in the portfolio, i presents expected return of the i th asset. ij is the correlation between the i th and j th assets and x i ; i th assets' proportion of being in the portfolio. R* is the expected return in the portfolio. R f is the risk-free rate of return. The main goal is that getting a proportion of assets' being in the selected portfolio (x i ). One of the methods that solves this nonlinear programming problem is a nonlinear neural network.

NONLINEAR NEURAL NETWORK
Nguyen [24] presented a nonlinear neural network for solving linear programming models. Nguyen's network solves the primal problem and dual problem simultaneously. Fig. 1 [24] demonstrates the con…guration of a primal neuron. The nonlinear neural network consists of two layers. One of that is primal neuron and the other one is dual neuron. Inputs of primal neurons are outputs of dual neurons and derivatives. Similarly, inputs of dual neurons are outputs of primal neuron and their derivatives. In contrast to Tank and Hop…eld's [18] proposed algorithm, Nyguyen's neural networks'neurons is symmetric. Structure of the nonlinear neural network is shown in Fig.2 [24]. The improvement in this method is not only dual neurons is taken an input of model but also their derivatives. This structures ensure nonlinearity into system. The dual neurons have a similar con…guration. Nguyen's neural network is extended by Yan [25] in order to solve quadratic programming problems. Background information is given in such articles [23][24][25][26][27][28][29][30].

M in
x 0 x and e are n-dimensional vectors, Q is an n n symmetric positive de…nite matrix, D 2 R p n , A 2 R m n , b 2 R p 1 , c 2 R m 1 The Lagrangian function of this minimization problem can be written as where z 2 R p + = fz 2 R p jz 0g y 2 R m are Lagrangian multipliers. According to Karush-Kuhn-Tucker (KKT) conditions, x is a solution of Lagrangian function given by Eq. (4) if there exists y 2 R m ; z 2 R p + so that (x ; y ; z ) satis…es the conditions which are given by Eq. (5): Qx + e D T y A T z 0; x T (Qx + e D T y A T z ) = 0; b Dx = 0; c Ax 0; z T (c Ax ) = 0: Yan [25] proposed the recurrent neural network for solving quadratic programming problem given in Eq. (6).

NONLINEAR NEURAL NETWORK FOR PORTFOLIO OPTIMIZATION PROBLEM
Standard portfolio optimization problem is a simple nonlinear programming problem. Indeed, the main goal is minimizing risk while ensuring that R is the expected return of the portfolio and the total proportion of stocks equals to one. Nonlinear neural network solves nonlinear programming problems. Primal and dual problems which are nonlinear programing problems solved simultaneously. Outputs of dual neurons and their derivatives are the inputs of primal neurons, similarly the primal neuron's outputs and derivatives are the inputs of dual neurons and their derivatives. This paper proposed a neural network in order to solve portfolio optimization problem is given in Eq. (7a-c). The topology of this neural network is given by Fig. 3.
Step2: Assignee mean and variance of stocks to the corresponding variables ; .
Step3: Calculate …rst node in order to get (x + k _ x)

Figure 3. Topology of neural network for solving portfolio optimization
Step4a: Take …rst node's output as an input to calculate _ y as an output by using Eq. (7b).
Step5a:Take _ y and y as an input in order to calculate node i.e (y + k _ y).
Step5b:Take _ z and z as an input in order to calculate node i.e T (z + k _ z).
Step6: Calculate _ x by using former nodes outputs as an input of the last node by using Eq. (7a).
Step7: If termination criteria are satis…ed, go to Step 8 if not satis…ed go to Step 3.
Step8: Calculate expected return, risk and Sharpe ratio of the portfolio with selected proportions of x i by using Eq. (2).

Computational Experiments
In this section, we present the results obtained nonlinear neural network that solved portfolio optimization problem. The test data which is Istanbul Stock Exchange 30 data were obtained from https://tr.investing.com/.com. This data corresponds to daily prices between June 2015 and May 2017 which is totally 480 days. There are 30 di¤erent stocks whose abbreviations are given by Table-4 in Appendix. To indicate advantages and e¤ectiveness of proposed algorithm, comparison is done between heuristic and traditional methods. The traditional method which is active set method to solve quadratic optimization problem is an iterative method that solves a sequence of equality-constrained quadratic problems. This method consists of two phase. In the …rst phase, objective is ignored while feasible point found for the constraints. In the second phase the objective is minimized while feasibility is maintained. The active set method had frequently used to solve portfolio optimization problem. In order to solve portfolio optimization problem by the active set method, 'optimoptions'function is used in MATLAB2014b whereas the proposed algorithm given in Section-4 be programmed in MATLAB2014b.
The covariance matrix 30 30 The portfolio optimization problem …tness function f (x) based on and given by Eq. (8).
minf (x) = x 2 1 0:00034056 + 2x 1 x 2 0:0001635 + 2x 1 x 3 0:00013038 + : : : +x 2 30 0:00035471 S p = x 1 0:00065 + x 2 0:001305 + ::: + x 30 0 p x 2 1 0:00034056 + 2x 1 x 2 0:0001635 + 2x 1 x 3 0:00013038 + ::: + x 2 30 0:00035471 (11) According to the principle of superiority, low risky investment will be selected in which investments have the same variance. Moreover increasing in expected return leads to increase the risk in the portfolio. Expected return, the risk of the portfolio and the …tness function (f (x)) is given for the di¤erent initial value of y and z are given in Table 1.  As shown in Table 1, for the di¤erent initial value of y and z nearly same stocks are selected. Firstly, selected a portfolio has the minimum …tness function value f (x) = (0:00012557) which has initial values: y = 0; z = 2: Shape ratio indicates how much additional return investors earn by taking additional risk. A portfolio with a higher Sharpe ratio is considered superior to theirs. When the initial values are y = 1; z = 1; the highest Sharpe ratio is obtained (Sp = 0:16246). Each stock change in proportion is given in Fig. 4 with di¤erent colors. Also, …tness functions for the two di¤erent initial point that form the curves in Fig. 5. As shown in Table  2, the initial points are y = 0, z = 2, Nine stocks are selected for the …rst portfolio which are composed of 0.03 % As shown in Table 2, the initial points are y = 0, z = 2, Nine stocks are selected for the …rst portfolio which are composed of 0.03

Discussion
In this paper, we proposed a nonlinear neural network to solve portfolio selection problem. Proposed algorithm has been run for di¤erent initial value of y and z. It is seen that the number of selected stocks di¤er when using di¤erent starting values. The initial points (y = 1; z = 1) gives best Sharpe Ratio and it is selected seven stocks. Then the proposed method is compared with the traditional method, active set method. The ISE-30 data is used for the comparison of nonlinear neural network and active set method that is frequently used for solving quadratic optimization problems such as portfolio optimization problem. The remarkable distinction is that the nonlinear neural network has greater expected return than active set method while having the relatively same risk. The Sharpe Ratio shows that selected portfolios have relatively same risk, but proposed algorithm for portfolio selection problem has higher expected return than the active set method. As a result of these experiments nonlinear neural network to solve portfolio optimization model can be assumed as a powerful model.