• Tidak ada hasil yang ditemukan

A MULTI-OBJECTIVE FIREFLY ALGORITHM FOR PRACTICAL PORTFOLIO OPTIMIZATION PROBLEM

N/A
N/A
Nguyễn Gia Hào

Academic year: 2023

Membagikan "A MULTI-OBJECTIVE FIREFLY ALGORITHM FOR PRACTICAL PORTFOLIO OPTIMIZATION PROBLEM"

Copied!
10
0
0

Teks penuh

(1)

Vol. 25, No. 3 (2019), pp. 282–291.

A MULTI-OBJECTIVE FIREFLY ALGORITHM FOR PRACTICAL PORTFOLIO OPTIMIZATION PROBLEM

INDANA LAZULFA1

1Informatics Engineering, Hasyim Asy’ari University Jombang, Indonesia indanazulf@gmail.com

Abstract. Portfolio optimization is the process of allocating capital among a uni- verse of assets to achieve better risk return trade-off. Portfolio optimization is a solution for investors to get the return as large as possible and make the risk as small as possible. Due to the dynamic nature of financial markets, the portfolio needs to be rebalanced to retain the desired risk-return characteristics. This study proposed multi objective portfolio optimization model with risk, return as the ob- jective function. For multi objective portfolio optimization problems will be used mean-variance model as risk measures. All these portfolio optimization problems will be solved by Firefly Algorithm (FA).

Key words and Phrases: Portfolio optimization, mean-variance, multi-objective, firefly algorithm.

Abstrak.Optimisasi portofolio merupakan proses mengalokasikan kapital diantara kumpulan saham untuk meraih risiko-return yang lebih baik. Optimisasi portofolio juga solusi untuk investor untuk mendapatkan return sebesar mungkin dan risiko sekecil mungkin. Melihat dinamisnya pasar keuangan, portfolio membutuhkan ke- seimbangan yang menyesuaikan karakteristik risiko-return yang diinginkan. Peneli- tian ini bertujuan merumuskan model optimisasi portofolio multi-objektif, dengan risiko dan return sebagai fungsi objektifnya. Untuk masalah optimisasi portofolio multi-objektif ini menggunakan model Mean-Varian sebagai ukuran risiko. Semua masalah optimisasi portofolio ini akan diselesaikan dengan Algoritma Firefly (FA).

Kata kunci: Optimisasi portofolio, mean-varian, multi-objektif, algoritma firefly.

1. Introduction

Arguably, one of the most studied topic in the history of mathematics is the optimization. Optimization is a branch of applied mathematics that derives its

2000 Mathematics Subject Classification: 62P05 Received: 01-11-2018, accepted: 01-04-2019.

282

(2)

importance both the wide variety of its applications and from the availability of efficient algorithms. Mathematically, it refers to the minimization or maximization of a given objective function of several decision variables that satisfy functional constraints. Optimization models play an increasingly important role in financial decisions. Many computational finance problems ranging from asset allocation to risk management, from option pricing to model calibration can be solved efficiently using modern optimization techniques. Modern finance has become increasingly technical, requiring the use of sophisticated mathematical tools in both research and practice. Many find the roots of this trend in the portfolio selection models and methods of this trend in the portfolio selection models and methods described by Markowitz in the 1950’s [10]. Markowitz [10] provided a foundational framework of mean-variance optimization for constructing an optimal portfolio.

A Portfolio is a set of finance assets such as bonds, stocks, and cash equiv- alents. Portfolios are held directly by investors and/or managed by financial pro- fessionals. Portfolio optimization (PO) is the process of allocating capital among a universe of assets to achieve better risk return trade-off. PO is a solution for investors to get the return as large as possible and make the risk as small as pos- sible. But in fact, the desire to get a high return must go along with a high risk. Due to the dynamic nature of financial markets, the portfolio needs to be rebalanced to retain the desired risk-return characteristics. One of the most used model in PO is the Mean-Variance Model. This model determines the composition of a portfolio asset or allocates many assets in order to minimize the risk while achieving a predetermined level of expected return. The classical mean-variance model relies on the perfect knowledge of the expected returns of the assets and the variance-covariance matrix [2]. Using this, we determine an optimal asset allocated according to mean-variance model. Fact, in arranging a portfolio, we are not only focuses on minimizing risk or maximizing return, but also some constraints that are come along with it like buy-in thresholds and cardinality constraints.

In the previous study [11], three multi-objective evolutionary algorithms are adapted for the proposed models. A tri-objective portfolio selection model is pro- posed with risk, return and transaction costs as objectives. Meghwani and Takur [11] used three different models with different risk measures - variance, VaR (Value- at-Risk) and CVaR (Conditional Value-at-Risk). Recently, Lazulfa et al. [9] solved Portfolio Optimization (PO) problem using simulated annealing (SA) algorithm.

The performance of the tested SA was good enough to solve single objective using mean-variance as risk measure. The result provided by SA for single objective case is near optimal solution. Besides, the purpose of minimizing the objective function still had not satisfied, because value of the objective function still large.

In this study, we use one of nature-inspired algorithm called Firefly Algorithm (FA) to solve PO problem. FA was based on the flashing patterns and behavior of fireflies. FA wa first developed by Xin-She Yang in late 2007 and published in 2008 [14]. Based on previous study [7], a total number of 76 publications are examined in years from 2006 to April 2017. Distribution of Swarm Intelligence techniques adopted for Portfolio Optimization (PO) is demonstrated in those paper

(3)

[7]. Particle swarm optimization (PSO) algorithm is the most adopted swarm based methodology for PO (63%) while firefly algorithm (FA) has 4% applications in portfolio optimization literature.

Since single objective function cannot be optimal with SA during portfolio optimization in previous paper [9], so in those paper there is no result for multi objective function. In the other paper [12] they used genetic algorithm (GA) to solve PO problem. We can see good result from good distribution along the Pareto Front.

And then minimizing objective function in those paper is generational distance (GD).

This paper proposes a two-objective model in risk and returns objectives.

The proposed model offers an additional advantage to decision makers or investors so that that they can examine the trade-offs between risk and return while choosing a portfolio from the efficient frontier. In this paper, we will see different result and comparing performance of portfolio selection problem using some Swarm Intelli- gence like SA, GA from other paper and we try FA to solve this PO problem. All optimization problem will be solved by FA. We also present some result of simu- lation like the tested metaheuristic algorithm, some details of implementation and computational experiments.

2. Models For Portfolio Optimization

In this section, we briefly present one of the PO model (mean-variance) and additional constraints for realistic portfolio management (buy-in threshold and car- dinality). The theory of optimal selection of portfolios was developed by Harry Markowitz in the 1950’s. His work formalized the diversification principle in port- folio selection and, as mentioned above, earned him the 1990 Nobel prize for Eco- nomics . Here we give a brief description of the model and relate it to Quadratic Programming (QP).

In the Mean-Variance (M-V) model, the portfolio risk is measured by the variance of stock prices. In general, covariance matrix among individual stocks and expected return of stocks are estimated using the historical data [7]. M-V model was developed by Markowitz in the 1952. This model is also called Markowitz’s model [10]. Markowitz’s theory of mean-variance (M-V) optimization provides a mechanism for the selection of portfolios of securities (or asset classes) in a manner that trades off the expected returns and the risk of potential portfolios. We use this M-V model from previous paper [1],[9] in this section.

Suppose we have a history of percentage returns, over m time periods, for each group of nassets (such as shares, bonds, etc.). We can use this information as a guide to future investments. As an example, consider the following data forn assets overmperiods [1].

The expected portfolio return is given by R=

n

X

i=1

¯

riyi j= 1,2, ..., m

(4)

Table 1. Periodly rates of return onnassets Period 1 Period 2 · · · Periodm Asset 1 r11 r12 · · · r1m

Asset 2 r21 r22 · · · r2m

... ... ... . .. ... Assetn rn1 rn2 · · · rnm

The risk associated with particular portfolio is determined from variances and covariances that can be calculated from the history of returnsrij [1]. The variance of assetiis

σi2= Pm

j=1(rij−¯ri)2

m (1)

while the covariance of assetsiandkis σik=

Pm

j=1(rij−r¯i)(rkj−¯rk)

m . (2)

The variance of the portfolio defined by the investment fractions y1, ..., yn is V =

n

X

i=1

σ2iyi2+ 2

n−1

X

i=1 n

X

j=i+1

σijyiyj (3)

where the variance-covariance matrix Qis defined by

Q=

σ11 σ12 · · · σ1n σ21 σ22 · · · σ2n ... ... . .. ... σn1 σn2 · · · σnn

. (4)

and σikikσiσk and ρik is correlation coefficient of asseti (i= 1,2, ..., n) with assetk(k= 1,2, ..., n).

Generally, total return isn’t same in each period, R1 6=R2 6=· · · 6=Rm. In particular, looking at the history of m time periods of the risk-free portfolio, we would likey1, y2,· · · , yn to satisfy

(r1j−r¯1)y1+ (r2j−¯r2)y2+· · ·+ (rnj−r¯n)yn = 0 for j= 1,2, ..., m. (5) But if we cannot satisfy (5) exactly then the next best thing would be to make the residuals of the equations as small as possible. LetAdenote them×nmatrix whose elementsaji are defined by

aji=rij−¯ri. (6)

Then (5) is equivalent to the systemAy=0and we want to chooseyto minimize some normkAyk. It is convenient to use the two-norm

kAyk2=p

yTATAy

(5)

By the rules of matrix multiplication the diagonal elements ofATAare

m

X

j=1

a2ji=

m

X

j=1

(rij−r¯i)2, for i= 1,2, ..., n.

The off-diagonal (i, k)-th element ofATA is given by

m

X

j=1

ajiajk=

m

X

k=1

(rij−r¯i)(rkj−¯rk).

Comparison with (1) and (2) shows that the i-th diagonal element ofATA ismσi2 and that the (i, k)-th off-diagonal ismσik. HenceATA=mQwhereQis given by (4). Since the multiplying factor is irrelevant, we see that the problem of minimizing the risk function yTQy is equivalent to minimizing the two-norm of the residuals of the system (5).

3. Multi Objective Optimization Problem

Optimization problem can involve more than one objective function. The optimization problem is called multi objective optimization. Generally, we can write multi objective problem below

Minimize/Maximize fs(x) s= 1,2, ..., S subject to gj(x)≥0 j = 1,2, ..., J hc(x) = 0 c= 1,2, ..., C xmini ≤xi ≤xmaxi i= 1,2, ..., n

(7)

In optimization problem (7), there are someS objective function that will be minimized or maximized. Maximizing problem will be minimizing problem after multiplied with −1. So we have the same target of each objective function, which is minimizing. The solution which is satisfy constrained is called feasible solution.

And the set of feasible solution is called feasible region. The set of optimal solution in feasible region is called Pareto optimal set or Pareto Front. One of the most studied method in multi-objective optimization is the weight sum method. This method is give a weight scale for each objective function which will be solved.

After that, the objective function will be transformed to single-objective function.

Choosing this weighting parameter is depend on priority level of each objective function. We can write multi-objective problem such as,

Minimize PS

s=1wsfs(x)

subject to gj(x)≥0 j= 1,2, ..., J hc(x) = 0 c= 1,2, ..., C xmini ≤xi≤xmaxi i= 1,2, ..., n

(8)

wherews∈[0,1] is the weight fors-th objective function andPS

s=1ws= 1.

The weight method is one of simple method to solve multiobjective optimiza- tion problem. But this method only can use for convex objective function, like M-V model and MAD model.

(6)

A multi-objective portfolio optimization will optimize two objective function, to minimize the risk and to maximize the return. Hence the M-V model’s multi objective problem is

Minimize V =yTQy Maximize R= ¯rTy subject to eTy= 1

ziymin≤yi≤zi, i= 1,2, ..., n zi ∈0,1, i= 1,2, ..., n Pn

i=1zi=K

(9)

By using weight sum method, we get the multi objective problem of M-V model such as

Minimize w1yTQy−w2¯rTy subject to eTy= 1

ziymin≤yi≤zi, i= 1,2, ..., n zi∈0,1, i= 1,2, ..., n Pn

i=1zi=K

(10)

wherew1 andw2is a weighting parameter which has given andw1+w2= 1.

4. Firefly Algorithms (FA)

Firefly Algorithm (FA) was first developed by Xin-She Yang in late 2007 and published in 2008. FA was based on the flashing patterns and behavior of fireflies.

There are about 2000 firefly species, and most fireflies produce short, rhythmic flashes. The pattern of flashes is often unique for a particular species. The flashing light is produced by a process of bioluminescence. However, two fundamental func- tions of such flashes are to attract mating partners (communication) and to attract potential prey [14]. In addition, flashing may also serve as a protective warning mechanism to remind potential predators of the bitter taste of fireflies.The rhyth- mic flash, the rate of flashing, and the amount of time between flashes form part of the signal system that brings both sexes together. Females respond to a male’s unique pattern of flashing in the same species. Now we can idealize some of the flashing characteristics of fireflies so as to develop firefly-inspired algorithms. For simplicity in describing the standard FA, we now use the following three idealized rules [14] :

• Attractiveness is proportional to a firefly’s brightness. Thus for any two flashing fireflies, the less brighter one will move to the brighter one. The attractiveness is proportional to the brightness, both of which decrease as their distance increases. If there is no brighter one than a particular firefly, it will move randomly.

• All fireflies are unisex, so one firefly will be attracted to other fireflies, regardless of their sex.

• The brightness of a firefly is affected or determined by the landscape of the objective function.

(7)

Figure 1. Pseudocode of the firefly algorithm (FA)

In the firefly algorithm, there are two important issues: the variation of light intensity and formulation of the attractiveness of a firefly is determined by its brightness, which in turn is associated with the encoded objective function.

The distance between two firefliesiandjatxiandxj, respectively Cartesian distance :

rij=kxi−xjk= v u u t

d

X

k=1

(xi,k−xj,k)2

wherexi,kis thekth component of the spatial coordinatexiofith firefly. According to [14], the movement of a fireflyiattracted to another, more attractive (brighter) fireflyj is determined by

xt+1i =xti0e−γrij2(xtj−xti) +αti (11) where the second term is due to the attraction. The third term is randomization, withαbeing the randomization parameter, andi is a vector of random numbers drawn from a Gaussian distribution or uniform distribution. It is worth pointing out that (11) is a random walk. We use L´evy flights [13] for Firefly Algorithm (FA).

The parameter γ characterizes the variation of the attractiveness, and its value is crucially important in determining the speed of the convergence and how the FA behaves. In theory,γ ∈[0,∞), but for most application it typically varies from 0.001 to 1000 [14].

5. Portfolio Optimization Result for Multi Objective

In the multi-objective portfolio optimization, there are two goals; to minimize the risk and to maximize the return. The weightw1varies from [0,0.05, ...,1] and w2 = 1−w1. For one set of weight (w1, w2) will get one set point (σ, R) where σ=√

V. So, for 20 sets of weight, we also get 20 sets of point (σ, R) at M-V Model.

(8)

We use LQ45 dataset for simulation. If we choose the minimum proportion of asset is 0.01 and the total proportion is 1. The selected asset K, in this simulation is 10,15 and 20.

Figure 2. Pareto front of M-V model LQ45 datasets;K= 10

We had tried about 20 attempts for each 1 set of weight (w1, w2). We get Pareto front of M-V model for LQ45 dataset.

Figure 3. Pareto front of M-V model LQ45 datasets;K= 15

Pareto front is formed of 20 sets of weight that produce 20 set of risk (σ) and return (R). Pareto front of multi objective mean-variance (M-V) for LQ45 datasets and K= 10 in Figure 2. In Figure 3 we plot pareto front of multi objective M-V model for LQ45 datasets and K = 15. To compute one set of weight (w1, w2), it takes 1289.8 seconds for each attempt. All attempts take about 514789.2 seconds.

The result of multi objective M-V for LQ45 datasets and K = 20 can be seen in Figure 4. From those pareto front, we can say that the greater value of K then pareto front is shorter.

In Figure 2-4 we show these comparisons for mean-variance (M-V) model, where efficient frontier resulted from three differentK values are arranged by 1−3 rows individually.These three groups of data under evaluation reach similar results in mean-variance (M-V) model, at least from our macroscopic point of view. These three figures make a comparison based on different K values. As a result, the efficient frontier or pareto front becomes shorter following increase ofK value.

(9)

Figure 4. Pareto front of M-V model LQ45 datasets;K= 20

Various studies show that PSO can better than GA [8]. And also other conventional algorithms for solving many optimisation problems especially PO.

Now we will compare the FA with L´evy Flight and GA. We also see the result from other paper [12]. After implementing these algorithms using Matlab, we have carried out simulations and each algorithm has been run about 20 times. The results are summarized in the following table (see Table 2).

Table 2. Comparison of Algorithm Performance To Multi- Objective PO Problem

Functions V of GA V of FA

Buy in Threshold 0.002187541 0.001345866 Cardinality 0.002206251 0.002110339 MultiobjectiveK= 5 0.000467548 0.000161131 MultiobjectiveK= 10 0.000467548 0.000276613 MultiobjectiveK= 15 0.001687194 0.001587281

We can see (see Table 2) that FA with L´evy Flight is more efficient in finding global optimum. In this term, global optimum is minimize the objective func- tion. The portfolio risk, V of FA is much smaller than GA in all function and computational time also smaller than GA. It is also effective for solving the port- folio optimization problems in different risk measures. FA prominent advantage over other exact search methods is its flexibility and its ability to easily obtain a good solution to a problem where the other deterministic methods cannot achieve optimality in an easy manner.

The multiobjective PO problem with FA algorithm in this paper can provide an efficient and convenient tool for investors. With different risk tendencies, in- vestors are able to find efficient frontier based on a fixed amount of assets, as well as a lower bound of each asset to avoid minor investment which might increase transaction costs.

(10)

6. CONCLUDING REMARKS

In this paper we have carried out simulations some function of multi objective portfolio optimization and each algorithm of GA and FA has been run about 20 times. We then implemented and compared these algorithms. Our simulation results for finding the global optimum of various function s suggest that FA often outperforms GA in terms of risk value,V. This implies that FA with L´evy Flight is potentially more powerful in solving PO problems or NP problems which will be investigated further in future studies.

The FA with L´evy Flight is efficient enough. A further improvement on the convergence of the algorithm is carryout sensitivity aspect by varying various parameters such as β0,α,γ and λ. These indicated that a sensible approach and selected parameter was to pool their results and could form important topics for further study.

REFERENCES

[1] Bartholomew-Biggs, M. and Kane, S.J., ”Nonlinear Optimization With Financial Applica- tions”, Kluwer Academic Publishers, 2009.

[2] Bonami, P. and Lejeune, M.A., ”An Exact Solution Approach for Portfolio Optimization Problems Under Stochastic and Integer Constraints”,Journal Operation Research,57(2009), 650 - 670.

[3] Chang, T.J., Meade, N.,Beasley, J.E. and Sharaiha, Y.M., ”Heuristics for Cardinality Con- strained Portfolio Optimisation”,Computers & Operations Research,27(2000), 1271 - 1302.

[4] Chang, T.J., Yang, S.C. and Chang, K.J., ”Portfolio Optimization Problems in Different Risk Measures Using Genetic Algorithm”,Expert Systems with Applications,36(2009), 10529 - 10537.

[5] Cornuejols, G., T¨ut¨unc¨u, R.,Optimization Methods in Finance, Cambridge University Press, 2007.

[6] Crama, Y. and Schyns, M., ”Simulated Annealing for Complex Portfolio Selection Problems”, European Journal of Operational Research150(2003), 546 - 571.

[7] Ertenlice, O. and Kalayci, C.B., ”A Survey of Swarm Intelligence For Portfolio Optimization:

Algorithms and Applications”,Swarm and Evolutionary Computation,39(2018), 36 - 52.

[8] Goldberg, D.E.,Genetic Algorithms in Search, Optimisation and Machine Learning, Read- ing, Mass.: Addison Wesley, 1989.

[9] Lazulfa, I. and Saputro, P.H., ”Portfolio Optimization With Buy-in Thresholds Constraint Using Simulated Annealing Algorithm”,Proceeding of Seminar Nasional Integrasi Matem- atika dan Nilai Islami 1(2017), 370 - 377.

[10] Markowitz, H., ”Portfolio Selection”,The Journal of Finance,7(1952), 77 - 91.

[11] Meghwani, S.S. and Thakur, M., ”Multi-objective Heuristic Algorithms For Practical Portfo- lio Optimization and Rebalancing With Transaction Cost”,Applied Soft Computing Journal, (2017), 1 - 64.

[12] Skolpadungket, P., Dahal, K. and Harnpornchai, N., ”Portfolio Optimization using Multi- objective Genetic Algorithm”,IEEE Congress on Evolutionary Computation (CEC)(2007), 516 - 523.

[13] Yang, X.S., ”Firefly Algorithm, L´evy Flights and Global Optimization”, in: Research and Development in Intelligent Systems XXVI, (2010), Springer London, 209 - 218.

[14] Yang, X.S.,Nature-Inspired Optimization Algorithms, Elsevier Inc., 2014.

Referensi

Dokumen terkait

My submission addresses the following issues: 1 the impact of the proposed amendments on my office; 2 a broad outline of how my office conducts inspections and reports on agencies'