Revista de Matema´tica: Teor´ıa y Aplicaciones 2009 16(2): 205–220 cimpa – ucr issn: 1409-2433 portfolio optimization using particle swarms with stripes Mario Villalobos–Arias∗ Recibido/Received: 2 Oct 2008 — Aceptado/Accepted: 5 Mar 2009 Abstract In this paper it is consider the Portfolio Optimization Problem developed by Markowitz [11]. The basic assumption is that the investor tries to maximize his/her profit and at the same time, wants to minimize the risk. This problem is usually solved using a scalarization approach (with one objective). Here it is solved it as a bi-objective optimization problem. It uses a new version of the algorithm of Particle Swarm Optimization for Multi-Objective Problems to which it implemented a method of the stripes to improve dispersion. Keywords: Portfolio optimization, particle swarm optimization, multiobjetive, opti- mization. Resumen En el presente trabajo se considera el problema de optimizacio´n de portafolios de- sarrollado por Markowitz [11]. El supuesto ba´sico es que el inversor intenta maximizar sus beneficios y al mismo tiempo, quiere minimizar el riesgo. Este problema se suele resolver mediante un enfoque de esscalarizacio´n (con un objetivo). Aqu´ı se resuelve como un problema de optimizacio´n multiobjetivo. Utiliza una nueva versio´n del algo- ritmo de optimizacio´n por enjambre de part´ıculas para problemas multiobjetivo, a los que se puso en pra´ctica un me´todo de las franjas para mejorar la dispersio´n. Palabras clave: Optimizacio´n de portafolios, optimizacio´n por enjambre de part´ıculas, multiobjetivo, optimizacio´n. Mathematics Subject Classification: 90C27, 90C29, 90C59, 91B28. ∗CIMPA, Escuela de Matema´tica, Universidad de Costa Rica 2060 San Jose´, Costa Rica. E-Mail: mario.villalobos@ucr.ac.cr 205 206 M. Villalobos Rev.Mate.Teor.Aplic. (2009) 16(2) 1 Introduction In real-world, there are many problems with several objectives that we aim to optimize simultaneously, an example is the Portfolio Optimization, in wich the investor want to maximize his/her profit and the same time minimize the risk. These problems are called “multiobjective” or “vector” optimization problems, and have been studied by many authors who have proposed a number of solution techniques [1, 4, 6, 12, 13]. The solution of a multiobjective optimization problem requires a suitable definition of “optimality” (usually called “Pareto optimality”). Such problems normally have not one, but an infinite set of solutions, which represent possible trade-offs among the objectives (such solutions constitute the so-called “Pareto optimal set”, defined in Section 2). In these multiobjective optimization problems (MOPs) one wishes to optimize a vector function, say F (x) = (f1(x), . . . , fn(x)). A typical way to approach these problems is to transform the MOPs into single-objective (or “scalar”) problems (e.g., by using a linear aggregating function). This approach indeed makes sense if the functions f1, . . . , fn are of the same type and expressed in the same units, but otherwise (for instance, if f1 denotes distance, f2 denotes time, and so on) the scalarized problem might be meaningless. Diverse metaheuristics have been adopted to solve MOP [1]–[3], [5, 7], hence it is rea- sonable use a heuristic, such as particle swarm optimization (PSO), to solve the portfolio optimization problem as a multiobjective problem. In this paper we use the Particle Swarm Optimization algorithm for multiobjective (MOPSO) [2], and we use the stripes approach to improve this algorithm [14]. The rest of the paper is organized as follow, the next section MOP is presented, in section 3 an introduction to PSO is presented. The Portfolio Optimization Problem (POP) is presented in the section 4, some classical solution of the POP are in the section 5. The data that we use and the result obtained is presented in sections 6 and 7. Finally in section 8 the conclusions and future work are presented. 2 The multiobjective optimization problem Let X be a set and F : X −→ IRd a given vector function with components fi : X −→ IR for each i ∈ {1, . . . , d}. The multiobjective optimization problem (MOP) we are concerned with is to find x∗ ∈ X such that F (x∗) = min x∈X F (x) = min x∈X [f1(x), . . . , fd(x)], (1) where the minimum is understood in the sense of the standard Pareto order in which two vectors in IRd are compared as follows. If ~u = (u1, . . . , ud) and ~v = (v1, . . . , vd) are vectors in IRd, then ~u  ~v ⇐⇒ ui ≤ vi ∀ i ∈ {1, . . . , d}. portfolio optimization using pso with stripes 207 - 6f2 f1 r r r r r A B C D E F (X) 6 -F (P∗) Figure 1: Example of a Pareto front for two objective case. This relation is a partial order. We also write ~u ≺ ~v if ~u  ~v and ~u 6= ~v. In this case we say that u dominates v. By example in Figure 1 point B dominates point E. Definition 1 A point x∗ ∈ X is called a Pareto optimal solution for the MOP (1) if there is no x ∈ X such that F (x) ≺ F (x∗). The set P∗ = {x ∈ X : x is a Pareto optimal solution} is called the Pareto optimal set for the MOP (1), and its image under F , i.e. F (P∗) := {F (x) : x ∈ P∗} , is called the Pareto front. In Figure 1 the Pareto front corresponds to the parts on the boundary of F (X) joining the points A and B, and also the points C and D. Here we say that x dominates y when F (x) ≺ F (y). Let Y ⊆ X and y ∈ Y . If there is no x ∈ Y , that dominates y , we say that y is nondominated (with respect to Y ). Observe that all the elements in the Pareto front are nondominated with respect to X. 3 Particle swarm optimization Particle swarm optimization algorithm (PSO) was introduced by Kennedy and Eberhart in 1995 [8] is based on the interaction of a set of particles that correspond to possible solutions of an optimization problem, moving each particle in a numerical space looking 208 M. Villalobos Rev.Mate.Teor.Aplic. (2009) 16(2) for the optimal position. A particularity of PSO is that particles communicate and hence —as in a social system— a particle with a good position (measured by its objective function value) influences on the other ones, attracting them. In the PSO algorithm a set of M particles is handled in a multidimensional space and it is intended to improve its performance according to its own experience and the experience of its neighbors. Indeed, each particle has three tendencies: (i) to follow its present direction, following the particle’s inertia, (ii) to go back to its best historical position and (iii) to imitate its best neighbor. 3.1 Modeling PSO If zm(t) represents the m–th particle, then its velocity in iteration t+ 1 is defined as vm(t+ 1) = αvm(t) + r1(zm∗ − zm(t)) + r2(z∗ − zm(t)) where vm(t) is the direction of the preceding iteration, zm∗ is the best historial position ever obtained by particle m, z∗ is the best particle ever obtained during the algorithm, r1 and r2 are random numbers, and α is a parameter. So, we define the new position of particle m as zm(t+ 1) = zm(t) + vm(t+ 1). For more details about PSO see [8, 9] and for PSO for multiobjective problems see [1, 2]. PSO with stripes To solve the portfolio optimization problem as a multiobjective problem we use a new approach presented in [14], call PSO with stripes (MOPSO-ST) that intent to solve the problem of the diversity of the MOP. 4 The portfolio optimization problem: Markowitz model Here we present the Portfolio Optimization Problem developed by Markowitz [11]. The basic assumption is that the investor tries to maximize his/her profit and, at the same time, wants to minimize the risk. We consider a market where s different securities (i.e. stocks) are traded. These se- curities have prices p1, p2, . . . , ps at the initial time t = 0. We restrict ourselves to a one-period model. This means that the investor makes his decisions at the beginning of the period and is not allowed to revise his decisions until the end of the period. Let P1(T ), P2(T ), . . . , Ps(T ) be the prices of the securities at the final time t = T , we assume that these final prices are not foreseeable. Therefore, they are modeled as non-negative random variables on a probability space (Ω,F ,P). portfolio optimization using pso with stripes 209 The return of the stocks is given by the variables r1, r2, . . . , rs given by ri = Pi(T )− pi pi , i = 1, . . . , s. (2) Observe that ri is also a random variable. We assume that we know (or have estimated) their means, variances and covariances. E(ri) = µi for all i = 1, . . . , s, Cov(ri, rj) = σ2ij for all i, j = 1, . . . , s. (3) Using the variables xi for the share of the i−th security on the portfolio, we can calculate the return of the portfolio Rp = Rp(x1, . . . , xs) by Rp = s∑ i=1 xiri, (4) with the restrictions on the shares s∑ i=1 xi = 1 and xi ≥ 0 i = 1, . . . , s. We have observed that the ri are random variables with means µi and covariances σ2ij = E(ri −E(ri))(rj −E(rj)). Thus the return of the portfolio Rp is a random variable as well, and its mean µp is given by µp = E(Rp) = s∑ i=1 xiE(ri) = s∑ i=1 xiµi. We measure the risk contained in the portfolio by the variance of its return σ2p = V ar(Rp) = E [{Rp −E(Rp)}2] = s∑ j=1 s∑ i=1 xiσ 2 ijxj = s∑ i,j=1 xixjσ 2 ij . We will also impose the constraints xi ≤ ci, for all i = 1, . . . , s, where the ci are constants. Therefore, the investor wants to find a vector ~x = (x1, x2, . . . , xs) that maximizes the mean return µp = s∑ i=1 xiµi =: −f1(~x) and at the same time minimizes the risk σ2p = s∑ i,j=1 xixjσ 2 ij =: f2(~x), 210 M. Villalobos Rev.Mate.Teor.Aplic. (2009) 16(2) subject to the constraints s∑ i=1 xi = 1 and 0 ≤ xi ≤ ci ∀ i = 1, . . . , s. Thus, we have the next definition. Definition 2 The classical portfolio optimization problem (POP) with two objective func- tions is to find the vector ~x∗ = (x∗1, x ∗ 2, . . . , x ∗ s) such that (f1(~x∗), f2(~x∗)) = min ~x − s∑ i=1 xiµi , s∑ i,j=1 xixjσ 2 ij  subject to s∑ i=1 xi = 1, (5) 0 ≤ xi ≤ ci ∀ i = 1, . . . , s. 5 Classical solution The classical way to solve this problem is by solving a single–objective (or scalar) problem, (see for example, [10]). One can also consider several variants of (5). For instance we may require a lower bound (Rc) on the mean return, and then choose the portfolio with minimal variance, that is min ~x σ2p = min ~x s∑ i,j=1 xixjσ 2 ij subject to µp ≥ Rc (6) s∑ i=1 xi = 1, 0 ≤ xi ≤ ci ∀ i = 1, . . . , s Alternatively, one can consider the dual problem of setting up an upper bound (σc) on the portfolio variance, and then maximize the mean return. max ~x µp = max ~x s∑ i=1 xiµi subject to σ2p ≤ σc (7) s∑ i=1 xi = 1, 0 ≤ xi ≤ ci ∀ i = 1, . . . , s. portfolio optimization using pso with stripes 211 In any of these two forms of the POP, we usually find a single point of the Pareto front. (see Figure 2). Still another variant of the POP is min ~x (σ2p − µp) = min ~x  s∑ i,j=1 xixjσ 2 ij − s∑ i=1 xiµi  subject to s∑ i=1 xi = 1, (8) 0 ≤ xi ≤ ci ∀ i = 1, . . . , s. Again, the solution of this single–objective problem gives only one point of the Pareto front, and the investor does not have the option to select another portfolio with a similar risk and/or a better return. This situation is illustrated in Figure 2, which shows a classical Pareto front for the POP. If the value of σc is close to 0, we can see that a small increase in the risk can give a much higher return. In contrast, if σ2p is large, then to obtain a small increase in the return requires a large increase in the risk. In the single–objective formulation of the POP, the investor cannot appreciate these sub- tleties. - 6 µp σ2p µc σc Figure 2: Graphical illustration of the Pareto front for the POP. 6 The data To test our algorithm we took 20 securities (i.e. s = 20) from the “Mexican Stock Market” (BMV = Bolsa Mexicana de Valores). These securities appear in the “Index of Prices and Quotations” (IPyC = Indice de Precios y Cotizaciones). 212 M. Villalobos Rev.Mate.Teor.Aplic. (2009) 16(2) date AlfaA AmTelA1 Amxl BImboA Cemex CPO Elektra Femsaubd gcarsoa1 · · · 28/09/2004 42.090 23.800 22.027 24.752 63.800 76.200 50.200 51.843 · · · 29/09/2004 42.880 24.420 22.226 24.655 64.720 76.790 50.620 52.787 · · · 30/09/2004 43.060 24.600 22.206 24.439 64.090 76.480 50.300 51.992 · · · 01/10/2004 43.480 24.890 22.756 25.203 64.800 76.750 50.830 52.250 · · · 04/10/2004 43.280 25.250 23.185 25.350 65.760 76.400 50.870 52.558 · · · 05/10/2004 43.100 24.600 22.956 25.340 65.470 76.610 51.040 52.648 · · · 06/10/2004 42.860 24.300 22.526 25.144 67.140 76.690 51.140 52.518 · · · 07/10/2004 42.990 24.310 22.506 25.291 66.580 78.000 51.010 52.379 · · · 08/10/2004 42.150 23.810 22.007 24.214 65.120 79.500 50.920 52.131 · · · ... ... ... ... ... ... ... ... ... . . . Table 1: Example of table of prices. Fecha AlfaA AmTelA1 Amxl BImboA Cemex CPO Elektra Femsaubd gcarsoa1 · · · 29/09/2004 1.877 2.605 0.907 -0.395 1.442 0.774 0.837 1.821 · · · 30/09/2004 0.420 0.737 -0.090 -0.873 -0.973 -0.404 -0.632 -1.506 · · · 01/10/2004 0.975 1.179 2.474 3.124 1.108 0.353 1.054 0.497 · · · 04/10/2004 -0.460 1.446 1.888 0.583 1.481 -0.456 0.079 0.590 · · · 05/10/2004 -0.416 -2.574 -0.991 -0.039 -0.441 0.275 0.334 0.170 · · · 06/10/2004 -0.557 -1.220 -1.871 -0.772 2.551 0.104 0.196 -0.245 · · · 07/10/2004 0.303 0.041 -0.089 0.584 -0.834 1.708 -0.254 -0.265 · · · 08/10/2004 -1.954 -2.057 -2.219 -4.257 -2.193 1.923 -0.176 -0.474 · · · . .. . .. . .. . .. . .. . .. . .. . .. . .. . . . Table 2: Example of table of returns. We took the prices of the 20 stocks for 100 days, see Table 1; the whole data is in [14]. Then we calculated the return of each security, for each day, using equation (2). See Table 2, in [14] are the whole data. To compute estimates of the mean returns and the covariances in (3) we used 5−day moving averages, that is, using the data from day n− 4 to day n with n = 5, 6, . . . , 100. This procedure gave us 95 matrices of order 21 × 20 whose first row are the mean returns. An example of these matrices appears in Table 3. Then to these data we applied the ST-MOPSO algorithm, see [14], to obtain a Pareto front for each of the 95 matrices. In each case we used the constraints ci = 0.2 for all i = 1, . . . , s. 7 The results To apply the results obtained in the previous section, the idea was to use the 5-day data to decide the portfolio for the sixth day. Hence for each of the 95 matrices we tried to obtain a Pareto front with 100 points. The Table 4 is an example of the resulting solution, and Figure 3 shows the corresponding graph. (Appendix B contains all the graphs). The solutions tell us, according to the POP, the fraction (or the share (in percent)) of our portfolio optimization using pso with stripes 213 0 .4 8 0 .6 8 0 .8 4 0 .4 8 0 .5 2 0 .1 1 0 .3 3 0 .3 1 0 .7 8 1 .0 8 0 .5 2 1 .0 2 0 .2 6 1 .3 6 0 .8 1 0 .2 7 0 .1 6 0 .6 0 -0 .1 2 0 .1 9 3 .8 9 5 .1 3 1 .6 1 0 .5 4 1 .6 3 1 .4 6 1 .3 6 2 .1 8 4 .8 9 9 .0 7 0 .4 4 -0 .0 5 -0 .5 8 4 .2 5 -0 .1 4 2 .8 9 1 .3 0 1 .3 0 1 0 .8 8 1 .2 3 5 .1 3 1 5 .1 4 7 .6 5 1 .3 2 5 .8 5 0 .4 0 1 .0 8 3 .5 7 1 2 .5 3 1 1 .0 3 5 .4 1 0 .4 3 1 .9 0 1 1 .1 6 0 .2 5 8 .0 3 2 .8 9 1 .4 2 9 .9 1 4 .3 9 1 .6 1 7 .6 5 7 .9 9 6 .5 8 5 .1 8 0 .0 2 1 .8 4 2 .6 4 6 .2 3 1 .7 5 6 .9 7 3 .7 4 2 .8 4 -0 .2 3 4 .6 5 3 .1 9 1 .8 1 2 .9 9 -2 .3 7 2 .1 9 0 .5 4 1 .3 2 6 .5 8 9 .8 7 3 .3 6 0 .6 1 2 .7 4 1 .7 3 1 .6 1 -1 .7 5 6 .4 8 5 .7 0 2 .0 7 -8 .0 8 7 .2 3 -1 .1 0 0 .7 9 4 .1 7 -6 .4 2 -0 .1 5 1 .6 3 5 .8 5 5 .1 8 3 .3 6 5 .2 7 0 .8 2 2 .0 8 4 .6 2 4 .1 3 5 .1 7 3 .4 4 1 .7 0 2 .4 1 0 .7 7 2 .3 6 4 .6 6 2 .3 9 2 .9 2 4 .9 5 2 .7 9 1 .4 6 0 .4 0 0 .0 2 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.1 5 2 .7 9 0 .3 5 0 .6 6 2 .5 6 3 .1 1 4 .2 4 1 .0 3 -0 .2 5 1 .1 1 3 .2 2 -0 .2 3 3 .6 2 1 .4 5 0 .8 6 5 .0 2 2 .0 3 T ab le 3: E xa m pl e of a ta bl e of m ea n re tu rn µ i (fi rs t ro w ) an d co va ri an ce s σ ij (r ow s 2 to 21 ). 214 M. Villalobos Rev.Mate.Teor.Aplic. (2009) 16(2) σ2p µp 0.46 0.55 0.64 0.73 0.82 0.91 1.00 1.09 1.18 1.27 1.36 0.64 0.65 0.66 0.68 0.69 0.71 0.72 0.74 0.75 0.76 0.78 cccccccccccccccccccccccccc ccccc c cccccccccccccccccccccccccccccccccccccccccccccccccc c c Figure 3: Example of the graph of a solution of POP. wealth that we should invest in each of the 20 securities. Since each of the 100 points in the Pareto front is a possible portfolio, handling this information turns out to be quite complicated. Therefore, we sorted the solutions accor- ding to their risks and took only three solutions per day: the solution with the minimal risk, the solution with the maximal risk, and a solution with a medium risk. Then we computed the return of for day 6 of these 3 solutions using equation 4, and we compared the return of these three solutions with the return of the IPyC of the BMV. The results are shown in Table 5. To see how this would work in a real situation, we did an experiment beginning with “one unit” of investment (say, one peso) and following the corresponding wealth day-per- day; that is, every day we multiply the current value by 1 + r to obtain the value of our investment the day after. The results are shown in the Table 6 and their graphical representation appears in Figure 4. It can be seen that each of our three solutions gives a better return than the IPyC–in some cases the return is up to 8% above the IPyC return (day 72 of Table 6). Only in the last few days our solutions were similar to the IPyC– perhaps because the IPyC was behaving “optimally”. For instance, from the Table 6.4 we can see that the IPyC return of 21.1% is very close to our solutions with minimal and maximum risks, 20.7% and 21.0%, respectively, but below the 24.6% given by our medium risk solution. portfolio optimization using pso with stripes 215 da y\ x i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 va r. re tu rn 5 0 0 0 0 0 0 0 0 0 1. 3 0 20 15 .1 20 20 0 0 20 0 0 0. 96 26 96 0. 78 86 71 5 0 0 0 0 0 0 0 0 0 3. 1 0 20 12 .0 20 20 0 0 20 0 0 0. 99 48 71 0. 79 96 27 5 0 0 0 0 0 0 0 0 0 3. 6 0 20 11 .8 20 20 0 0 20 0 0 1. 01 75 00 0. 80 43 41 5 0 0 1. 7 0 0 0 0 0 0 3. 0 0 20 12 .0 20 20 0 0 20 0 0 1. 07 89 90 0. 81 23 83 5 0 0 0 0 0 0 0 0 0 4. 8 0 20 13 .7 20 20 0 0 20 0 0 1. 11 14 20 0. 82 14 29 5 0 0 0 0 0 0 0 0 0 5. 4 0 20 12 .3 20 20 0 0 20 0 0 1. 12 36 90 0. 82 37 76 5 0 0 0 0 0 0 0 0 0 6. 1 0 20 11 .5 20 20 0 0 20 0 0 1. 15 19 00 0. 82 84 14 5 0 0 0 0 0 0 0 0 0 5. 6 0 20 13 .6 20 20 0 0 20 0 0 1. 15 56 20 0. 82 91 70 5 0 0 0 0 0 0 0 0 0 7. 1 0 20 9. 0 20 20 0 0 20 0 0 1. 18 52 70 0. 83 27 27 5 0 0 0 0 0 0 0 0 0 6. 7 0 20 12 .1 20 20 0 0 20 0 0 1. 20 02 90 0. 83 62 55 5 0 0 0 0 0 0 0 0 0 6. 6 0 20 13 .4 20 20 0 0 20 0 0 1. 21 57 70 0. 83 89 55 5 0 0 3. 4 0 0 0 0 0 0 5. 6 0 20 6. 3 20 20 0 0 20 0 0 1. 23 07 10 0. 83 88 62 5 0 0 0 0 0 0 0 0 0 7. 8 0 20 8. 6 20 20 0 0 20 0 0 1. 23 25 30 0. 83 94 15 5 0 0 0 0 0 0 0 0 0 7. 5 0 20 12 .5 20 20 0 0 20 0 0 1. 26 04 90 0. 84 55 16 5 0 0 1. 6 0 0 0 0 0 0 6. 6 0 20 11 .6 20 20 0 0 20 0 0 1. 27 10 40 0. 84 69 19 5 0 0 0 0 0 0 0 0 0 8. 4 0 20 10 .4 20 20 0 0 20 0 0 1. 29 60 70 0. 84 94 98 5 0 0 0. 5 0 0 0 0 0 0 8. 0 0 20 11 .4 20 20 0 0 20 0 0 1. 30 80 80 0. 85 21 46 5 0 0 5. 9 0 0 0 0 0 0 4. 6 0 20 8. 7 20 20 0 0 20 0 0 1. 34 28 50 0. 85 40 90 5 0 0 2. 8 0 0 0 0 0 0 7. 2 0 20 9. 8 20 20 0 0 20 0 0 1. 34 85 60 0. 85 80 57 5 0 0 2. 9 0 0 0 0 0 0 8. 1 0 20 6. 8 20 20 0 0 20 0 0 1. 37 41 20 0. 86 04 02 5 0 0 5. 6 0 0 0 0 0 0 5. 9 0 20 8. 0 20 20 0 0 20 0 0 1. 39 39 30 0. 86 32 70 5 0 0 4. 5 0 0 0 0 0 0 6. 9 0 20 8. 6 20 20 0 0 20 0 0 1. 40 75 80 0. 86 61 64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T ab le 4: E xa m pl e of a so lu ti on (t he va lu es ar e pe rc en t) . 216 M. Villalobos Rev.Mate.Teor.Aplic. (2009) 16(2) min. med. max. min. med. max. day IPyC risk risk risk day IPyC risk risk risk 1 -0.24% 0.48% 0.23% -0.21% 48 1.11% 1.24% 2.01% 2.45% 2 0.06% 0.70% 0.37% 0.25% 49 0.24% -0.29% -0.20% -0.53% 3 -1.62% -0.81% -1.04% -1.39% 50 1.13% 0.81% 0.52% 0.25% 4 0.49% 0.52% 0.42% 0.36% 51 0.50% 0.38% 0.80% 0.98% 5 0.43% 0.09% 0.09% -0.05% 52 0.09% -0.02% -0.22% -0.51% 6 -0.74% -1.45% -1.47% -1.56% 53 0.11% -0.23% -0.22% -0.13% 7 -0.61% -0.58% -0.75% -0.41% 54 -0.05% 0.19% -0.17% -0.41% 8 1.05% 0.73% 0.83% 0.56% 55 1.09% 0.79% 1.09% 0.62% 9 0.58% 0.30% 0.39% 0.77% 56 0.48% 0.55% 1.21% 1.26% 10 -0.29% -0.13% 0.04% 0.04% 57 0.28% 0.21% 0.49% 0.67% 11 0.48% 1.12% 1.16% 1.34% 58 0.42% 0.26% 0.22% 0.07% 12 0.81% 1.00% 1.12% 1.15% 59 0.13% 0.04% 0.43% 0.82% 13 0.53% 0.32% 0.59% 0.33% 60 0.72% 0.80% 0.53% 0.51% 14 -0.43% 0.28% -0.05% 0.19% 61 0.91% 0.65% 0.88% 0.85% 15 1.44% 1.29% 2.00% 1.94% 62 -0.48% -0.60% -0.58% -0.68% 16 1.53% 0.53% 0.17% 0.37% 63 -0.39% -0.22% -0.22% -0.18% 17 -0.66% -0.11% -0.69% -1.38% 64 0.81% -0.41% 0.35% 0.21% 18 1.05% 0.77% 0.90% 1.38% 65 -1.92% -1.66% -1.65% -2.47% 19 0.50% 0.41% 0.43% -0.09% 66 -1.48% -1.01% -1.47% -1.57% 20 -0.10% -0.01% -0.10% -0.05% 67 0.88% 0.05% 0.28% 1.28% 21 1.32% 1.06% 1.61% 1.43% 68 -2.01% -1.16% -1.10% -2.67% 22 0.83% 0.72% 0.85% 0.96% 69 -0.06% -0.45% -0.39% -0.49% 23 -0.60% -0.50% -0.29% -0.61% 70 -1.88% -0.58% -0.44% -0.56% 24 -0.29% 0.00% 0.05% -0.80% 71 0.91% 0.57% 0.76% 0.83% 25 0.23% 1.05% 0.11% 0.47% 72 1.07% 1.38% 1.22% 1.19% 26 0.06% 0.67% 0.92% 0.40% 73 1.83% 1.27% 1.45% 1.56% 27 1.49% 0.19% 0.64% 1.14% 74 0.96% 0.70% 0.61% 0.61% 28 -0.12% -0.22% -0.52% -0.10% 75 1.63% 1.86% 1.83% 1.84% 29 -0.02% 0.21% 0.29% 0.46% 76 0.05% 0.47% -0.01% 0.38% 30 -0.04% 0.05% 0.12% 0.05% 77 -2.08% -1.65% -2.05% -2.00% 31 0.58% 0.89% 0.45% 0.56% 78 -0.76% -1.04% -1.20% -1.11% 32 0.15% 0.82% 1.01% 0.96% 79 0.55% 0.57% 0.66% 0.82% 33 -1.69% -1.07% -1.44% -1.75% 80 0.96% 0.48% 0.99% 0.33% 34 0.34% 0.32% 0.42% 0.46% 81 1.37% 0.98% 0.75% 1.26% 35 -0.03% -0.40% -0.10% 0.90% 82 -0.45% -0.43% -0.77% -0.75% 36 0.26% 0.17% 0.12% 1.09% 83 0.42% -0.14% 0.23% 0.25% 37 0.75% 0.83% 0.95% 1.09% 84 0.43% 0.45% -0.03% -0.35% 38 0.65% 1.07% 1.15% 1.21% 85 1.82% 1.12% 1.31% 1.30% 39 0.99% 1.71% 1.98% 1.37% 86 -0.01% -0.31% -0.02% 0.02% 40 -0.78% -0.18% -0.71% -0.22% 87 0.75% 0.80% 0.91% 0.46% 41 1.07% 1.30% 1.57% 1.33% 88 0.05% -1.11% -0.88% -0.77% 42 -0.97% -0.66% -0.70% -0.69% 89 0.22% 1.17% 1.06% 0.86% 43 -0.05% -0.65% -0.29% -0.27% 90 0.23% -0.08% -0.26% -0.33% 44 0.66% -0.31% 0.28% 0.19% 91 1.13% 0.46% 0.53% 0.72% 45 -0.59% -0.46% -0.20% -0.01% 92 0.34% 0.47% 0.15% -0.14% 46 -0.04% 0.65% 0.54% 0.15% 93 0.04% -0.17% 0.04% 0.05% 47 0.09% 0.27% 0.59% 0.52% 94 -1.10% -1.11% -1.16% -1.12% Table 5: Table of comparison of return of IPyC, the solution with minimal risk, a medium risk and maximal risk. portfolio optimization using pso with stripes 217 min. med. max. min. med. max. day IPyC risk risk risk day IPyC risk risk risk 0 1.000 1.000 1.000 1.000 1 0.998 1.005 1.002 0.998 48 1.100 1.152 1.172 1.174 2 0.998 1.012 1.006 1.000 49 1.102 1.148 1.170 1.168 3 0.982 1.004 0.996 0.987 50 1.115 1.158 1.176 1.171 4 0.987 1.009 1.000 0.990 51 1.120 1.162 1.185 1.182 5 0.991 1.010 1.001 0.990 52 1.121 1.162 1.183 1.176 6 0.984 0.995 0.986 0.974 53 1.123 1.159 1.180 1.175 7 0.978 0.989 0.978 0.970 54 1.122 1.162 1.178 1.170 8 0.988 0.997 0.987 0.975 55 1.134 1.171 1.191 1.177 9 0.994 1.000 0.991 0.983 56 1.140 1.177 1.205 1.192 10 0.991 0.998 0.991 0.983 57 1.143 1.180 1.211 1.200 11 0.996 1.010 1.002 0.997 58 1.148 1.183 1.214 1.201 12 1.004 1.020 1.014 1.008 59 1.149 1.183 1.219 1.211 13 1.009 1.023 1.020 1.011 60 1.158 1.193 1.225 1.217 14 1.005 1.026 1.019 1.013 61 1.168 1.200 1.236 1.227 15 1.019 1.039 1.040 1.033 62 1.163 1.193 1.229 1.219 16 1.035 1.045 1.041 1.037 63 1.158 1.190 1.226 1.217 17 1.028 1.044 1.034 1.023 64 1.167 1.186 1.231 1.219 18 1.039 1.052 1.043 1.037 65 1.145 1.166 1.210 1.189 19 1.044 1.056 1.048 1.036 66 1.128 1.154 1.193 1.170 20 1.043 1.056 1.047 1.035 67 1.138 1.155 1.196 1.185 21 1.057 1.067 1.064 1.050 68 1.115 1.141 1.183 1.154 22 1.066 1.075 1.073 1.060 69 1.115 1.136 1.178 1.148 23 1.059 1.069 1.070 1.054 70 1.094 1.130 1.173 1.142 24 1.056 1.069 1.070 1.045 71 1.104 1.136 1.182 1.151 25 1.059 1.081 1.071 1.050 72 1.115 1.152 1.196 1.165 26 1.059 1.088 1.081 1.054 73 1.136 1.166 1.214 1.183 27 1.075 1.090 1.088 1.066 74 1.147 1.175 1.221 1.190 28 1.074 1.087 1.082 1.065 75 1.165 1.196 1.244 1.212 29 1.073 1.090 1.086 1.070 76 1.166 1.202 1.243 1.217 30 1.073 1.090 1.087 1.071 77 1.142 1.182 1.218 1.192 31 1.079 1.100 1.092 1.077 78 1.133 1.170 1.203 1.179 32 1.081 1.109 1.103 1.087 79 1.139 1.177 1.211 1.189 33 1.063 1.097 1.087 1.068 80 1.150 1.182 1.223 1.193 34 1.066 1.101 1.092 1.073 81 1.166 1.194 1.232 1.208 35 1.066 1.096 1.090 1.082 82 1.161 1.189 1.223 1.199 36 1.069 1.098 1.092 1.094 83 1.165 1.187 1.226 1.202 37 1.077 1.107 1.102 1.106 84 1.170 1.192 1.225 1.198 38 1.084 1.119 1.115 1.120 85 1.192 1.206 1.241 1.213 39 1.094 1.138 1.137 1.135 86 1.192 1.202 1.241 1.214 40 1.086 1.136 1.129 1.132 87 1.201 1.212 1.252 1.219 41 1.098 1.151 1.147 1.147 88 1.201 1.198 1.241 1.210 42 1.087 1.143 1.138 1.139 89 1.204 1.212 1.255 1.220 43 1.086 1.136 1.135 1.136 90 1.207 1.211 1.251 1.216 44 1.094 1.132 1.138 1.139 91 1.220 1.217 1.258 1.225 45 1.087 1.127 1.136 1.138 92 1.224 1.222 1.260 1.223 46 1.087 1.135 1.142 1.140 93 1.225 1.220 1.260 1.224 47 1.088 1.138 1.149 1.146 94 1.211 1.207 1.246 1.210 Table 6: Table of comparison of investment of IPyC, the solution with minimal risk, a medium risk and maximal risk. 218 M. Villalobos Rev.Mate.Teor.Aplic. (2009) 16(2) 1.00 0.97 1.02 1.08 1.14 1.20 1.26 ∗ IPyC ◦ min. risk • med. risk ? max. risk ∗◦•?∗◦•?∗ ◦• ? ∗ ◦• ?∗ ◦ • ?∗ ◦ • ?∗ ◦ • ?∗ ◦ • ? ∗◦• ? ∗◦• ? ∗◦• ? ∗ ◦• ? ∗ ◦• ?∗ ◦• ?∗ ◦• ? ∗ ◦• ?∗ ◦•?∗ ◦ • ? ∗ ◦• ? ∗ ◦• ? ∗ ◦ • ? ∗ ◦• ? ∗ ◦• ?∗ ◦• ?∗ ◦• ? ∗ ◦ • ? ∗ ◦• ? ∗ ◦• ? ∗ ◦• ? ∗ ◦• ?∗ ◦• ? ∗ ◦• ?∗ ◦• ? ∗ ◦ • ?∗ ◦ • ?∗ ◦• ? ∗ ◦•? ∗ ◦•? ∗ ◦•? ∗ ◦•? ∗ ◦•? ∗ ◦•? ∗ ◦•? ∗ ◦•? ∗ ◦•? ∗ ◦ •? ∗ ◦•? ∗ ◦ •? ∗ ◦ •? ∗ ◦ •? ∗ ◦ •? ∗ ◦ •? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ?∗ ◦ • ? ∗ ◦ • ? ∗ ◦ • ? ∗◦ • ?∗◦ • ? ∗◦ • ?∗◦ • ?∗◦ • ?∗◦ • ? ∗◦ • ? Figure 4: Graphic comparison of the IPyC and the solutions with minimal risk, a medium risk and maximal risk. portfolio optimization using pso with stripes 219 8 Conclusions and future work In this paper we applied the ST-MOPSO algorithm to the Markowitz’ portfolio selection problem. As shown in section 7 our results seem to be quite good. But of course before reaching any conclusions we need to do more experimental work. For instance, we do not really know how good are our 5-day moving averages. It would be interesting (and important!) to determine how sensitive our results are to the length of the moving averages. References [1] Coello, C.A.; Van Veldhuizen, D.A.; Lamont, G.B.(2002) Evolutionary Algorithms for Solving Multi-Objective Problems. Kluwer Academic Publishers, New York. [2] Coello, C.A.; Toscano, G.; Salazar, M. (2004) “Handling multiple objectives with particle swarm optimization”, IEEE Transactions on Evolutionary Computation 8(3): 256–279. [3] Dasgupta, D. (1999) Artificial Immune Systems and Their Applications. Springer- Verlag, Berlin. [4] Deb, K. (2001) Multi-Objective Optimization using Evolutionary Algorithms. John Wiley & Sons, Chichester. [5] Deb, K.; Pratap, A.; Agarwal, S.; Meyarivan, T. (2002) “A fast and elitist multiobjec- tive genetic algorithm: NSGA–II”, IEEE Transactions on Evolutionary Computation 6(2): 182–197. [6] Fonseca, C.M.; Fleming, P.J. (1997) “Multiobjective optimization”, in: T. Ba¨ck, D. B. Fogel, & Z. Michalewicz (Eds.) Handbook of Evolutionary Computation, Oxford University Press: 1: C4.5:1–C4.5:9. [7] Hui, X.; Eberhart, R.C.; Shi, Y. (2003) “Particle swarm with extended memory for multiobjective optimization”, in: 2003 IEEE Swarm Intelligence Symposium Proceedings, IEEE Service Center, Indianapolis IN: 193–197. [8] Kennedy, J.; Eberhart, R.C. (1995) “Particle swarm optimization”, in: Proc. IEEE Int. Conf. Neural Networks, Piscataway NJ: 1942–1948. [9] Kennedy, J.; Eberhart, R.C.(2001) Swarm Intelligence. Morgan Kaufmann Publish- ers, San Francisco CA. [10] Korn, R. and Korn, E. (2000) Option Pricing and Portfolio Optimization: Modern Methods of Financial Mathematics, Graduate Studies in Mathematics 31. American Mathematical Society, Providence RI. [11] Markowitz, H.M. (1952) “Portfolio selection”, Journal of Finance 7(1):77–91. 220 M. Villalobos Rev.Mate.Teor.Aplic. (2009) 16(2) [12] Miettinen, K.M. (1998) Nonlinear Multiobjective Optimization. Kluwer Academic Publishers, Boston MS. [13] Ulungu, E.L. (1993) Optimisation Combinatoire Multicrite`re: Determination de l’Ensemble des Solutions Efficaces et Me´thodes Interactives. Ph.D. thesis, Faculte´ des Sciences, Universite´ de Mons-Hainaut, Mons, Belgium. [14] Villalobos-Arias, M. (2005) Ana´lisis de Heur´ısticas de Optimizacio´n para Problemas Multiobjetivo. Ph.D. thesis, Departamento de Matema´ticas, Cinvestav, Me´xico D.F., Me´xico.