Top Banner
Research Article Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint Nebojsa Bacanin and Milan Tuba Faculty of Computer Science, Megatrend University Belgrade, 11070 Belgrade, Serbia Correspondence should be addressed to Milan Tuba; [email protected] Received 9 April 2014; Accepted 5 May 2014; Published 29 May 2014 Academic Editor: Xin-She Yang Copyright © 2014 N. Bacanin and M. Tuba. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Portfolio optimization (selection) problem is an important and hard optimization problem that, with the addition of necessary realistic constraints, becomes computationally intractable. Nature-inspired metaheuristics are appropriate for solving such problems; however, literature review shows that there are very few applications of nature-inspired metaheuristics to portfolio optimization problem. is is especially true for swarm intelligence algorithms which represent the newer branch of nature-inspired algorithms. No application of any swarm intelligence metaheuristics to cardinality constrained mean-variance (CCMV) portfolio problem with entropy constraint was found in the literature. is paper introduces modified firefly algorithm (FA) for the CCMV portfolio model with entropy constraint. Firefly algorithm is one of the latest, very successful swarm intelligence algorithm; however, it exhibits some deficiencies when applied to constrained problems. To overcome lack of exploration power during early iterations, we modified the algorithm and tested it on standard portfolio benchmark data sets used in the literature. Our proposed modified firefly algorithm proved to be better than other state-of-the-art algorithms, while introduction of entropy diversity constraint further improved results. 1. Introduction Since most real-life problems can be modeled as optimization tasks, many methods and techniques that could tackle such problems were developed. us, the optimization became one of the most applicable fields in mathematics and computer science. e difficulty of an optimization problem depends on the mathematical relationships between the objective function, potential constraints, and decision variables. Hard optimiza- tion problems can be combinatorial (discrete) or continuous (global optimization), while continuous problems can be further be classified as constrained or unconstrained (bound constrained). e optimization problem becomes even harder when some variables are real-valued, while others can take only integer values. Such mixed continuous/discrete problems usually require problem-specific search techniques in order to generate optimal, or near optimal solution. One representative example of such hard optimization problems is portfolio optimization, a well-known issue in economics and finance. Many methods and heuristics were developed to optimize various models and formulations of the portfolio problem [1]. Various portfolio optimization problem models may or may not include different constraints in their formulations. Also, to enhance the diversity of portfo- lio, some approaches include entropy in its formulations [2]. Unconstrained (bound constrained) optimization is for- mulated as -dimensional minimization or maximization problem: min (or max) () , = ( 1 , 2 , 3 ,..., ) ∈ , (1) where represents a real vector with ≥1 components and is hyper-rectangular search space with dimensions constrained by lower and upper bounds: , ∈ [1, ] . (2) Hindawi Publishing Corporation e Scientific World Journal Volume 2014, Article ID 721521, 16 pages http://dx.doi.org/10.1155/2014/721521
17

Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

Mar 07, 2023

Download

Documents

Dusan Vujovic
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

Research ArticleFirefly Algorithm for Cardinality ConstrainedMean-Variance Portfolio Optimization Problem withEntropy Diversity Constraint

Nebojsa Bacanin and Milan Tuba

Faculty of Computer Science Megatrend University Belgrade 11070 Belgrade Serbia

Correspondence should be addressed to Milan Tuba tubaieeeorg

Received 9 April 2014 Accepted 5 May 2014 Published 29 May 2014

Academic Editor Xin-She Yang

Copyright copy 2014 N Bacanin and M Tuba This is an open access article distributed under the Creative Commons AttributionLicense which permits unrestricted use distribution and reproduction in any medium provided the original work is properlycited

Portfolio optimization (selection) problem is an important and hard optimization problem that with the addition of necessaryrealistic constraints becomes computationally intractable Nature-inspired metaheuristics are appropriate for solving suchproblems however literature review shows that there are very few applications of nature-inspired metaheuristics to portfoliooptimization problemThis is especially true for swarm intelligence algorithmswhich represent the newer branch of nature-inspiredalgorithms No application of any swarm intelligence metaheuristics to cardinality constrained mean-variance (CCMV) portfolioproblem with entropy constraint was found in the literature This paper introduces modified firefly algorithm (FA) for the CCMVportfoliomodelwith entropy constraint Firefly algorithm is one of the latest very successful swarm intelligence algorithm howeverit exhibits some deficiencies when applied to constrained problems To overcome lack of exploration power during early iterationswe modified the algorithm and tested it on standard portfolio benchmark data sets used in the literature Our proposed modifiedfirefly algorithmproved to be better than other state-of-the-art algorithmswhile introduction of entropy diversity constraint furtherimproved results

1 Introduction

Sincemost real-life problems can bemodeled as optimizationtasks many methods and techniques that could tackle suchproblemswere developedThus the optimization becameoneof the most applicable fields in mathematics and computerscience

The difficulty of an optimization problem depends on themathematical relationships between the objective functionpotential constraints and decision variables Hard optimiza-tion problems can be combinatorial (discrete) or continuous(global optimization) while continuous problems can befurther be classified as constrained or unconstrained (boundconstrained)

The optimization problem becomes even harder whensome variables are real-valued while others can take onlyinteger values Such mixed continuousdiscrete problemsusually require problem-specific search techniques in orderto generate optimal or near optimal solution

One representative example of such hard optimizationproblems is portfolio optimization a well-known issue ineconomics and finance Many methods and heuristics weredeveloped to optimize various models and formulations ofthe portfolio problem [1] Various portfolio optimizationproblemmodels may ormay not include different constraintsin their formulations Also to enhance the diversity of portfo-lio some approaches include entropy in its formulations [2]

Unconstrained (bound constrained) optimization is for-mulated as 119863-dimensional minimization or maximizationproblem

min (or max) 119891 (119909) 119909 = (1199091 1199092 1199093 119909

119863) isin 119878 (1)

where 119909 represents a real vector with119863 ge 1 components and119878 isin 119877119863 is hyper-rectangular search space with 119863 dimensions

constrained by lower and upper bounds

119897119887119894le 119909119894le 119906119887119894 119894 isin [1 119863] (2)

Hindawi Publishing Corporatione Scientific World JournalVolume 2014 Article ID 721521 16 pageshttpdxdoiorg1011552014721521

2 The Scientific World Journal

In (2) 119897119887119894and 119906119887

119894are lower and upper bounds for the 119894th

problem component respectivelyThe nonlinear constrained optimization problem in the

continuous space can be formulated in the same way as in (1)but in this case 119909 isin 119865 sube 119878 where 119878 is 119863-dimensional hyper-rectangular space as defined in (2) while 119865 sube 119878 representsthe feasible region defined by the set of119898 linear or nonlinearconstraints

119892119895(119909) le 0 for 119895 isin [1 119902]

ℎ119895(119909) = 0 for 119895 isin [119902 + 1119898]

(3)

where 119902 is the number of inequality constraints and119898 minus 119902 isthe number of equality constraints

Fundamental versions of algorithms and metaheuristicsfor constrained numerical optimization problems do notincludemethods for dealing with constraintsTherefore con-straint handling techniques are usually added to these algo-rithms to improve and redirect the search process towards thefeasible region of the search space Equality constraints makeoptimization even harder by shrinking the feasible searchspace which becomes very small compared to the entiresearch space To tackle such problem equality constraints arereplaced with the inequality constraints [3]

|ℎ (119909)| minus 120592 le 0 (4)

where 120592 gt 0 is some small violation tolerance usuallydynamically adjusted

Since hard optimization problems are unsolvable in a rea-sonable amount of time the exact methods which trace opti-mal solution cannot be applied For such problems it is moreappropriate to employ nondeterministic metaheuristics

Metaheuristics are iterative population based andstochastic approaches that do not guarantee finding theoptimal solution but they can obtain satisfying solutionwithin acceptable time [4] In metaheuristics imple-mentations the processes of exploitation and explorationconduct the search process Exploitation directs searcharound the current best solutions while the explorationrandomly discovers new regions of a search domain

During the last few decades wewitnessed development ofnature-inspired sophisticated intelligent systems that can beused as optimization tools for many complex and hard prob-lems Metaheuristics that incorporate and simulate naturalprinciples and rules are called nature-inspired metaheuris-tics

Nature-inspired metaheuristics [5] can roughly bedivided into two categories evolutionary algorithms (EA)and swarm intelligence The most prominent representativeof EA is genetic algorithms (GA) GA can obtain good resultsfor many kinds of optimization problems [6]

Social behavior of swarms of ants bees worms birdsand fish was an inspiring source for the emerge of swarmintelligence [7] Although swarm system consists of rela-tively unsophisticated individuals they exhibit coordinatedbehavior that directs swarm towards the desired goal with nocentral component that manages the system as a whole

Ant colony optimization (ACO) was founded on antrsquosability to deploy a substance called pheromone for marking

the discovered path between the food source and antrsquos nestsIt is one of the oldest members of swarm intelligence family[8] but it is constantly being improved and applied to differentproblems [9ndash11]

Artificial bee colony (ABC) algorithmmimics the behav-ior of honey bee swarm In this paradigm three types of arti-ficial bees perform search Each type of bees has its particularrole in the search process ABC was originally proposed byKaraboga for problems of continuous optimization [12] Thisalgorithm proves to be robust and capable of solving highdimensionality problems [13ndash15]

Cuckoo search (CS) is an iterative approach that modelssearch process by employing Levy flights (series of straightflight paths with sudden 90 degrees turn) It was firstproposed by Yang and Deb [16] and proved to be a robustoptimization technique [17] obtaining satisfying results inreal-life optimizations like image thresholding [18]

Also swarm intelligence metaheuristics whichmimic thehuman search process were developed Seeker optimizationalgorithm (SOA) is established on human memory reason-ing past experience and social interactions It has beenproven that the SOA is a robust technique for solving globalnumerical and real-life optimization problems [19] and iscontinuously being improved [20]

As a result of the literature survey it can be concluded thatfor portfolio optimization problem there are some geneticalgorithm (GA) implementations However there are onlyfew swarm intelligence algorithms adapted for this problemThere are papers which refer to solving portfolio prob-lem with nondominating sorting genetic algorithm (NSGA)which was first proposed by Srinivas and Deb [21] Newerversion NSGA-II improves the convergence and the spreadof solutions in the population [22] Lin et al presentedNSGA-II based algorithm with integer encoding for solvingMV portfolio model with minimum transaction lots (MTL)fixed transaction costs (TC) and linear constraints on capitalinvestmentsThe optimization of MV portfolio problem withcardinality andholdingweights constraints byGA is shown in[23] Soleimani et al [24] presented GA with RAR crossoveroperator for solving MV portfolio problem where cardinalityconstraints MTL and constraints on sector capitalization aretaken into account

As mentioned only few swarm intelligence metaheuris-tics exist for portfolio optimization Deng and Lin presentedant colony optimization (ACO) for solving the cardinalityconstraints Markowitz MV portfolio model [25] Haqiqi andKazemi [26] employed the same algorithm to MV portfoliomodel We emphasize on one ACO implementation basedon the average entropy for real estate portfolio optimization[27] This is one of the rare papers that incorporates entropyin portfolio model Cura investigated PSO approach tocardinality constrained MV portfolio optimization [1] Thetest data set contains weekly prices from March 1992 toSeptember 1997 from the following five indexes Hang Sengin Hong Kong DAX 100 in Germany FTSE 100 in UK SampP100 in USA and Nikkei in Japan The results of this studyare compared with those from genetic algorithm simulatedannealing and tabu search approaches and showed thatPSO has potential in portfolio optimization Zhu et al [28]

The Scientific World Journal 3

presented PSO algorithm for nonlinear constrained portfoliooptimization with multiobjective functions The model istested on various restricted and unrestricted risky investmentportfolios and a comparative study with GA is showed PSOdemonstrated high computational efficiency in constructingoptimal risky portfolios and can be compared with otherstate-of-the-art algorithms

ABC algorithm formixed quadratic and integer program-ming problem of cardinality constrainedMVportfoliomodelwas presented by Wang et al [29] Some modifications ofclassical ABC algorithm for constrained optimization prob-lems were adopted The approach was tested on a standardbenchmark data set and proved to be a robust portfoliooptimizer

One of the first implementations for portfolio optimiza-tion problem by the firefly algorithms was developed byTuba et al [30 31] Framework for solving this problemwas devised Metaheuristic was tested on standard five-assetdata set FA proved to be robust and effective technique forportfolio problem Among other metaheuristics for portfolioproblem one approach based on neural networks (NN)should be distinguished [32]

In this paper we propose a modified firefly algorithm(FA) for cardinality constrained mean-variance (CCMV)portfolio optimization with entropy constraint FA was firstintroduced by Yang for unconstrained optimization [33]Later it was adapted [34] for solving various numerical andpractical optimization problems [35ndash37]

We modified pure FA algorithm to adjust it for con-strained problems and to improve its performance Weintensified exploration during early phase and eliminated itduring late iterationswhen the proper part of the search spacehas been reached Details will be given in Section 4

The implementation of metaheuristics for the CCMVportfolio model with entropy constraint was not found in theliterature survey Thus we conducted three experiments

(i) First we compared original FA with our modifiedmFA applied to portfolio optimization problem Wewanted to see what is the real improvement of ourapproach

(ii) Then we compared results of our algorithm for theCCMV portfolio model with and without entropyconstraint In this test we analyzed the influence ofentropy constraint to portfolio diversification

(iii) Finally in the third test we made comparative anal-ysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposedalgorithm to Curarsquos PSO [1] and also to GA TS andSA indirectly from [23]

The rest of the paper is organized as follows Section 2presents mathematical formulations of variety portfolio opti-mization models The presentation of the original FA isgiven in Section 3 Our proposed modified FA approachfor the CCMV portfolio problem with entropy constraintis discussed in Section 4 Section 5 first shows algorithmparameter settings that are used in experiments Then wepresent three experiments which we conducted along with

the comparative analyses with other metaheuristics FinallySection 6 gives conclusions and recommendations for futureresearch

2 Portfolio Optimization Problem Definitions

Portfolio optimization as one of the most important issuesin modern financial management tackles the problem ofdistribution of financial resources across a number of assetsto maximize return and control the risk

When making financial decisions investors follow theprinciple of diversification by investing their capital intodifferent types of assets By investment in portfolios ratherthan in single assets the risk is mitigated by diversificationof the investments without negative impact on expectedreturns

The essential form of portfolio optimization is formulatedas bicriterion optimization problem where the reward whichis measured by the mean of return should be maximizedwhile the risk measured by the variance of return should beminimized [38] This problem deals with the selection of theportfolio of securities that minimizes the risk subject to theconstraints while guaranteeing a given level of returns [39]

By literature researchmanymethods for solving portfolioproblem can be found Markowitzrsquos standard mean-variance(MV) model choses one important objective function thatis subject to optimization while the remaining objectivefunctions are being threated as constraints [40]The key pointin the MV formulation is to employ the expected returnsof a portfolio as the investment return and the variance ofreturns of the portfolio as the investment risk [41] Its basicassumptions are that the investors are rational with eithermultivariate normally distributed asset returns or in the caseof arbitrary returns a quadratic utility function [42] Thisapproach is widely adapted and plays an important role in themodern portfolio theory

Markowitzrsquos MV model considers the selection of riskyportfolio as objective function and the mean return ofan asset as one of the constraints [43] This model canmathematically be defined as

min1205902119877119901= 1205902

119901=

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895) (5)

subject to

119877119901= 119864 (119877

119901) =

119873

sum

119894=1

120596119894119877119894ge 119877 (6)

119873

sum

119894=1

120596119894= 1 120596

119894ge 0 forall119894 isin 1 2 119873 (7)

where 119873 is the total number of available assets 119877119894is the

mean return on asset 119894 and Cov(119877119894119877119895) is covariance of

returns of assets 119894 and 119895 respectively Constraint defined in(7) guarantees that the whole disposable capital is investedWeight variable 120596

119894has a role of control parameter that

4 The Scientific World Journal

determines the proportion of the capital that is placed in asset119894 Weight variable has a real value in the range [0 1]

In the presented MV formulation the objective is tominimize the portfolio risk 1205902

119901 for a given value of portfolio

expected return 119877119901

Efficient frontier model which is often called single-objective function model constructs only one evaluationfunction that models portfolio optimization problem In thismodel the desired mean return 119877 is varying for the purposeof finding different objective function values Risk aversionindicator 120582 isin [0 1] controls this process [28]

Efficient frontier definition is

min120582[

[

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895)]

]

minus (1 minus 120582) [

119873

sum

119894=1

120596119894119877119894] (8)

subject to

119873

sum

119894=1

120596119894= 1

120596119894ge 0 forall119894 isin 1 2 119873

(9)

In the presented formulation 120582 is critical parameter Itcontrols the relative importance of themean return to the riskfor the investor When the value of 120582 is set to 0 mean returnof portfolio is being maximized without considering the riskAlternatively when 120582 has a value of 1 risk of the portfoliois minimized regardless of the mean return Thus when thevalue of 120582 increases the relative importance of the risk to themean return for the investor rises and vice versa

Each 120582 value generates different objective function valuewhich is composed of themean return and the variance (risk)By tracing the mean return and variance intersections fordifferent 120582 a continuous curve can be drawn which is calledan efficient frontier in the Markowitzrsquos modern portfoliotheory

Another model worth mentioning is Sharpe ratio (SR)which uses the information from mean and variance of anasset [44] In this model the measure of mean return isadjusted with the risk and can be described by

SR =

119877119901minus 119877119891

StdDev (119901) (10)

where 119901 denotes portfolio 119877119901is the mean return of the

portfolio 119901 and 119877119891is a test available rate of return on a risk-

free asset StdDev(119901) is a measure of the risk in portfolio(standard deviation of119877

119901) By adjusting the portfolio weights

119908119894 portfoliorsquos Sharpe ratio can be maximizedHowever all three models the MV efficient frontier and

Sharpe ratio were constructed under strict and simplifiedassumptions that do not consider real-world parametersand limitations and as such are not always suitable for realapplications For these reason extendedMVmodel is devised

Extended MV formulation takes into account additionalconstraints such as budget cardinality transaction lots andsector capitalization These constraints model real-world

legal and economic environment where the financial invest-ments are being done [45] Budget constraint controls theminimum andmaximum total budget proportion that can beinvested in particular asset Cardinality constraint controlswhether a particular asset will be included in the portfolioThe minimum transaction lots constraint ensures that eachsecurity can only be purchased in a certain number ofunits Sector capitalization constraint directs the investmentstowards the assets that belong to the sectors where highervalue of market capitalization can be accomplished Thereview of this constraint is given in [24]

When all the above-mentioned constraints are beingapplied to the basic portfolio problem formulation theproblem becomes a combinatorial optimization problemwhose feasible region is not continuous Thus the extendedMV model belongs to the group of quadratic mixed-integerprogramming models Its formulation is

min1205902119877119901= 1205902

119901=

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895) (11)

where

120596119894=

119909119894119888119894119911119894

sum119873

119895=1119909119895119888119895119911119895

119894 = 1 119873 (12)

119873

sum

119894=1

119911119894= 119872 le 119873 119872119873 isin N

119911119894isin 0 1 119894 = 1 119873

(13)

subject to

119873

sum

119894=1

119909119894119888119894119911119894119877119894ge 119861119877 (14)

119873

sum

119894=1

119909119894119888119894119911119894le 119861 (15)

0 le 119861low119894 le 119909119894119888119894le 119861up

119894le 119861 119894 = 1 119873 (16)

sum

119894119904

119882119894119904ge sum

1198941199041015840

1198821198941199041015840

forall1199101199041199101199041015840 = 0 119894

119904 1198941199041015840 isin 1 2 119873

119904 1199041015840isin 1 2 119878 119904 lt 119904

1015840

(17)

where

119910119904=

1 if sum

119894119904

119911119894gt 0

0 if sum

119894119904

119911119894= 0

(18)

In (11)ndash(18) 119872 represents the number of selected assetsamong possible119873 assets 119861 is the total disposable budget and119861low119894 and119861up

119894are lower andupper limits of the budget that can

be invested in asset 119894 respectively 119878 represents the number ofsectors in the market where the investment is being placed

The Scientific World Journal 5

119888119894is the size of transaction lot for asset 119894 and 119909

119894denotes the

number of such lots (of asset 119894) that is purchasedDecision variable 119911

119894is used to apply cardinality con-

straint 119911119894is equal to 1 if an asset 119894 is present in the

portfolio otherwise its value is 0 Equation (17)models sectorcapitalization constraint Despite the fact that a certain sectorhas high capitalization security from this sector that haslow return andor high risk must be excluded from the finalportfoliorsquos structure To make such exclusion variable 119910

119904is

defined and it has a value of 1 if the corresponding sector hasat least one selected asset and 0 otherwise In (17) 119894

119904is a set

of assets which can be found in sector 119904 Sectors are sorted indescending order by their capitalization value

Entropy was introduced by Jaynes [46] for wide appli-cation in optimization crystallography in the beginningnetworks [47] and so forth but it also becomes an importanttool in portfolio optimization and asset pricing Entropy iswidely recognized measure of portfolio diversification [2]In multiobjective portfolio optimization models the entropycan be used as an objective function Here we will addressentropy as diversity constraint in portfolio models becausewe employed it in portfolio model that is used for testing ofour modified FA approach

The entropy constraint defines lower bound119871119864of entropy

119864(119875) of portfolio 119875 according to the following equation [48]

119864 (119875) = minus

119873

sum

119894=1

119909119894ln119909119894ge 119871119864 (19)

where119873 is the number of assets in portfolio119875 and119909119894is weight

variable of the security 119894In one extreme when the weigh variable of only one

asset in portfolio 119875 is 1 and for the rest of the assets is 0119864(119875) reaches its minimum at minus1 lowast ln 1 = 0 [49] This isthe least diverse scenario Contrarily in the most diversecondition that forforall119894 119909

119894= 1119873119864(119875) obtains itsmaximum in

minus119873(1119873 ln 1119873) = ln119873 According to this 119871119864is in the range

[0 ln119873] Greater value of entropy denotes better portfoliorsquosdiversity and 119871

119864is used to make sure that the diversity of 119875

is not too lowEntropy constraint equation (19) can be transformed into

the upper-bound constraint [49]

119865 (119875) = 119890minus119864(119875)

= 119890sum119873

119894=1119909119894 ln119909119894 le 119880

119864 (20)

As shown previously 0 le 119864(119875) le ln119873 which implicatesthat 0 ge minus119864(119875) ge minus ln119873 Then the condition 119890

0= 1 ge

119890minus119864(119875)

= 119865(119875) ge 119890minus ln119873

= 1119873 holds Thus the range ofupper-bound constraint 119880

119864is [1119873 1]

In this paper for testing purposes we used model whichemploys some of the constraints that can be found in theextended MV formulation In the experimental study weimplemented modified FA for optimizing cardinality con-strained mean-variance model (CCMV) which is derivedfrom the standard Markowitzrsquos and the efficiency frontiermodels

We were inspired by Ustarsquos and Kantarrsquos multiobjec-tive approach based on a mean-variance-skewness-entropyportfolio selection model (MVSEM) that employs Shannonrsquos

entropy measure to the mean-variance-skewness portfoliomodel (MVSM) to generate a well-diversified portfolio [5051] Thus we added entropy measure to the CCMV portfolioformulation to generate well-diversified portfolio

Formulation of theCCMVmodel with entropy constraintis

min120582[

[

119873

sum

119894=1

119873

sum

119895=1

119909119894119909119895120590119894119895]

]

minus (1 minus 120582) [

119873

sum

119894=1

119909119894120583119894] (21)

subject to

119873

sum

119894=1

119909119894= 1 (22)

119873

sum

119894=1

119911119894= 119870 (23)

120576119894119911119894le 119909119894le 120575119894119911119894 119911 isin 0 1 119894 = 1 2 3 119873 (24)

minus

119873

sum

119894=1

119911119894119909119894ln119909119894ge 119871119864 (25)

As already mentioned in this section119873 is the number ofpotential securities that will be included in portfolio 120582 is riskaversion parameter 119909

119894and 119909

119895are weight variables of assets 119894

and 119895 respectively 120575119894119895is their covariance and 120583

119894is 119894th assetrsquos

return119870 is the desired number of assets that will be includedin the portfolio Decision variable 119911

119894controls whether the

asset 119894 will be included in portfolio If its value is 1 asset 119894is included and if the value is 0 asset 119894 is excluded from theportfolio 120576 and 120575 are lower and upper bounds of the asset thatis included in portfolio and they make sure that the assetrsquosproportion in the portfolio is within the predefined range

We applied entropy constraint equation (25) with lowerbounds as in (19) to ensure that the diversity of portfolio isnot too low 119871

119864is lower bound of the entropy in the range

[0 ln119870] In (25) 119911119894ensures that only assets that are included

in portfolio are taken into accountFrom the CCMV formulation with entropy constraint it

can be seen that this problem belongs to the group of mixedquadratic and integer programming problems It employsboth real and integer variables with equity and inequityconstraints

3 Presentation of the Original FA

Firefly algorithm (FA) was originally proposed by Yang in2008 [33] with later improvements [52] It was applied tocontinuous [53] discrete [54] and mixed [55] optimizationproblems The emergence of this metaheuristic was inspiredby the social and flashing behavior of fireflies

Fireflies inhabit moderate and tropical climate environ-ments all around the word Their flashing behavior has manydifferent roles Synchronized flashing by males is unique inthe animal world and involves a capacity for visually coordi-nated rhythmically coincident and interindividual behaviorAlso flashing is used to alleviate communication for mating

6 The Scientific World Journal

and to frighten the predatorsThese flashing properties can beincorporated into swarm intelligence metaheuristic in such away that they are associatedwith the objective functionwhichis subject to optimization

With respect to the facts that the real firefly system issophisticated and that the metaheuristics are approximationsof real systems three idealized rules are applied with the goalto enable algorithmrsquos implementation [33] (1) all fireflies areunisex so the attractions between fireflies do not depend ontheir sex (2) attractiveness of a firefly is directly proportionalto their brightness and the less brighter firefly will movetowards the brighter one Brightness increases as the distancebetween fireflies decreases (3) the brightness of a firefly isdetermined by the value of objective function For minimiza-tion problems brightness increases as the objective functionvalue decreases There are also other forms of brightnesswhich can be defined similar to fitness function in geneticalgorithms (GA) [6]

In the implementation of FA one of the most importantissues that should be considered is the formulation of attrac-tiveness For the sake of simplicity a good approximationis that the attractiveness of a firefly is determined by itsbrightness which depends on the encoded objective function

In the case of maximization problems the brightness ofa firefly at a particular location 119909 can be chosen as 119868(119909) sim

119891(119909) where 119868(119909) is the attractiveness and 119891(119909) is the value ofobjective function at this location Otherwise if the goal is tominimize function the following expression can be used

119868 (119909) =

1

119891 (119909) if 119891 (119909) gt 0

1 +1003816100381610038161003816119891 (119909)

1003816100381610038161003816 otherwise(26)

The variations of light intensity and attractiveness aremonotonically decreasing functions because as the lightintensity and the attractiveness decrease the distance fromthe source increases and vice versa This can be formulatedas [56]

119868 (119903) =1198680

1 + 1205741199032 (27)

where 119868(119903) is the light intensity 119903 is distance and 1198680is the light

intensity at the source Besides that the air also absorbs partof the light and the light becomes weaker Air absorption ismodeled by the light absorption coefficient 120574

In most FA implementations that can be found in theliterature survey the combined effect of both the inversesquare law and absorption can be approximated using thefollowing Gaussian form

119868 (119903) = 1198680119890minus1205741199032

(28)

Attractiveness 120573 of a firefly is relative because it dependson the distance between the firefly and the beholder Thusit varies with the distance 119903

119894119895between fireflies 119894 and 119895 The

attractiveness is direct proportional to fireflies light intensity(brightness) as shown in the following

120573 (119903) = 1205730119890minus1205741199032

(29)

where 1205730is the attractiveness at 119903 = 0 Equation (29) deter-

mines a characteristic distance Γ = 1radic120574 over which theattractiveness changes significantly from 120573

0to 1205730119890minus1

But in practical applications the above expression isusually replaced with

120573 (119903) =1205730

1 + 1205741199032 (30)

Main reason for this replacement is that the calculation ofexponential function in (29) demands much more computa-tional power than simple division in (30)

The movement of a firefly 119894 (its new position in iteration119905 + 1) towards the brighter and thus more attractive firefly 119895is calculated using

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (31)

where 1205730is attractiveness at 119903 = 0 120572 is randomization

parameter 120581 is random number drawn from uniform orGaussian distribution and 119903

119894119895is distance between fireflies 119894

and 119895 The positions of fireflies are updated sequentially bycomparing and updating each pair of them at every iteration

The distance between fireflies 119894 and 119895 is calculated usingCartesian distance form [56]

119903119894119895=10038171003817100381710038171003817119909119894minus 119909119895

10038171003817100381710038171003817= radic

119863

sum

119896=1

(119909119894119896minus 119909119895119896) (32)

where 119863 is the number of problem parameters For mostproblems 120573

0= 0 and 120572 isin [0 1] are adequate settings

The parameter 120574 has crucial impact on the convergencespeed of the algorithm This parameter shows the variationof attractiveness and in theory it has a value of [0 +infin) butin practice it is determined by the characteristic distance Γ ofthe system that is being optimized In most implementations120574 parameter varies between 001 and 100

There are two special cases of the FA and they are bothassociated with the value of 120574 as follows [33]

(i) if 120574 = 0 then 120573 = 1205730 That means that the air around

firefly is completely clear In this case 120573 is alwaysthe largest it could possibly be and fireflies advancetowards other fireflies with the largest possible stepsThe exploration-exploitation is out of balance becausethe exploitation is maximal while the exploration isminimal

(ii) if 120574 = infin then 120573 = 0 In this case there is a thick fogaround fireflies and they could not see each otherThemovement is performed in a random steps and explo-ration is more intensive with practically no exploi-tation at all

The pseudocode for the original FA is given as Algo-rithm 1

In the presented pseudocode 119878119873 is total number offireflies in the population 119868119873 is total number of algorithmrsquositerations and 119905 is the current iteration

The Scientific World Journal 7

Generate initial population of fireflies 119909119894 (119894 = 1 2 3 119878119873)

Light intensity 119868119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INwhile 119905 lt 119868119873 do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119895lt 119868119894then

Move firefly 119895 towards firefly 119894 in 119889 dimensionAttractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace the worst withbetter solution and update light intensity

end ifend for

end forRank all fireflies and find the current best

end while

Algorithm 1 Original firefly algorithm

4 Proposed mFA for the CCMV PortfolioProblem with Entropy Constraint

As mentioned in Section 1 we propose a modified fireflyalgorithm for cardinality constrained mean-variance portfo-lio optimization with entropy constraint

By analyzing FA we noticed that as most other swarmintelligence algorithms the pure version of the algorithmdeveloped for unconstrained problems exhibits some defi-ciencies when applied to constrained problems In the earlycycles of algorithmrsquos execution established balance betweenexploitation and exploration is not completely appropriatefor this class of problems During early phase explorationis not intensive enough However during late cycles whenFA was able to discover the right part of the search spacethe exploration is no longer needed To control whetherthe exploration will be triggered or not we introducedexploration breakpoint 119864119861119875 control parameter

In this section we show implementation details of ourmodified FA algorithm which we named mFA

41 Initialization Phase and Fitness Calculation At the initial-ization step FA generates random population of 119878119873 fireflies(artificial agents) using

119909119894119895= 119897119887119895+ rand (0 1) lowast (119906119887

119895minus 119897119887119895) (33)

where 119909119894119895

is the weight of the 119895th portfoliorsquos asset of the 119894thagent rand(0 1) is random number uniformly distributedbetween 0 and 1 and 119906119887

119895and 119897119887

119895are upper and lower weight

bounds of the 119895th asset respectivelyIf the initially generated value for the 119895th parameter of

the 119894th firefly does not fit in the scope [119897119887119895 119906119887119895] it is being

modified using the following expression

if (119909119894119895) gt 119906119887

119895 then 119909

119894119895= 119906119887119895

if (119909119894119895) lt 119897119887119895 then 119909

119894119895= 119897119887119895

(34)

Moreover in the initialization phase decision variables119911119894119895(119894 = 1 119878119873 119895 = 1 119873) are also initialized for

each firefly agent 119894 119873 is the number of potential assets inportfolio According to this each firefly is modeled using2lowast119873 dimensions 119911

119894is a binary vector with values 1 when an

asset is included in portfolio and 0 when it is excluded fromit

Decision variables are generated randomly by applying

119911119894119895=

1 if 120601 lt 05

0 if 120601 ge 05(35)

where 120601 is random real number between 0 and 1To guarantee the feasibility of solutions we used similar

arrangement algorithm as proposed in [1] The arrangementalgorithm is applied first time in the initialization phase

In the arrangement algorithm 119894 is the current solutionthat consists of 119876 the distinct set of 119870lowast

119894assets in the 119894th

solution 119911119894119895

is the decision variable of asset 119895 and 119909119894119895

isthe weight proportion for asset 119895 Arrangement algorithmpseudocode is shown as Algorithm 2

For the constraint sum119873119894=1

119909119894= 1 we set 120595 = sum

119895isin119876119909119894119895

and put 119909119894119895

= 119909119894119895120595 for all assets that satisfy 119895 isin 119876

The same approach for satisfying this constraint was usedin [1] To make sure that each assetrsquos proportion is withinpredefined lower and upper bounds 120576 and 120575 respectively weused 119894119891 119909

119894119895gt 120575119894119895

then 119909119894119895

= 120575119894 119895 and 119894119891 119909119894119895

lt 120576119894119895

then119909119894119895= 120576119894119895

We did not apply 119888-value based approach for addingand removing assets from the portfolio as in [1] Accordingto our experiments using 119888-value does not improve FAperformance It only increases computational complexity

In modified FA the fitness is employed to model theattractiveness of the fireflies Attractiveness is directly propor-tional to the fitness

After generating 119878119873 number of agents fitness value is cal-culated for each firefly in the population Fitness (brightness)is calculated as in the original FA implementation (26)

8 The Scientific World Journal

while 119870lowast119894lt 119870 do

select random asset 119895 such that 119895 notin 119876119911119894119895= 1 119876 = 119876 cup [119895] 119870

lowast

119894= 119870lowast

119894+ 1

end whilewhile 119870lowast

119894gt 119870 do

select random asset 119895 such that 119895 isin 119876119911119894119895= 1 119876 = 119876 minus [119895] 119870

lowast

119894= 119870lowast

119894minus 1

end whilewhile true do120579 = sum

119895isin119876

119909119894119895 119909119894119895=

119909119894119895

120595 120578 = sum

119895isin119876

max (0 119909119894119895minus 120575119894) 120601 = sum

119895isin119876

max (0 120578119895minus 119909119894119895)

if 120578 = 0 and 120601 = 0 thenexit algorithm

end iffor 119895 = 1 to119873 do

if 119911119894119895= 1 then

if 119909119894119895gt 120575119895then

119909119894119895= 120575119895

end ifif 119909119894119895lt 120576119895then

119909119894119895= 120576119895

end ifend if

end forend while

Algorithm 2 Arrangement algorithm

In the initialization phase for each firefly in the popu-lation constraint violation CV is being calculated CV is ameasure of how much the agents violate constraints in theproblem definition

CV119894= sum

119892119895(119909119894)gt0

119892119895(119909119894) +

119898

sum

119895=119902+1

ℎ119895(119909119894) (36)

CV calculation is necessary because it is later used forperforming selection based on Debrsquos method [57 58]

42 Firefly Movement The movement of a firefly 119894 towardsthe firefly that has a higher fitness 119895 is calculated as in theoriginal FA implementation [56]

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (37)

where 119909119894(119905 + 1) is new solution generated in iteration (119905 + 1)

1205730is attractiveness at 119903 = 0 120572 is randomization parameter

120581 is random number drawn from uniform or Gaussiandistribution and 119903

119894119895is distance between fireflies 119894 and 119895

Also when moving a firefly new decision variables arecalculated

119911119905+1

119894119896= round( 1

1 + 119890minus119911119905

119894119896+120601119894119895(119911

119905

119894119896minus119911119905

119895119896)minus 006) (38)

where 119911119905+1119894119896

is decision variable for the 119896th asset of the newsolution 119911

119894119896is a decision variable of the 119896th parameter of the

old solution and 119911119895119896

is decision variable of 119896th parameter ofthe brighter firefly 119895

It should be noticed that the decision variables in theemployed bee phase are generated differently than in theinitialization phase equation (35)

After the new 119894th solution is generated in exploitationprocess using (37) and (38) the winner between new 119909

119894(119905 + 1)

and old 119909119894(119905) solution is retained using the selection process

based on Debrsquos rules

43 Exploration As mentioned before we noticed insuffi-cient exploration power in the original FA implementationparticularly in early iterations of algorithmrsquos execution Inthis phase of algorithmrsquos execution exploitation-explorationbalance is not well established for this type of problemsThis balance was also discussed in [14] Thus we adoptedmechanism similar to scout bee with 119897119894119898119894119905 parameter fromthe ABC metaheuristic

We introduced parameter abandonment threshold (119860119879)that represents the allowed predetermined number of unsuc-cessful tries to improve particular solution When a potentialsolution (firefly) is stagnating (not being improved) for 119860119879iterations it is replaced by a new randomone using (33) (34)and (35) Hence fireflies that exploited exhausted solutionsare transformed into scouts that perform the explorationprocess The value of 119860119879 is empirically determined and willbe shown in the experimental section

Also during late iterations with the assumption thatthe right part of the search space has been found the

The Scientific World Journal 9

Generate initial population of fireflies 119909119894and 119911

119894(119894 = 1 2 3 119878119873) by using (33) and (35)

Apply arrangement algorithmLight intensity 119868

119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INCalculate fitness and CV for all fireflies using (26) and (36)Set initial values for 120572Set 119905 value to 0while 119905 lt IN do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119894lt 119868119895then

Move firefly 119894 towards firefly 119895 in 119889 dimension using (37) and (38)Attractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace worse with better solutionusing Debrsquos method and update light intensityif solution 119894 is not improved and 119905

119894lt 119864119861119875 then

119880119868119862119894increment by 1

else119880119868119862119894set to 0

end ifend if

end forend forif 119905 lt 119864119861119875 then

replace all agents whose UIC gt 119860119879 with random agents using (33)end ifApply arrangement algorithmRank all fireflies and find the current bestRecalculate values for 120572 using (39)

end while

Algorithm 3 Modified firefly algorithm

intensive exploration is not needed anymore In that case theexploration is not being triggered For this purpose we intro-duce new control parameter exploration breakpoint (119864119861119875)which controls whether the exploration will be triggeredThediscussion of this parameter is also given in experimentalsection

Also we should note that the parameter 120572 for FA searchprocess is being gradually decreased from its initial valueaccording to

120572 (119905) = (1 minus (1 minus ((10minus4

9)

1119868119873

))) lowast 120572 (119905 minus 1) (39)

where 119905 is the current iteration and 119868119873 is the maximum num-ber of iterations

Pseudocode of mFA is given as Algorithm 3 Someimplementationrsquos details are omitted for the sake of simplicity

In the pseudocode 119878119873 is total number of fireflies in thepopulation 119868119873 is total number of algorithmrsquos iterations and119905 is the current iteration As explained 119860119879 is the maximumnumber of unsuccessful attempts to improve particular solu-tion after which it will be considered exhausted and replacedby a new random solution

5 Algorithm Settings andExperimental Results

In this section we first present parameter settings which wereadjusted for testing purposes of our proposed mFA Thenwe show experimental results discussion and comparativeanalysis with other state-of-the-art algorithms

51 Parameter Settings To test the performance and robust-ness of our modified FA we set algorithm parameters similarto [1] Number of firefly agents in the population 119878119873 iscalculated by employing the following expression

119878119873 = 20radic119873 (40)

where119873 is the number of potential assets in portfolioThe value of maximum number of iterations 119868119873 in one

algorithmrsquos run is set according to

119868119873 =1000 lowast 119873

119878119873 (41)

As mentioned in Section 4 to improve the explorationpower of the original FA we introduced parameter 119860119879 withcorresponding counters 119880119868119862

119894(119894 = 1 2 119878119873) that count

howmany times a particular firefly agent unsuccessfully tried

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 2: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

2 The Scientific World Journal

In (2) 119897119887119894and 119906119887

119894are lower and upper bounds for the 119894th

problem component respectivelyThe nonlinear constrained optimization problem in the

continuous space can be formulated in the same way as in (1)but in this case 119909 isin 119865 sube 119878 where 119878 is 119863-dimensional hyper-rectangular space as defined in (2) while 119865 sube 119878 representsthe feasible region defined by the set of119898 linear or nonlinearconstraints

119892119895(119909) le 0 for 119895 isin [1 119902]

ℎ119895(119909) = 0 for 119895 isin [119902 + 1119898]

(3)

where 119902 is the number of inequality constraints and119898 minus 119902 isthe number of equality constraints

Fundamental versions of algorithms and metaheuristicsfor constrained numerical optimization problems do notincludemethods for dealing with constraintsTherefore con-straint handling techniques are usually added to these algo-rithms to improve and redirect the search process towards thefeasible region of the search space Equality constraints makeoptimization even harder by shrinking the feasible searchspace which becomes very small compared to the entiresearch space To tackle such problem equality constraints arereplaced with the inequality constraints [3]

|ℎ (119909)| minus 120592 le 0 (4)

where 120592 gt 0 is some small violation tolerance usuallydynamically adjusted

Since hard optimization problems are unsolvable in a rea-sonable amount of time the exact methods which trace opti-mal solution cannot be applied For such problems it is moreappropriate to employ nondeterministic metaheuristics

Metaheuristics are iterative population based andstochastic approaches that do not guarantee finding theoptimal solution but they can obtain satisfying solutionwithin acceptable time [4] In metaheuristics imple-mentations the processes of exploitation and explorationconduct the search process Exploitation directs searcharound the current best solutions while the explorationrandomly discovers new regions of a search domain

During the last few decades wewitnessed development ofnature-inspired sophisticated intelligent systems that can beused as optimization tools for many complex and hard prob-lems Metaheuristics that incorporate and simulate naturalprinciples and rules are called nature-inspired metaheuris-tics

Nature-inspired metaheuristics [5] can roughly bedivided into two categories evolutionary algorithms (EA)and swarm intelligence The most prominent representativeof EA is genetic algorithms (GA) GA can obtain good resultsfor many kinds of optimization problems [6]

Social behavior of swarms of ants bees worms birdsand fish was an inspiring source for the emerge of swarmintelligence [7] Although swarm system consists of rela-tively unsophisticated individuals they exhibit coordinatedbehavior that directs swarm towards the desired goal with nocentral component that manages the system as a whole

Ant colony optimization (ACO) was founded on antrsquosability to deploy a substance called pheromone for marking

the discovered path between the food source and antrsquos nestsIt is one of the oldest members of swarm intelligence family[8] but it is constantly being improved and applied to differentproblems [9ndash11]

Artificial bee colony (ABC) algorithmmimics the behav-ior of honey bee swarm In this paradigm three types of arti-ficial bees perform search Each type of bees has its particularrole in the search process ABC was originally proposed byKaraboga for problems of continuous optimization [12] Thisalgorithm proves to be robust and capable of solving highdimensionality problems [13ndash15]

Cuckoo search (CS) is an iterative approach that modelssearch process by employing Levy flights (series of straightflight paths with sudden 90 degrees turn) It was firstproposed by Yang and Deb [16] and proved to be a robustoptimization technique [17] obtaining satisfying results inreal-life optimizations like image thresholding [18]

Also swarm intelligence metaheuristics whichmimic thehuman search process were developed Seeker optimizationalgorithm (SOA) is established on human memory reason-ing past experience and social interactions It has beenproven that the SOA is a robust technique for solving globalnumerical and real-life optimization problems [19] and iscontinuously being improved [20]

As a result of the literature survey it can be concluded thatfor portfolio optimization problem there are some geneticalgorithm (GA) implementations However there are onlyfew swarm intelligence algorithms adapted for this problemThere are papers which refer to solving portfolio prob-lem with nondominating sorting genetic algorithm (NSGA)which was first proposed by Srinivas and Deb [21] Newerversion NSGA-II improves the convergence and the spreadof solutions in the population [22] Lin et al presentedNSGA-II based algorithm with integer encoding for solvingMV portfolio model with minimum transaction lots (MTL)fixed transaction costs (TC) and linear constraints on capitalinvestmentsThe optimization of MV portfolio problem withcardinality andholdingweights constraints byGA is shown in[23] Soleimani et al [24] presented GA with RAR crossoveroperator for solving MV portfolio problem where cardinalityconstraints MTL and constraints on sector capitalization aretaken into account

As mentioned only few swarm intelligence metaheuris-tics exist for portfolio optimization Deng and Lin presentedant colony optimization (ACO) for solving the cardinalityconstraints Markowitz MV portfolio model [25] Haqiqi andKazemi [26] employed the same algorithm to MV portfoliomodel We emphasize on one ACO implementation basedon the average entropy for real estate portfolio optimization[27] This is one of the rare papers that incorporates entropyin portfolio model Cura investigated PSO approach tocardinality constrained MV portfolio optimization [1] Thetest data set contains weekly prices from March 1992 toSeptember 1997 from the following five indexes Hang Sengin Hong Kong DAX 100 in Germany FTSE 100 in UK SampP100 in USA and Nikkei in Japan The results of this studyare compared with those from genetic algorithm simulatedannealing and tabu search approaches and showed thatPSO has potential in portfolio optimization Zhu et al [28]

The Scientific World Journal 3

presented PSO algorithm for nonlinear constrained portfoliooptimization with multiobjective functions The model istested on various restricted and unrestricted risky investmentportfolios and a comparative study with GA is showed PSOdemonstrated high computational efficiency in constructingoptimal risky portfolios and can be compared with otherstate-of-the-art algorithms

ABC algorithm formixed quadratic and integer program-ming problem of cardinality constrainedMVportfoliomodelwas presented by Wang et al [29] Some modifications ofclassical ABC algorithm for constrained optimization prob-lems were adopted The approach was tested on a standardbenchmark data set and proved to be a robust portfoliooptimizer

One of the first implementations for portfolio optimiza-tion problem by the firefly algorithms was developed byTuba et al [30 31] Framework for solving this problemwas devised Metaheuristic was tested on standard five-assetdata set FA proved to be robust and effective technique forportfolio problem Among other metaheuristics for portfolioproblem one approach based on neural networks (NN)should be distinguished [32]

In this paper we propose a modified firefly algorithm(FA) for cardinality constrained mean-variance (CCMV)portfolio optimization with entropy constraint FA was firstintroduced by Yang for unconstrained optimization [33]Later it was adapted [34] for solving various numerical andpractical optimization problems [35ndash37]

We modified pure FA algorithm to adjust it for con-strained problems and to improve its performance Weintensified exploration during early phase and eliminated itduring late iterationswhen the proper part of the search spacehas been reached Details will be given in Section 4

The implementation of metaheuristics for the CCMVportfolio model with entropy constraint was not found in theliterature survey Thus we conducted three experiments

(i) First we compared original FA with our modifiedmFA applied to portfolio optimization problem Wewanted to see what is the real improvement of ourapproach

(ii) Then we compared results of our algorithm for theCCMV portfolio model with and without entropyconstraint In this test we analyzed the influence ofentropy constraint to portfolio diversification

(iii) Finally in the third test we made comparative anal-ysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposedalgorithm to Curarsquos PSO [1] and also to GA TS andSA indirectly from [23]

The rest of the paper is organized as follows Section 2presents mathematical formulations of variety portfolio opti-mization models The presentation of the original FA isgiven in Section 3 Our proposed modified FA approachfor the CCMV portfolio problem with entropy constraintis discussed in Section 4 Section 5 first shows algorithmparameter settings that are used in experiments Then wepresent three experiments which we conducted along with

the comparative analyses with other metaheuristics FinallySection 6 gives conclusions and recommendations for futureresearch

2 Portfolio Optimization Problem Definitions

Portfolio optimization as one of the most important issuesin modern financial management tackles the problem ofdistribution of financial resources across a number of assetsto maximize return and control the risk

When making financial decisions investors follow theprinciple of diversification by investing their capital intodifferent types of assets By investment in portfolios ratherthan in single assets the risk is mitigated by diversificationof the investments without negative impact on expectedreturns

The essential form of portfolio optimization is formulatedas bicriterion optimization problem where the reward whichis measured by the mean of return should be maximizedwhile the risk measured by the variance of return should beminimized [38] This problem deals with the selection of theportfolio of securities that minimizes the risk subject to theconstraints while guaranteeing a given level of returns [39]

By literature researchmanymethods for solving portfolioproblem can be found Markowitzrsquos standard mean-variance(MV) model choses one important objective function thatis subject to optimization while the remaining objectivefunctions are being threated as constraints [40]The key pointin the MV formulation is to employ the expected returnsof a portfolio as the investment return and the variance ofreturns of the portfolio as the investment risk [41] Its basicassumptions are that the investors are rational with eithermultivariate normally distributed asset returns or in the caseof arbitrary returns a quadratic utility function [42] Thisapproach is widely adapted and plays an important role in themodern portfolio theory

Markowitzrsquos MV model considers the selection of riskyportfolio as objective function and the mean return ofan asset as one of the constraints [43] This model canmathematically be defined as

min1205902119877119901= 1205902

119901=

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895) (5)

subject to

119877119901= 119864 (119877

119901) =

119873

sum

119894=1

120596119894119877119894ge 119877 (6)

119873

sum

119894=1

120596119894= 1 120596

119894ge 0 forall119894 isin 1 2 119873 (7)

where 119873 is the total number of available assets 119877119894is the

mean return on asset 119894 and Cov(119877119894119877119895) is covariance of

returns of assets 119894 and 119895 respectively Constraint defined in(7) guarantees that the whole disposable capital is investedWeight variable 120596

119894has a role of control parameter that

4 The Scientific World Journal

determines the proportion of the capital that is placed in asset119894 Weight variable has a real value in the range [0 1]

In the presented MV formulation the objective is tominimize the portfolio risk 1205902

119901 for a given value of portfolio

expected return 119877119901

Efficient frontier model which is often called single-objective function model constructs only one evaluationfunction that models portfolio optimization problem In thismodel the desired mean return 119877 is varying for the purposeof finding different objective function values Risk aversionindicator 120582 isin [0 1] controls this process [28]

Efficient frontier definition is

min120582[

[

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895)]

]

minus (1 minus 120582) [

119873

sum

119894=1

120596119894119877119894] (8)

subject to

119873

sum

119894=1

120596119894= 1

120596119894ge 0 forall119894 isin 1 2 119873

(9)

In the presented formulation 120582 is critical parameter Itcontrols the relative importance of themean return to the riskfor the investor When the value of 120582 is set to 0 mean returnof portfolio is being maximized without considering the riskAlternatively when 120582 has a value of 1 risk of the portfoliois minimized regardless of the mean return Thus when thevalue of 120582 increases the relative importance of the risk to themean return for the investor rises and vice versa

Each 120582 value generates different objective function valuewhich is composed of themean return and the variance (risk)By tracing the mean return and variance intersections fordifferent 120582 a continuous curve can be drawn which is calledan efficient frontier in the Markowitzrsquos modern portfoliotheory

Another model worth mentioning is Sharpe ratio (SR)which uses the information from mean and variance of anasset [44] In this model the measure of mean return isadjusted with the risk and can be described by

SR =

119877119901minus 119877119891

StdDev (119901) (10)

where 119901 denotes portfolio 119877119901is the mean return of the

portfolio 119901 and 119877119891is a test available rate of return on a risk-

free asset StdDev(119901) is a measure of the risk in portfolio(standard deviation of119877

119901) By adjusting the portfolio weights

119908119894 portfoliorsquos Sharpe ratio can be maximizedHowever all three models the MV efficient frontier and

Sharpe ratio were constructed under strict and simplifiedassumptions that do not consider real-world parametersand limitations and as such are not always suitable for realapplications For these reason extendedMVmodel is devised

Extended MV formulation takes into account additionalconstraints such as budget cardinality transaction lots andsector capitalization These constraints model real-world

legal and economic environment where the financial invest-ments are being done [45] Budget constraint controls theminimum andmaximum total budget proportion that can beinvested in particular asset Cardinality constraint controlswhether a particular asset will be included in the portfolioThe minimum transaction lots constraint ensures that eachsecurity can only be purchased in a certain number ofunits Sector capitalization constraint directs the investmentstowards the assets that belong to the sectors where highervalue of market capitalization can be accomplished Thereview of this constraint is given in [24]

When all the above-mentioned constraints are beingapplied to the basic portfolio problem formulation theproblem becomes a combinatorial optimization problemwhose feasible region is not continuous Thus the extendedMV model belongs to the group of quadratic mixed-integerprogramming models Its formulation is

min1205902119877119901= 1205902

119901=

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895) (11)

where

120596119894=

119909119894119888119894119911119894

sum119873

119895=1119909119895119888119895119911119895

119894 = 1 119873 (12)

119873

sum

119894=1

119911119894= 119872 le 119873 119872119873 isin N

119911119894isin 0 1 119894 = 1 119873

(13)

subject to

119873

sum

119894=1

119909119894119888119894119911119894119877119894ge 119861119877 (14)

119873

sum

119894=1

119909119894119888119894119911119894le 119861 (15)

0 le 119861low119894 le 119909119894119888119894le 119861up

119894le 119861 119894 = 1 119873 (16)

sum

119894119904

119882119894119904ge sum

1198941199041015840

1198821198941199041015840

forall1199101199041199101199041015840 = 0 119894

119904 1198941199041015840 isin 1 2 119873

119904 1199041015840isin 1 2 119878 119904 lt 119904

1015840

(17)

where

119910119904=

1 if sum

119894119904

119911119894gt 0

0 if sum

119894119904

119911119894= 0

(18)

In (11)ndash(18) 119872 represents the number of selected assetsamong possible119873 assets 119861 is the total disposable budget and119861low119894 and119861up

119894are lower andupper limits of the budget that can

be invested in asset 119894 respectively 119878 represents the number ofsectors in the market where the investment is being placed

The Scientific World Journal 5

119888119894is the size of transaction lot for asset 119894 and 119909

119894denotes the

number of such lots (of asset 119894) that is purchasedDecision variable 119911

119894is used to apply cardinality con-

straint 119911119894is equal to 1 if an asset 119894 is present in the

portfolio otherwise its value is 0 Equation (17)models sectorcapitalization constraint Despite the fact that a certain sectorhas high capitalization security from this sector that haslow return andor high risk must be excluded from the finalportfoliorsquos structure To make such exclusion variable 119910

119904is

defined and it has a value of 1 if the corresponding sector hasat least one selected asset and 0 otherwise In (17) 119894

119904is a set

of assets which can be found in sector 119904 Sectors are sorted indescending order by their capitalization value

Entropy was introduced by Jaynes [46] for wide appli-cation in optimization crystallography in the beginningnetworks [47] and so forth but it also becomes an importanttool in portfolio optimization and asset pricing Entropy iswidely recognized measure of portfolio diversification [2]In multiobjective portfolio optimization models the entropycan be used as an objective function Here we will addressentropy as diversity constraint in portfolio models becausewe employed it in portfolio model that is used for testing ofour modified FA approach

The entropy constraint defines lower bound119871119864of entropy

119864(119875) of portfolio 119875 according to the following equation [48]

119864 (119875) = minus

119873

sum

119894=1

119909119894ln119909119894ge 119871119864 (19)

where119873 is the number of assets in portfolio119875 and119909119894is weight

variable of the security 119894In one extreme when the weigh variable of only one

asset in portfolio 119875 is 1 and for the rest of the assets is 0119864(119875) reaches its minimum at minus1 lowast ln 1 = 0 [49] This isthe least diverse scenario Contrarily in the most diversecondition that forforall119894 119909

119894= 1119873119864(119875) obtains itsmaximum in

minus119873(1119873 ln 1119873) = ln119873 According to this 119871119864is in the range

[0 ln119873] Greater value of entropy denotes better portfoliorsquosdiversity and 119871

119864is used to make sure that the diversity of 119875

is not too lowEntropy constraint equation (19) can be transformed into

the upper-bound constraint [49]

119865 (119875) = 119890minus119864(119875)

= 119890sum119873

119894=1119909119894 ln119909119894 le 119880

119864 (20)

As shown previously 0 le 119864(119875) le ln119873 which implicatesthat 0 ge minus119864(119875) ge minus ln119873 Then the condition 119890

0= 1 ge

119890minus119864(119875)

= 119865(119875) ge 119890minus ln119873

= 1119873 holds Thus the range ofupper-bound constraint 119880

119864is [1119873 1]

In this paper for testing purposes we used model whichemploys some of the constraints that can be found in theextended MV formulation In the experimental study weimplemented modified FA for optimizing cardinality con-strained mean-variance model (CCMV) which is derivedfrom the standard Markowitzrsquos and the efficiency frontiermodels

We were inspired by Ustarsquos and Kantarrsquos multiobjec-tive approach based on a mean-variance-skewness-entropyportfolio selection model (MVSEM) that employs Shannonrsquos

entropy measure to the mean-variance-skewness portfoliomodel (MVSM) to generate a well-diversified portfolio [5051] Thus we added entropy measure to the CCMV portfolioformulation to generate well-diversified portfolio

Formulation of theCCMVmodel with entropy constraintis

min120582[

[

119873

sum

119894=1

119873

sum

119895=1

119909119894119909119895120590119894119895]

]

minus (1 minus 120582) [

119873

sum

119894=1

119909119894120583119894] (21)

subject to

119873

sum

119894=1

119909119894= 1 (22)

119873

sum

119894=1

119911119894= 119870 (23)

120576119894119911119894le 119909119894le 120575119894119911119894 119911 isin 0 1 119894 = 1 2 3 119873 (24)

minus

119873

sum

119894=1

119911119894119909119894ln119909119894ge 119871119864 (25)

As already mentioned in this section119873 is the number ofpotential securities that will be included in portfolio 120582 is riskaversion parameter 119909

119894and 119909

119895are weight variables of assets 119894

and 119895 respectively 120575119894119895is their covariance and 120583

119894is 119894th assetrsquos

return119870 is the desired number of assets that will be includedin the portfolio Decision variable 119911

119894controls whether the

asset 119894 will be included in portfolio If its value is 1 asset 119894is included and if the value is 0 asset 119894 is excluded from theportfolio 120576 and 120575 are lower and upper bounds of the asset thatis included in portfolio and they make sure that the assetrsquosproportion in the portfolio is within the predefined range

We applied entropy constraint equation (25) with lowerbounds as in (19) to ensure that the diversity of portfolio isnot too low 119871

119864is lower bound of the entropy in the range

[0 ln119870] In (25) 119911119894ensures that only assets that are included

in portfolio are taken into accountFrom the CCMV formulation with entropy constraint it

can be seen that this problem belongs to the group of mixedquadratic and integer programming problems It employsboth real and integer variables with equity and inequityconstraints

3 Presentation of the Original FA

Firefly algorithm (FA) was originally proposed by Yang in2008 [33] with later improvements [52] It was applied tocontinuous [53] discrete [54] and mixed [55] optimizationproblems The emergence of this metaheuristic was inspiredby the social and flashing behavior of fireflies

Fireflies inhabit moderate and tropical climate environ-ments all around the word Their flashing behavior has manydifferent roles Synchronized flashing by males is unique inthe animal world and involves a capacity for visually coordi-nated rhythmically coincident and interindividual behaviorAlso flashing is used to alleviate communication for mating

6 The Scientific World Journal

and to frighten the predatorsThese flashing properties can beincorporated into swarm intelligence metaheuristic in such away that they are associatedwith the objective functionwhichis subject to optimization

With respect to the facts that the real firefly system issophisticated and that the metaheuristics are approximationsof real systems three idealized rules are applied with the goalto enable algorithmrsquos implementation [33] (1) all fireflies areunisex so the attractions between fireflies do not depend ontheir sex (2) attractiveness of a firefly is directly proportionalto their brightness and the less brighter firefly will movetowards the brighter one Brightness increases as the distancebetween fireflies decreases (3) the brightness of a firefly isdetermined by the value of objective function For minimiza-tion problems brightness increases as the objective functionvalue decreases There are also other forms of brightnesswhich can be defined similar to fitness function in geneticalgorithms (GA) [6]

In the implementation of FA one of the most importantissues that should be considered is the formulation of attrac-tiveness For the sake of simplicity a good approximationis that the attractiveness of a firefly is determined by itsbrightness which depends on the encoded objective function

In the case of maximization problems the brightness ofa firefly at a particular location 119909 can be chosen as 119868(119909) sim

119891(119909) where 119868(119909) is the attractiveness and 119891(119909) is the value ofobjective function at this location Otherwise if the goal is tominimize function the following expression can be used

119868 (119909) =

1

119891 (119909) if 119891 (119909) gt 0

1 +1003816100381610038161003816119891 (119909)

1003816100381610038161003816 otherwise(26)

The variations of light intensity and attractiveness aremonotonically decreasing functions because as the lightintensity and the attractiveness decrease the distance fromthe source increases and vice versa This can be formulatedas [56]

119868 (119903) =1198680

1 + 1205741199032 (27)

where 119868(119903) is the light intensity 119903 is distance and 1198680is the light

intensity at the source Besides that the air also absorbs partof the light and the light becomes weaker Air absorption ismodeled by the light absorption coefficient 120574

In most FA implementations that can be found in theliterature survey the combined effect of both the inversesquare law and absorption can be approximated using thefollowing Gaussian form

119868 (119903) = 1198680119890minus1205741199032

(28)

Attractiveness 120573 of a firefly is relative because it dependson the distance between the firefly and the beholder Thusit varies with the distance 119903

119894119895between fireflies 119894 and 119895 The

attractiveness is direct proportional to fireflies light intensity(brightness) as shown in the following

120573 (119903) = 1205730119890minus1205741199032

(29)

where 1205730is the attractiveness at 119903 = 0 Equation (29) deter-

mines a characteristic distance Γ = 1radic120574 over which theattractiveness changes significantly from 120573

0to 1205730119890minus1

But in practical applications the above expression isusually replaced with

120573 (119903) =1205730

1 + 1205741199032 (30)

Main reason for this replacement is that the calculation ofexponential function in (29) demands much more computa-tional power than simple division in (30)

The movement of a firefly 119894 (its new position in iteration119905 + 1) towards the brighter and thus more attractive firefly 119895is calculated using

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (31)

where 1205730is attractiveness at 119903 = 0 120572 is randomization

parameter 120581 is random number drawn from uniform orGaussian distribution and 119903

119894119895is distance between fireflies 119894

and 119895 The positions of fireflies are updated sequentially bycomparing and updating each pair of them at every iteration

The distance between fireflies 119894 and 119895 is calculated usingCartesian distance form [56]

119903119894119895=10038171003817100381710038171003817119909119894minus 119909119895

10038171003817100381710038171003817= radic

119863

sum

119896=1

(119909119894119896minus 119909119895119896) (32)

where 119863 is the number of problem parameters For mostproblems 120573

0= 0 and 120572 isin [0 1] are adequate settings

The parameter 120574 has crucial impact on the convergencespeed of the algorithm This parameter shows the variationof attractiveness and in theory it has a value of [0 +infin) butin practice it is determined by the characteristic distance Γ ofthe system that is being optimized In most implementations120574 parameter varies between 001 and 100

There are two special cases of the FA and they are bothassociated with the value of 120574 as follows [33]

(i) if 120574 = 0 then 120573 = 1205730 That means that the air around

firefly is completely clear In this case 120573 is alwaysthe largest it could possibly be and fireflies advancetowards other fireflies with the largest possible stepsThe exploration-exploitation is out of balance becausethe exploitation is maximal while the exploration isminimal

(ii) if 120574 = infin then 120573 = 0 In this case there is a thick fogaround fireflies and they could not see each otherThemovement is performed in a random steps and explo-ration is more intensive with practically no exploi-tation at all

The pseudocode for the original FA is given as Algo-rithm 1

In the presented pseudocode 119878119873 is total number offireflies in the population 119868119873 is total number of algorithmrsquositerations and 119905 is the current iteration

The Scientific World Journal 7

Generate initial population of fireflies 119909119894 (119894 = 1 2 3 119878119873)

Light intensity 119868119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INwhile 119905 lt 119868119873 do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119895lt 119868119894then

Move firefly 119895 towards firefly 119894 in 119889 dimensionAttractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace the worst withbetter solution and update light intensity

end ifend for

end forRank all fireflies and find the current best

end while

Algorithm 1 Original firefly algorithm

4 Proposed mFA for the CCMV PortfolioProblem with Entropy Constraint

As mentioned in Section 1 we propose a modified fireflyalgorithm for cardinality constrained mean-variance portfo-lio optimization with entropy constraint

By analyzing FA we noticed that as most other swarmintelligence algorithms the pure version of the algorithmdeveloped for unconstrained problems exhibits some defi-ciencies when applied to constrained problems In the earlycycles of algorithmrsquos execution established balance betweenexploitation and exploration is not completely appropriatefor this class of problems During early phase explorationis not intensive enough However during late cycles whenFA was able to discover the right part of the search spacethe exploration is no longer needed To control whetherthe exploration will be triggered or not we introducedexploration breakpoint 119864119861119875 control parameter

In this section we show implementation details of ourmodified FA algorithm which we named mFA

41 Initialization Phase and Fitness Calculation At the initial-ization step FA generates random population of 119878119873 fireflies(artificial agents) using

119909119894119895= 119897119887119895+ rand (0 1) lowast (119906119887

119895minus 119897119887119895) (33)

where 119909119894119895

is the weight of the 119895th portfoliorsquos asset of the 119894thagent rand(0 1) is random number uniformly distributedbetween 0 and 1 and 119906119887

119895and 119897119887

119895are upper and lower weight

bounds of the 119895th asset respectivelyIf the initially generated value for the 119895th parameter of

the 119894th firefly does not fit in the scope [119897119887119895 119906119887119895] it is being

modified using the following expression

if (119909119894119895) gt 119906119887

119895 then 119909

119894119895= 119906119887119895

if (119909119894119895) lt 119897119887119895 then 119909

119894119895= 119897119887119895

(34)

Moreover in the initialization phase decision variables119911119894119895(119894 = 1 119878119873 119895 = 1 119873) are also initialized for

each firefly agent 119894 119873 is the number of potential assets inportfolio According to this each firefly is modeled using2lowast119873 dimensions 119911

119894is a binary vector with values 1 when an

asset is included in portfolio and 0 when it is excluded fromit

Decision variables are generated randomly by applying

119911119894119895=

1 if 120601 lt 05

0 if 120601 ge 05(35)

where 120601 is random real number between 0 and 1To guarantee the feasibility of solutions we used similar

arrangement algorithm as proposed in [1] The arrangementalgorithm is applied first time in the initialization phase

In the arrangement algorithm 119894 is the current solutionthat consists of 119876 the distinct set of 119870lowast

119894assets in the 119894th

solution 119911119894119895

is the decision variable of asset 119895 and 119909119894119895

isthe weight proportion for asset 119895 Arrangement algorithmpseudocode is shown as Algorithm 2

For the constraint sum119873119894=1

119909119894= 1 we set 120595 = sum

119895isin119876119909119894119895

and put 119909119894119895

= 119909119894119895120595 for all assets that satisfy 119895 isin 119876

The same approach for satisfying this constraint was usedin [1] To make sure that each assetrsquos proportion is withinpredefined lower and upper bounds 120576 and 120575 respectively weused 119894119891 119909

119894119895gt 120575119894119895

then 119909119894119895

= 120575119894 119895 and 119894119891 119909119894119895

lt 120576119894119895

then119909119894119895= 120576119894119895

We did not apply 119888-value based approach for addingand removing assets from the portfolio as in [1] Accordingto our experiments using 119888-value does not improve FAperformance It only increases computational complexity

In modified FA the fitness is employed to model theattractiveness of the fireflies Attractiveness is directly propor-tional to the fitness

After generating 119878119873 number of agents fitness value is cal-culated for each firefly in the population Fitness (brightness)is calculated as in the original FA implementation (26)

8 The Scientific World Journal

while 119870lowast119894lt 119870 do

select random asset 119895 such that 119895 notin 119876119911119894119895= 1 119876 = 119876 cup [119895] 119870

lowast

119894= 119870lowast

119894+ 1

end whilewhile 119870lowast

119894gt 119870 do

select random asset 119895 such that 119895 isin 119876119911119894119895= 1 119876 = 119876 minus [119895] 119870

lowast

119894= 119870lowast

119894minus 1

end whilewhile true do120579 = sum

119895isin119876

119909119894119895 119909119894119895=

119909119894119895

120595 120578 = sum

119895isin119876

max (0 119909119894119895minus 120575119894) 120601 = sum

119895isin119876

max (0 120578119895minus 119909119894119895)

if 120578 = 0 and 120601 = 0 thenexit algorithm

end iffor 119895 = 1 to119873 do

if 119911119894119895= 1 then

if 119909119894119895gt 120575119895then

119909119894119895= 120575119895

end ifif 119909119894119895lt 120576119895then

119909119894119895= 120576119895

end ifend if

end forend while

Algorithm 2 Arrangement algorithm

In the initialization phase for each firefly in the popu-lation constraint violation CV is being calculated CV is ameasure of how much the agents violate constraints in theproblem definition

CV119894= sum

119892119895(119909119894)gt0

119892119895(119909119894) +

119898

sum

119895=119902+1

ℎ119895(119909119894) (36)

CV calculation is necessary because it is later used forperforming selection based on Debrsquos method [57 58]

42 Firefly Movement The movement of a firefly 119894 towardsthe firefly that has a higher fitness 119895 is calculated as in theoriginal FA implementation [56]

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (37)

where 119909119894(119905 + 1) is new solution generated in iteration (119905 + 1)

1205730is attractiveness at 119903 = 0 120572 is randomization parameter

120581 is random number drawn from uniform or Gaussiandistribution and 119903

119894119895is distance between fireflies 119894 and 119895

Also when moving a firefly new decision variables arecalculated

119911119905+1

119894119896= round( 1

1 + 119890minus119911119905

119894119896+120601119894119895(119911

119905

119894119896minus119911119905

119895119896)minus 006) (38)

where 119911119905+1119894119896

is decision variable for the 119896th asset of the newsolution 119911

119894119896is a decision variable of the 119896th parameter of the

old solution and 119911119895119896

is decision variable of 119896th parameter ofthe brighter firefly 119895

It should be noticed that the decision variables in theemployed bee phase are generated differently than in theinitialization phase equation (35)

After the new 119894th solution is generated in exploitationprocess using (37) and (38) the winner between new 119909

119894(119905 + 1)

and old 119909119894(119905) solution is retained using the selection process

based on Debrsquos rules

43 Exploration As mentioned before we noticed insuffi-cient exploration power in the original FA implementationparticularly in early iterations of algorithmrsquos execution Inthis phase of algorithmrsquos execution exploitation-explorationbalance is not well established for this type of problemsThis balance was also discussed in [14] Thus we adoptedmechanism similar to scout bee with 119897119894119898119894119905 parameter fromthe ABC metaheuristic

We introduced parameter abandonment threshold (119860119879)that represents the allowed predetermined number of unsuc-cessful tries to improve particular solution When a potentialsolution (firefly) is stagnating (not being improved) for 119860119879iterations it is replaced by a new randomone using (33) (34)and (35) Hence fireflies that exploited exhausted solutionsare transformed into scouts that perform the explorationprocess The value of 119860119879 is empirically determined and willbe shown in the experimental section

Also during late iterations with the assumption thatthe right part of the search space has been found the

The Scientific World Journal 9

Generate initial population of fireflies 119909119894and 119911

119894(119894 = 1 2 3 119878119873) by using (33) and (35)

Apply arrangement algorithmLight intensity 119868

119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INCalculate fitness and CV for all fireflies using (26) and (36)Set initial values for 120572Set 119905 value to 0while 119905 lt IN do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119894lt 119868119895then

Move firefly 119894 towards firefly 119895 in 119889 dimension using (37) and (38)Attractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace worse with better solutionusing Debrsquos method and update light intensityif solution 119894 is not improved and 119905

119894lt 119864119861119875 then

119880119868119862119894increment by 1

else119880119868119862119894set to 0

end ifend if

end forend forif 119905 lt 119864119861119875 then

replace all agents whose UIC gt 119860119879 with random agents using (33)end ifApply arrangement algorithmRank all fireflies and find the current bestRecalculate values for 120572 using (39)

end while

Algorithm 3 Modified firefly algorithm

intensive exploration is not needed anymore In that case theexploration is not being triggered For this purpose we intro-duce new control parameter exploration breakpoint (119864119861119875)which controls whether the exploration will be triggeredThediscussion of this parameter is also given in experimentalsection

Also we should note that the parameter 120572 for FA searchprocess is being gradually decreased from its initial valueaccording to

120572 (119905) = (1 minus (1 minus ((10minus4

9)

1119868119873

))) lowast 120572 (119905 minus 1) (39)

where 119905 is the current iteration and 119868119873 is the maximum num-ber of iterations

Pseudocode of mFA is given as Algorithm 3 Someimplementationrsquos details are omitted for the sake of simplicity

In the pseudocode 119878119873 is total number of fireflies in thepopulation 119868119873 is total number of algorithmrsquos iterations and119905 is the current iteration As explained 119860119879 is the maximumnumber of unsuccessful attempts to improve particular solu-tion after which it will be considered exhausted and replacedby a new random solution

5 Algorithm Settings andExperimental Results

In this section we first present parameter settings which wereadjusted for testing purposes of our proposed mFA Thenwe show experimental results discussion and comparativeanalysis with other state-of-the-art algorithms

51 Parameter Settings To test the performance and robust-ness of our modified FA we set algorithm parameters similarto [1] Number of firefly agents in the population 119878119873 iscalculated by employing the following expression

119878119873 = 20radic119873 (40)

where119873 is the number of potential assets in portfolioThe value of maximum number of iterations 119868119873 in one

algorithmrsquos run is set according to

119868119873 =1000 lowast 119873

119878119873 (41)

As mentioned in Section 4 to improve the explorationpower of the original FA we introduced parameter 119860119879 withcorresponding counters 119880119868119862

119894(119894 = 1 2 119878119873) that count

howmany times a particular firefly agent unsuccessfully tried

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 3: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

The Scientific World Journal 3

presented PSO algorithm for nonlinear constrained portfoliooptimization with multiobjective functions The model istested on various restricted and unrestricted risky investmentportfolios and a comparative study with GA is showed PSOdemonstrated high computational efficiency in constructingoptimal risky portfolios and can be compared with otherstate-of-the-art algorithms

ABC algorithm formixed quadratic and integer program-ming problem of cardinality constrainedMVportfoliomodelwas presented by Wang et al [29] Some modifications ofclassical ABC algorithm for constrained optimization prob-lems were adopted The approach was tested on a standardbenchmark data set and proved to be a robust portfoliooptimizer

One of the first implementations for portfolio optimiza-tion problem by the firefly algorithms was developed byTuba et al [30 31] Framework for solving this problemwas devised Metaheuristic was tested on standard five-assetdata set FA proved to be robust and effective technique forportfolio problem Among other metaheuristics for portfolioproblem one approach based on neural networks (NN)should be distinguished [32]

In this paper we propose a modified firefly algorithm(FA) for cardinality constrained mean-variance (CCMV)portfolio optimization with entropy constraint FA was firstintroduced by Yang for unconstrained optimization [33]Later it was adapted [34] for solving various numerical andpractical optimization problems [35ndash37]

We modified pure FA algorithm to adjust it for con-strained problems and to improve its performance Weintensified exploration during early phase and eliminated itduring late iterationswhen the proper part of the search spacehas been reached Details will be given in Section 4

The implementation of metaheuristics for the CCMVportfolio model with entropy constraint was not found in theliterature survey Thus we conducted three experiments

(i) First we compared original FA with our modifiedmFA applied to portfolio optimization problem Wewanted to see what is the real improvement of ourapproach

(ii) Then we compared results of our algorithm for theCCMV portfolio model with and without entropyconstraint In this test we analyzed the influence ofentropy constraint to portfolio diversification

(iii) Finally in the third test we made comparative anal-ysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposedalgorithm to Curarsquos PSO [1] and also to GA TS andSA indirectly from [23]

The rest of the paper is organized as follows Section 2presents mathematical formulations of variety portfolio opti-mization models The presentation of the original FA isgiven in Section 3 Our proposed modified FA approachfor the CCMV portfolio problem with entropy constraintis discussed in Section 4 Section 5 first shows algorithmparameter settings that are used in experiments Then wepresent three experiments which we conducted along with

the comparative analyses with other metaheuristics FinallySection 6 gives conclusions and recommendations for futureresearch

2 Portfolio Optimization Problem Definitions

Portfolio optimization as one of the most important issuesin modern financial management tackles the problem ofdistribution of financial resources across a number of assetsto maximize return and control the risk

When making financial decisions investors follow theprinciple of diversification by investing their capital intodifferent types of assets By investment in portfolios ratherthan in single assets the risk is mitigated by diversificationof the investments without negative impact on expectedreturns

The essential form of portfolio optimization is formulatedas bicriterion optimization problem where the reward whichis measured by the mean of return should be maximizedwhile the risk measured by the variance of return should beminimized [38] This problem deals with the selection of theportfolio of securities that minimizes the risk subject to theconstraints while guaranteeing a given level of returns [39]

By literature researchmanymethods for solving portfolioproblem can be found Markowitzrsquos standard mean-variance(MV) model choses one important objective function thatis subject to optimization while the remaining objectivefunctions are being threated as constraints [40]The key pointin the MV formulation is to employ the expected returnsof a portfolio as the investment return and the variance ofreturns of the portfolio as the investment risk [41] Its basicassumptions are that the investors are rational with eithermultivariate normally distributed asset returns or in the caseof arbitrary returns a quadratic utility function [42] Thisapproach is widely adapted and plays an important role in themodern portfolio theory

Markowitzrsquos MV model considers the selection of riskyportfolio as objective function and the mean return ofan asset as one of the constraints [43] This model canmathematically be defined as

min1205902119877119901= 1205902

119901=

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895) (5)

subject to

119877119901= 119864 (119877

119901) =

119873

sum

119894=1

120596119894119877119894ge 119877 (6)

119873

sum

119894=1

120596119894= 1 120596

119894ge 0 forall119894 isin 1 2 119873 (7)

where 119873 is the total number of available assets 119877119894is the

mean return on asset 119894 and Cov(119877119894119877119895) is covariance of

returns of assets 119894 and 119895 respectively Constraint defined in(7) guarantees that the whole disposable capital is investedWeight variable 120596

119894has a role of control parameter that

4 The Scientific World Journal

determines the proportion of the capital that is placed in asset119894 Weight variable has a real value in the range [0 1]

In the presented MV formulation the objective is tominimize the portfolio risk 1205902

119901 for a given value of portfolio

expected return 119877119901

Efficient frontier model which is often called single-objective function model constructs only one evaluationfunction that models portfolio optimization problem In thismodel the desired mean return 119877 is varying for the purposeof finding different objective function values Risk aversionindicator 120582 isin [0 1] controls this process [28]

Efficient frontier definition is

min120582[

[

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895)]

]

minus (1 minus 120582) [

119873

sum

119894=1

120596119894119877119894] (8)

subject to

119873

sum

119894=1

120596119894= 1

120596119894ge 0 forall119894 isin 1 2 119873

(9)

In the presented formulation 120582 is critical parameter Itcontrols the relative importance of themean return to the riskfor the investor When the value of 120582 is set to 0 mean returnof portfolio is being maximized without considering the riskAlternatively when 120582 has a value of 1 risk of the portfoliois minimized regardless of the mean return Thus when thevalue of 120582 increases the relative importance of the risk to themean return for the investor rises and vice versa

Each 120582 value generates different objective function valuewhich is composed of themean return and the variance (risk)By tracing the mean return and variance intersections fordifferent 120582 a continuous curve can be drawn which is calledan efficient frontier in the Markowitzrsquos modern portfoliotheory

Another model worth mentioning is Sharpe ratio (SR)which uses the information from mean and variance of anasset [44] In this model the measure of mean return isadjusted with the risk and can be described by

SR =

119877119901minus 119877119891

StdDev (119901) (10)

where 119901 denotes portfolio 119877119901is the mean return of the

portfolio 119901 and 119877119891is a test available rate of return on a risk-

free asset StdDev(119901) is a measure of the risk in portfolio(standard deviation of119877

119901) By adjusting the portfolio weights

119908119894 portfoliorsquos Sharpe ratio can be maximizedHowever all three models the MV efficient frontier and

Sharpe ratio were constructed under strict and simplifiedassumptions that do not consider real-world parametersand limitations and as such are not always suitable for realapplications For these reason extendedMVmodel is devised

Extended MV formulation takes into account additionalconstraints such as budget cardinality transaction lots andsector capitalization These constraints model real-world

legal and economic environment where the financial invest-ments are being done [45] Budget constraint controls theminimum andmaximum total budget proportion that can beinvested in particular asset Cardinality constraint controlswhether a particular asset will be included in the portfolioThe minimum transaction lots constraint ensures that eachsecurity can only be purchased in a certain number ofunits Sector capitalization constraint directs the investmentstowards the assets that belong to the sectors where highervalue of market capitalization can be accomplished Thereview of this constraint is given in [24]

When all the above-mentioned constraints are beingapplied to the basic portfolio problem formulation theproblem becomes a combinatorial optimization problemwhose feasible region is not continuous Thus the extendedMV model belongs to the group of quadratic mixed-integerprogramming models Its formulation is

min1205902119877119901= 1205902

119901=

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895) (11)

where

120596119894=

119909119894119888119894119911119894

sum119873

119895=1119909119895119888119895119911119895

119894 = 1 119873 (12)

119873

sum

119894=1

119911119894= 119872 le 119873 119872119873 isin N

119911119894isin 0 1 119894 = 1 119873

(13)

subject to

119873

sum

119894=1

119909119894119888119894119911119894119877119894ge 119861119877 (14)

119873

sum

119894=1

119909119894119888119894119911119894le 119861 (15)

0 le 119861low119894 le 119909119894119888119894le 119861up

119894le 119861 119894 = 1 119873 (16)

sum

119894119904

119882119894119904ge sum

1198941199041015840

1198821198941199041015840

forall1199101199041199101199041015840 = 0 119894

119904 1198941199041015840 isin 1 2 119873

119904 1199041015840isin 1 2 119878 119904 lt 119904

1015840

(17)

where

119910119904=

1 if sum

119894119904

119911119894gt 0

0 if sum

119894119904

119911119894= 0

(18)

In (11)ndash(18) 119872 represents the number of selected assetsamong possible119873 assets 119861 is the total disposable budget and119861low119894 and119861up

119894are lower andupper limits of the budget that can

be invested in asset 119894 respectively 119878 represents the number ofsectors in the market where the investment is being placed

The Scientific World Journal 5

119888119894is the size of transaction lot for asset 119894 and 119909

119894denotes the

number of such lots (of asset 119894) that is purchasedDecision variable 119911

119894is used to apply cardinality con-

straint 119911119894is equal to 1 if an asset 119894 is present in the

portfolio otherwise its value is 0 Equation (17)models sectorcapitalization constraint Despite the fact that a certain sectorhas high capitalization security from this sector that haslow return andor high risk must be excluded from the finalportfoliorsquos structure To make such exclusion variable 119910

119904is

defined and it has a value of 1 if the corresponding sector hasat least one selected asset and 0 otherwise In (17) 119894

119904is a set

of assets which can be found in sector 119904 Sectors are sorted indescending order by their capitalization value

Entropy was introduced by Jaynes [46] for wide appli-cation in optimization crystallography in the beginningnetworks [47] and so forth but it also becomes an importanttool in portfolio optimization and asset pricing Entropy iswidely recognized measure of portfolio diversification [2]In multiobjective portfolio optimization models the entropycan be used as an objective function Here we will addressentropy as diversity constraint in portfolio models becausewe employed it in portfolio model that is used for testing ofour modified FA approach

The entropy constraint defines lower bound119871119864of entropy

119864(119875) of portfolio 119875 according to the following equation [48]

119864 (119875) = minus

119873

sum

119894=1

119909119894ln119909119894ge 119871119864 (19)

where119873 is the number of assets in portfolio119875 and119909119894is weight

variable of the security 119894In one extreme when the weigh variable of only one

asset in portfolio 119875 is 1 and for the rest of the assets is 0119864(119875) reaches its minimum at minus1 lowast ln 1 = 0 [49] This isthe least diverse scenario Contrarily in the most diversecondition that forforall119894 119909

119894= 1119873119864(119875) obtains itsmaximum in

minus119873(1119873 ln 1119873) = ln119873 According to this 119871119864is in the range

[0 ln119873] Greater value of entropy denotes better portfoliorsquosdiversity and 119871

119864is used to make sure that the diversity of 119875

is not too lowEntropy constraint equation (19) can be transformed into

the upper-bound constraint [49]

119865 (119875) = 119890minus119864(119875)

= 119890sum119873

119894=1119909119894 ln119909119894 le 119880

119864 (20)

As shown previously 0 le 119864(119875) le ln119873 which implicatesthat 0 ge minus119864(119875) ge minus ln119873 Then the condition 119890

0= 1 ge

119890minus119864(119875)

= 119865(119875) ge 119890minus ln119873

= 1119873 holds Thus the range ofupper-bound constraint 119880

119864is [1119873 1]

In this paper for testing purposes we used model whichemploys some of the constraints that can be found in theextended MV formulation In the experimental study weimplemented modified FA for optimizing cardinality con-strained mean-variance model (CCMV) which is derivedfrom the standard Markowitzrsquos and the efficiency frontiermodels

We were inspired by Ustarsquos and Kantarrsquos multiobjec-tive approach based on a mean-variance-skewness-entropyportfolio selection model (MVSEM) that employs Shannonrsquos

entropy measure to the mean-variance-skewness portfoliomodel (MVSM) to generate a well-diversified portfolio [5051] Thus we added entropy measure to the CCMV portfolioformulation to generate well-diversified portfolio

Formulation of theCCMVmodel with entropy constraintis

min120582[

[

119873

sum

119894=1

119873

sum

119895=1

119909119894119909119895120590119894119895]

]

minus (1 minus 120582) [

119873

sum

119894=1

119909119894120583119894] (21)

subject to

119873

sum

119894=1

119909119894= 1 (22)

119873

sum

119894=1

119911119894= 119870 (23)

120576119894119911119894le 119909119894le 120575119894119911119894 119911 isin 0 1 119894 = 1 2 3 119873 (24)

minus

119873

sum

119894=1

119911119894119909119894ln119909119894ge 119871119864 (25)

As already mentioned in this section119873 is the number ofpotential securities that will be included in portfolio 120582 is riskaversion parameter 119909

119894and 119909

119895are weight variables of assets 119894

and 119895 respectively 120575119894119895is their covariance and 120583

119894is 119894th assetrsquos

return119870 is the desired number of assets that will be includedin the portfolio Decision variable 119911

119894controls whether the

asset 119894 will be included in portfolio If its value is 1 asset 119894is included and if the value is 0 asset 119894 is excluded from theportfolio 120576 and 120575 are lower and upper bounds of the asset thatis included in portfolio and they make sure that the assetrsquosproportion in the portfolio is within the predefined range

We applied entropy constraint equation (25) with lowerbounds as in (19) to ensure that the diversity of portfolio isnot too low 119871

119864is lower bound of the entropy in the range

[0 ln119870] In (25) 119911119894ensures that only assets that are included

in portfolio are taken into accountFrom the CCMV formulation with entropy constraint it

can be seen that this problem belongs to the group of mixedquadratic and integer programming problems It employsboth real and integer variables with equity and inequityconstraints

3 Presentation of the Original FA

Firefly algorithm (FA) was originally proposed by Yang in2008 [33] with later improvements [52] It was applied tocontinuous [53] discrete [54] and mixed [55] optimizationproblems The emergence of this metaheuristic was inspiredby the social and flashing behavior of fireflies

Fireflies inhabit moderate and tropical climate environ-ments all around the word Their flashing behavior has manydifferent roles Synchronized flashing by males is unique inthe animal world and involves a capacity for visually coordi-nated rhythmically coincident and interindividual behaviorAlso flashing is used to alleviate communication for mating

6 The Scientific World Journal

and to frighten the predatorsThese flashing properties can beincorporated into swarm intelligence metaheuristic in such away that they are associatedwith the objective functionwhichis subject to optimization

With respect to the facts that the real firefly system issophisticated and that the metaheuristics are approximationsof real systems three idealized rules are applied with the goalto enable algorithmrsquos implementation [33] (1) all fireflies areunisex so the attractions between fireflies do not depend ontheir sex (2) attractiveness of a firefly is directly proportionalto their brightness and the less brighter firefly will movetowards the brighter one Brightness increases as the distancebetween fireflies decreases (3) the brightness of a firefly isdetermined by the value of objective function For minimiza-tion problems brightness increases as the objective functionvalue decreases There are also other forms of brightnesswhich can be defined similar to fitness function in geneticalgorithms (GA) [6]

In the implementation of FA one of the most importantissues that should be considered is the formulation of attrac-tiveness For the sake of simplicity a good approximationis that the attractiveness of a firefly is determined by itsbrightness which depends on the encoded objective function

In the case of maximization problems the brightness ofa firefly at a particular location 119909 can be chosen as 119868(119909) sim

119891(119909) where 119868(119909) is the attractiveness and 119891(119909) is the value ofobjective function at this location Otherwise if the goal is tominimize function the following expression can be used

119868 (119909) =

1

119891 (119909) if 119891 (119909) gt 0

1 +1003816100381610038161003816119891 (119909)

1003816100381610038161003816 otherwise(26)

The variations of light intensity and attractiveness aremonotonically decreasing functions because as the lightintensity and the attractiveness decrease the distance fromthe source increases and vice versa This can be formulatedas [56]

119868 (119903) =1198680

1 + 1205741199032 (27)

where 119868(119903) is the light intensity 119903 is distance and 1198680is the light

intensity at the source Besides that the air also absorbs partof the light and the light becomes weaker Air absorption ismodeled by the light absorption coefficient 120574

In most FA implementations that can be found in theliterature survey the combined effect of both the inversesquare law and absorption can be approximated using thefollowing Gaussian form

119868 (119903) = 1198680119890minus1205741199032

(28)

Attractiveness 120573 of a firefly is relative because it dependson the distance between the firefly and the beholder Thusit varies with the distance 119903

119894119895between fireflies 119894 and 119895 The

attractiveness is direct proportional to fireflies light intensity(brightness) as shown in the following

120573 (119903) = 1205730119890minus1205741199032

(29)

where 1205730is the attractiveness at 119903 = 0 Equation (29) deter-

mines a characteristic distance Γ = 1radic120574 over which theattractiveness changes significantly from 120573

0to 1205730119890minus1

But in practical applications the above expression isusually replaced with

120573 (119903) =1205730

1 + 1205741199032 (30)

Main reason for this replacement is that the calculation ofexponential function in (29) demands much more computa-tional power than simple division in (30)

The movement of a firefly 119894 (its new position in iteration119905 + 1) towards the brighter and thus more attractive firefly 119895is calculated using

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (31)

where 1205730is attractiveness at 119903 = 0 120572 is randomization

parameter 120581 is random number drawn from uniform orGaussian distribution and 119903

119894119895is distance between fireflies 119894

and 119895 The positions of fireflies are updated sequentially bycomparing and updating each pair of them at every iteration

The distance between fireflies 119894 and 119895 is calculated usingCartesian distance form [56]

119903119894119895=10038171003817100381710038171003817119909119894minus 119909119895

10038171003817100381710038171003817= radic

119863

sum

119896=1

(119909119894119896minus 119909119895119896) (32)

where 119863 is the number of problem parameters For mostproblems 120573

0= 0 and 120572 isin [0 1] are adequate settings

The parameter 120574 has crucial impact on the convergencespeed of the algorithm This parameter shows the variationof attractiveness and in theory it has a value of [0 +infin) butin practice it is determined by the characteristic distance Γ ofthe system that is being optimized In most implementations120574 parameter varies between 001 and 100

There are two special cases of the FA and they are bothassociated with the value of 120574 as follows [33]

(i) if 120574 = 0 then 120573 = 1205730 That means that the air around

firefly is completely clear In this case 120573 is alwaysthe largest it could possibly be and fireflies advancetowards other fireflies with the largest possible stepsThe exploration-exploitation is out of balance becausethe exploitation is maximal while the exploration isminimal

(ii) if 120574 = infin then 120573 = 0 In this case there is a thick fogaround fireflies and they could not see each otherThemovement is performed in a random steps and explo-ration is more intensive with practically no exploi-tation at all

The pseudocode for the original FA is given as Algo-rithm 1

In the presented pseudocode 119878119873 is total number offireflies in the population 119868119873 is total number of algorithmrsquositerations and 119905 is the current iteration

The Scientific World Journal 7

Generate initial population of fireflies 119909119894 (119894 = 1 2 3 119878119873)

Light intensity 119868119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INwhile 119905 lt 119868119873 do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119895lt 119868119894then

Move firefly 119895 towards firefly 119894 in 119889 dimensionAttractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace the worst withbetter solution and update light intensity

end ifend for

end forRank all fireflies and find the current best

end while

Algorithm 1 Original firefly algorithm

4 Proposed mFA for the CCMV PortfolioProblem with Entropy Constraint

As mentioned in Section 1 we propose a modified fireflyalgorithm for cardinality constrained mean-variance portfo-lio optimization with entropy constraint

By analyzing FA we noticed that as most other swarmintelligence algorithms the pure version of the algorithmdeveloped for unconstrained problems exhibits some defi-ciencies when applied to constrained problems In the earlycycles of algorithmrsquos execution established balance betweenexploitation and exploration is not completely appropriatefor this class of problems During early phase explorationis not intensive enough However during late cycles whenFA was able to discover the right part of the search spacethe exploration is no longer needed To control whetherthe exploration will be triggered or not we introducedexploration breakpoint 119864119861119875 control parameter

In this section we show implementation details of ourmodified FA algorithm which we named mFA

41 Initialization Phase and Fitness Calculation At the initial-ization step FA generates random population of 119878119873 fireflies(artificial agents) using

119909119894119895= 119897119887119895+ rand (0 1) lowast (119906119887

119895minus 119897119887119895) (33)

where 119909119894119895

is the weight of the 119895th portfoliorsquos asset of the 119894thagent rand(0 1) is random number uniformly distributedbetween 0 and 1 and 119906119887

119895and 119897119887

119895are upper and lower weight

bounds of the 119895th asset respectivelyIf the initially generated value for the 119895th parameter of

the 119894th firefly does not fit in the scope [119897119887119895 119906119887119895] it is being

modified using the following expression

if (119909119894119895) gt 119906119887

119895 then 119909

119894119895= 119906119887119895

if (119909119894119895) lt 119897119887119895 then 119909

119894119895= 119897119887119895

(34)

Moreover in the initialization phase decision variables119911119894119895(119894 = 1 119878119873 119895 = 1 119873) are also initialized for

each firefly agent 119894 119873 is the number of potential assets inportfolio According to this each firefly is modeled using2lowast119873 dimensions 119911

119894is a binary vector with values 1 when an

asset is included in portfolio and 0 when it is excluded fromit

Decision variables are generated randomly by applying

119911119894119895=

1 if 120601 lt 05

0 if 120601 ge 05(35)

where 120601 is random real number between 0 and 1To guarantee the feasibility of solutions we used similar

arrangement algorithm as proposed in [1] The arrangementalgorithm is applied first time in the initialization phase

In the arrangement algorithm 119894 is the current solutionthat consists of 119876 the distinct set of 119870lowast

119894assets in the 119894th

solution 119911119894119895

is the decision variable of asset 119895 and 119909119894119895

isthe weight proportion for asset 119895 Arrangement algorithmpseudocode is shown as Algorithm 2

For the constraint sum119873119894=1

119909119894= 1 we set 120595 = sum

119895isin119876119909119894119895

and put 119909119894119895

= 119909119894119895120595 for all assets that satisfy 119895 isin 119876

The same approach for satisfying this constraint was usedin [1] To make sure that each assetrsquos proportion is withinpredefined lower and upper bounds 120576 and 120575 respectively weused 119894119891 119909

119894119895gt 120575119894119895

then 119909119894119895

= 120575119894 119895 and 119894119891 119909119894119895

lt 120576119894119895

then119909119894119895= 120576119894119895

We did not apply 119888-value based approach for addingand removing assets from the portfolio as in [1] Accordingto our experiments using 119888-value does not improve FAperformance It only increases computational complexity

In modified FA the fitness is employed to model theattractiveness of the fireflies Attractiveness is directly propor-tional to the fitness

After generating 119878119873 number of agents fitness value is cal-culated for each firefly in the population Fitness (brightness)is calculated as in the original FA implementation (26)

8 The Scientific World Journal

while 119870lowast119894lt 119870 do

select random asset 119895 such that 119895 notin 119876119911119894119895= 1 119876 = 119876 cup [119895] 119870

lowast

119894= 119870lowast

119894+ 1

end whilewhile 119870lowast

119894gt 119870 do

select random asset 119895 such that 119895 isin 119876119911119894119895= 1 119876 = 119876 minus [119895] 119870

lowast

119894= 119870lowast

119894minus 1

end whilewhile true do120579 = sum

119895isin119876

119909119894119895 119909119894119895=

119909119894119895

120595 120578 = sum

119895isin119876

max (0 119909119894119895minus 120575119894) 120601 = sum

119895isin119876

max (0 120578119895minus 119909119894119895)

if 120578 = 0 and 120601 = 0 thenexit algorithm

end iffor 119895 = 1 to119873 do

if 119911119894119895= 1 then

if 119909119894119895gt 120575119895then

119909119894119895= 120575119895

end ifif 119909119894119895lt 120576119895then

119909119894119895= 120576119895

end ifend if

end forend while

Algorithm 2 Arrangement algorithm

In the initialization phase for each firefly in the popu-lation constraint violation CV is being calculated CV is ameasure of how much the agents violate constraints in theproblem definition

CV119894= sum

119892119895(119909119894)gt0

119892119895(119909119894) +

119898

sum

119895=119902+1

ℎ119895(119909119894) (36)

CV calculation is necessary because it is later used forperforming selection based on Debrsquos method [57 58]

42 Firefly Movement The movement of a firefly 119894 towardsthe firefly that has a higher fitness 119895 is calculated as in theoriginal FA implementation [56]

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (37)

where 119909119894(119905 + 1) is new solution generated in iteration (119905 + 1)

1205730is attractiveness at 119903 = 0 120572 is randomization parameter

120581 is random number drawn from uniform or Gaussiandistribution and 119903

119894119895is distance between fireflies 119894 and 119895

Also when moving a firefly new decision variables arecalculated

119911119905+1

119894119896= round( 1

1 + 119890minus119911119905

119894119896+120601119894119895(119911

119905

119894119896minus119911119905

119895119896)minus 006) (38)

where 119911119905+1119894119896

is decision variable for the 119896th asset of the newsolution 119911

119894119896is a decision variable of the 119896th parameter of the

old solution and 119911119895119896

is decision variable of 119896th parameter ofthe brighter firefly 119895

It should be noticed that the decision variables in theemployed bee phase are generated differently than in theinitialization phase equation (35)

After the new 119894th solution is generated in exploitationprocess using (37) and (38) the winner between new 119909

119894(119905 + 1)

and old 119909119894(119905) solution is retained using the selection process

based on Debrsquos rules

43 Exploration As mentioned before we noticed insuffi-cient exploration power in the original FA implementationparticularly in early iterations of algorithmrsquos execution Inthis phase of algorithmrsquos execution exploitation-explorationbalance is not well established for this type of problemsThis balance was also discussed in [14] Thus we adoptedmechanism similar to scout bee with 119897119894119898119894119905 parameter fromthe ABC metaheuristic

We introduced parameter abandonment threshold (119860119879)that represents the allowed predetermined number of unsuc-cessful tries to improve particular solution When a potentialsolution (firefly) is stagnating (not being improved) for 119860119879iterations it is replaced by a new randomone using (33) (34)and (35) Hence fireflies that exploited exhausted solutionsare transformed into scouts that perform the explorationprocess The value of 119860119879 is empirically determined and willbe shown in the experimental section

Also during late iterations with the assumption thatthe right part of the search space has been found the

The Scientific World Journal 9

Generate initial population of fireflies 119909119894and 119911

119894(119894 = 1 2 3 119878119873) by using (33) and (35)

Apply arrangement algorithmLight intensity 119868

119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INCalculate fitness and CV for all fireflies using (26) and (36)Set initial values for 120572Set 119905 value to 0while 119905 lt IN do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119894lt 119868119895then

Move firefly 119894 towards firefly 119895 in 119889 dimension using (37) and (38)Attractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace worse with better solutionusing Debrsquos method and update light intensityif solution 119894 is not improved and 119905

119894lt 119864119861119875 then

119880119868119862119894increment by 1

else119880119868119862119894set to 0

end ifend if

end forend forif 119905 lt 119864119861119875 then

replace all agents whose UIC gt 119860119879 with random agents using (33)end ifApply arrangement algorithmRank all fireflies and find the current bestRecalculate values for 120572 using (39)

end while

Algorithm 3 Modified firefly algorithm

intensive exploration is not needed anymore In that case theexploration is not being triggered For this purpose we intro-duce new control parameter exploration breakpoint (119864119861119875)which controls whether the exploration will be triggeredThediscussion of this parameter is also given in experimentalsection

Also we should note that the parameter 120572 for FA searchprocess is being gradually decreased from its initial valueaccording to

120572 (119905) = (1 minus (1 minus ((10minus4

9)

1119868119873

))) lowast 120572 (119905 minus 1) (39)

where 119905 is the current iteration and 119868119873 is the maximum num-ber of iterations

Pseudocode of mFA is given as Algorithm 3 Someimplementationrsquos details are omitted for the sake of simplicity

In the pseudocode 119878119873 is total number of fireflies in thepopulation 119868119873 is total number of algorithmrsquos iterations and119905 is the current iteration As explained 119860119879 is the maximumnumber of unsuccessful attempts to improve particular solu-tion after which it will be considered exhausted and replacedby a new random solution

5 Algorithm Settings andExperimental Results

In this section we first present parameter settings which wereadjusted for testing purposes of our proposed mFA Thenwe show experimental results discussion and comparativeanalysis with other state-of-the-art algorithms

51 Parameter Settings To test the performance and robust-ness of our modified FA we set algorithm parameters similarto [1] Number of firefly agents in the population 119878119873 iscalculated by employing the following expression

119878119873 = 20radic119873 (40)

where119873 is the number of potential assets in portfolioThe value of maximum number of iterations 119868119873 in one

algorithmrsquos run is set according to

119868119873 =1000 lowast 119873

119878119873 (41)

As mentioned in Section 4 to improve the explorationpower of the original FA we introduced parameter 119860119879 withcorresponding counters 119880119868119862

119894(119894 = 1 2 119878119873) that count

howmany times a particular firefly agent unsuccessfully tried

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 4: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

4 The Scientific World Journal

determines the proportion of the capital that is placed in asset119894 Weight variable has a real value in the range [0 1]

In the presented MV formulation the objective is tominimize the portfolio risk 1205902

119901 for a given value of portfolio

expected return 119877119901

Efficient frontier model which is often called single-objective function model constructs only one evaluationfunction that models portfolio optimization problem In thismodel the desired mean return 119877 is varying for the purposeof finding different objective function values Risk aversionindicator 120582 isin [0 1] controls this process [28]

Efficient frontier definition is

min120582[

[

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895)]

]

minus (1 minus 120582) [

119873

sum

119894=1

120596119894119877119894] (8)

subject to

119873

sum

119894=1

120596119894= 1

120596119894ge 0 forall119894 isin 1 2 119873

(9)

In the presented formulation 120582 is critical parameter Itcontrols the relative importance of themean return to the riskfor the investor When the value of 120582 is set to 0 mean returnof portfolio is being maximized without considering the riskAlternatively when 120582 has a value of 1 risk of the portfoliois minimized regardless of the mean return Thus when thevalue of 120582 increases the relative importance of the risk to themean return for the investor rises and vice versa

Each 120582 value generates different objective function valuewhich is composed of themean return and the variance (risk)By tracing the mean return and variance intersections fordifferent 120582 a continuous curve can be drawn which is calledan efficient frontier in the Markowitzrsquos modern portfoliotheory

Another model worth mentioning is Sharpe ratio (SR)which uses the information from mean and variance of anasset [44] In this model the measure of mean return isadjusted with the risk and can be described by

SR =

119877119901minus 119877119891

StdDev (119901) (10)

where 119901 denotes portfolio 119877119901is the mean return of the

portfolio 119901 and 119877119891is a test available rate of return on a risk-

free asset StdDev(119901) is a measure of the risk in portfolio(standard deviation of119877

119901) By adjusting the portfolio weights

119908119894 portfoliorsquos Sharpe ratio can be maximizedHowever all three models the MV efficient frontier and

Sharpe ratio were constructed under strict and simplifiedassumptions that do not consider real-world parametersand limitations and as such are not always suitable for realapplications For these reason extendedMVmodel is devised

Extended MV formulation takes into account additionalconstraints such as budget cardinality transaction lots andsector capitalization These constraints model real-world

legal and economic environment where the financial invest-ments are being done [45] Budget constraint controls theminimum andmaximum total budget proportion that can beinvested in particular asset Cardinality constraint controlswhether a particular asset will be included in the portfolioThe minimum transaction lots constraint ensures that eachsecurity can only be purchased in a certain number ofunits Sector capitalization constraint directs the investmentstowards the assets that belong to the sectors where highervalue of market capitalization can be accomplished Thereview of this constraint is given in [24]

When all the above-mentioned constraints are beingapplied to the basic portfolio problem formulation theproblem becomes a combinatorial optimization problemwhose feasible region is not continuous Thus the extendedMV model belongs to the group of quadratic mixed-integerprogramming models Its formulation is

min1205902119877119901= 1205902

119901=

119873

sum

119894=1

119873

sum

119895=1

120596119894120596119895Cov (119877

119894119877119895) (11)

where

120596119894=

119909119894119888119894119911119894

sum119873

119895=1119909119895119888119895119911119895

119894 = 1 119873 (12)

119873

sum

119894=1

119911119894= 119872 le 119873 119872119873 isin N

119911119894isin 0 1 119894 = 1 119873

(13)

subject to

119873

sum

119894=1

119909119894119888119894119911119894119877119894ge 119861119877 (14)

119873

sum

119894=1

119909119894119888119894119911119894le 119861 (15)

0 le 119861low119894 le 119909119894119888119894le 119861up

119894le 119861 119894 = 1 119873 (16)

sum

119894119904

119882119894119904ge sum

1198941199041015840

1198821198941199041015840

forall1199101199041199101199041015840 = 0 119894

119904 1198941199041015840 isin 1 2 119873

119904 1199041015840isin 1 2 119878 119904 lt 119904

1015840

(17)

where

119910119904=

1 if sum

119894119904

119911119894gt 0

0 if sum

119894119904

119911119894= 0

(18)

In (11)ndash(18) 119872 represents the number of selected assetsamong possible119873 assets 119861 is the total disposable budget and119861low119894 and119861up

119894are lower andupper limits of the budget that can

be invested in asset 119894 respectively 119878 represents the number ofsectors in the market where the investment is being placed

The Scientific World Journal 5

119888119894is the size of transaction lot for asset 119894 and 119909

119894denotes the

number of such lots (of asset 119894) that is purchasedDecision variable 119911

119894is used to apply cardinality con-

straint 119911119894is equal to 1 if an asset 119894 is present in the

portfolio otherwise its value is 0 Equation (17)models sectorcapitalization constraint Despite the fact that a certain sectorhas high capitalization security from this sector that haslow return andor high risk must be excluded from the finalportfoliorsquos structure To make such exclusion variable 119910

119904is

defined and it has a value of 1 if the corresponding sector hasat least one selected asset and 0 otherwise In (17) 119894

119904is a set

of assets which can be found in sector 119904 Sectors are sorted indescending order by their capitalization value

Entropy was introduced by Jaynes [46] for wide appli-cation in optimization crystallography in the beginningnetworks [47] and so forth but it also becomes an importanttool in portfolio optimization and asset pricing Entropy iswidely recognized measure of portfolio diversification [2]In multiobjective portfolio optimization models the entropycan be used as an objective function Here we will addressentropy as diversity constraint in portfolio models becausewe employed it in portfolio model that is used for testing ofour modified FA approach

The entropy constraint defines lower bound119871119864of entropy

119864(119875) of portfolio 119875 according to the following equation [48]

119864 (119875) = minus

119873

sum

119894=1

119909119894ln119909119894ge 119871119864 (19)

where119873 is the number of assets in portfolio119875 and119909119894is weight

variable of the security 119894In one extreme when the weigh variable of only one

asset in portfolio 119875 is 1 and for the rest of the assets is 0119864(119875) reaches its minimum at minus1 lowast ln 1 = 0 [49] This isthe least diverse scenario Contrarily in the most diversecondition that forforall119894 119909

119894= 1119873119864(119875) obtains itsmaximum in

minus119873(1119873 ln 1119873) = ln119873 According to this 119871119864is in the range

[0 ln119873] Greater value of entropy denotes better portfoliorsquosdiversity and 119871

119864is used to make sure that the diversity of 119875

is not too lowEntropy constraint equation (19) can be transformed into

the upper-bound constraint [49]

119865 (119875) = 119890minus119864(119875)

= 119890sum119873

119894=1119909119894 ln119909119894 le 119880

119864 (20)

As shown previously 0 le 119864(119875) le ln119873 which implicatesthat 0 ge minus119864(119875) ge minus ln119873 Then the condition 119890

0= 1 ge

119890minus119864(119875)

= 119865(119875) ge 119890minus ln119873

= 1119873 holds Thus the range ofupper-bound constraint 119880

119864is [1119873 1]

In this paper for testing purposes we used model whichemploys some of the constraints that can be found in theextended MV formulation In the experimental study weimplemented modified FA for optimizing cardinality con-strained mean-variance model (CCMV) which is derivedfrom the standard Markowitzrsquos and the efficiency frontiermodels

We were inspired by Ustarsquos and Kantarrsquos multiobjec-tive approach based on a mean-variance-skewness-entropyportfolio selection model (MVSEM) that employs Shannonrsquos

entropy measure to the mean-variance-skewness portfoliomodel (MVSM) to generate a well-diversified portfolio [5051] Thus we added entropy measure to the CCMV portfolioformulation to generate well-diversified portfolio

Formulation of theCCMVmodel with entropy constraintis

min120582[

[

119873

sum

119894=1

119873

sum

119895=1

119909119894119909119895120590119894119895]

]

minus (1 minus 120582) [

119873

sum

119894=1

119909119894120583119894] (21)

subject to

119873

sum

119894=1

119909119894= 1 (22)

119873

sum

119894=1

119911119894= 119870 (23)

120576119894119911119894le 119909119894le 120575119894119911119894 119911 isin 0 1 119894 = 1 2 3 119873 (24)

minus

119873

sum

119894=1

119911119894119909119894ln119909119894ge 119871119864 (25)

As already mentioned in this section119873 is the number ofpotential securities that will be included in portfolio 120582 is riskaversion parameter 119909

119894and 119909

119895are weight variables of assets 119894

and 119895 respectively 120575119894119895is their covariance and 120583

119894is 119894th assetrsquos

return119870 is the desired number of assets that will be includedin the portfolio Decision variable 119911

119894controls whether the

asset 119894 will be included in portfolio If its value is 1 asset 119894is included and if the value is 0 asset 119894 is excluded from theportfolio 120576 and 120575 are lower and upper bounds of the asset thatis included in portfolio and they make sure that the assetrsquosproportion in the portfolio is within the predefined range

We applied entropy constraint equation (25) with lowerbounds as in (19) to ensure that the diversity of portfolio isnot too low 119871

119864is lower bound of the entropy in the range

[0 ln119870] In (25) 119911119894ensures that only assets that are included

in portfolio are taken into accountFrom the CCMV formulation with entropy constraint it

can be seen that this problem belongs to the group of mixedquadratic and integer programming problems It employsboth real and integer variables with equity and inequityconstraints

3 Presentation of the Original FA

Firefly algorithm (FA) was originally proposed by Yang in2008 [33] with later improvements [52] It was applied tocontinuous [53] discrete [54] and mixed [55] optimizationproblems The emergence of this metaheuristic was inspiredby the social and flashing behavior of fireflies

Fireflies inhabit moderate and tropical climate environ-ments all around the word Their flashing behavior has manydifferent roles Synchronized flashing by males is unique inthe animal world and involves a capacity for visually coordi-nated rhythmically coincident and interindividual behaviorAlso flashing is used to alleviate communication for mating

6 The Scientific World Journal

and to frighten the predatorsThese flashing properties can beincorporated into swarm intelligence metaheuristic in such away that they are associatedwith the objective functionwhichis subject to optimization

With respect to the facts that the real firefly system issophisticated and that the metaheuristics are approximationsof real systems three idealized rules are applied with the goalto enable algorithmrsquos implementation [33] (1) all fireflies areunisex so the attractions between fireflies do not depend ontheir sex (2) attractiveness of a firefly is directly proportionalto their brightness and the less brighter firefly will movetowards the brighter one Brightness increases as the distancebetween fireflies decreases (3) the brightness of a firefly isdetermined by the value of objective function For minimiza-tion problems brightness increases as the objective functionvalue decreases There are also other forms of brightnesswhich can be defined similar to fitness function in geneticalgorithms (GA) [6]

In the implementation of FA one of the most importantissues that should be considered is the formulation of attrac-tiveness For the sake of simplicity a good approximationis that the attractiveness of a firefly is determined by itsbrightness which depends on the encoded objective function

In the case of maximization problems the brightness ofa firefly at a particular location 119909 can be chosen as 119868(119909) sim

119891(119909) where 119868(119909) is the attractiveness and 119891(119909) is the value ofobjective function at this location Otherwise if the goal is tominimize function the following expression can be used

119868 (119909) =

1

119891 (119909) if 119891 (119909) gt 0

1 +1003816100381610038161003816119891 (119909)

1003816100381610038161003816 otherwise(26)

The variations of light intensity and attractiveness aremonotonically decreasing functions because as the lightintensity and the attractiveness decrease the distance fromthe source increases and vice versa This can be formulatedas [56]

119868 (119903) =1198680

1 + 1205741199032 (27)

where 119868(119903) is the light intensity 119903 is distance and 1198680is the light

intensity at the source Besides that the air also absorbs partof the light and the light becomes weaker Air absorption ismodeled by the light absorption coefficient 120574

In most FA implementations that can be found in theliterature survey the combined effect of both the inversesquare law and absorption can be approximated using thefollowing Gaussian form

119868 (119903) = 1198680119890minus1205741199032

(28)

Attractiveness 120573 of a firefly is relative because it dependson the distance between the firefly and the beholder Thusit varies with the distance 119903

119894119895between fireflies 119894 and 119895 The

attractiveness is direct proportional to fireflies light intensity(brightness) as shown in the following

120573 (119903) = 1205730119890minus1205741199032

(29)

where 1205730is the attractiveness at 119903 = 0 Equation (29) deter-

mines a characteristic distance Γ = 1radic120574 over which theattractiveness changes significantly from 120573

0to 1205730119890minus1

But in practical applications the above expression isusually replaced with

120573 (119903) =1205730

1 + 1205741199032 (30)

Main reason for this replacement is that the calculation ofexponential function in (29) demands much more computa-tional power than simple division in (30)

The movement of a firefly 119894 (its new position in iteration119905 + 1) towards the brighter and thus more attractive firefly 119895is calculated using

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (31)

where 1205730is attractiveness at 119903 = 0 120572 is randomization

parameter 120581 is random number drawn from uniform orGaussian distribution and 119903

119894119895is distance between fireflies 119894

and 119895 The positions of fireflies are updated sequentially bycomparing and updating each pair of them at every iteration

The distance between fireflies 119894 and 119895 is calculated usingCartesian distance form [56]

119903119894119895=10038171003817100381710038171003817119909119894minus 119909119895

10038171003817100381710038171003817= radic

119863

sum

119896=1

(119909119894119896minus 119909119895119896) (32)

where 119863 is the number of problem parameters For mostproblems 120573

0= 0 and 120572 isin [0 1] are adequate settings

The parameter 120574 has crucial impact on the convergencespeed of the algorithm This parameter shows the variationof attractiveness and in theory it has a value of [0 +infin) butin practice it is determined by the characteristic distance Γ ofthe system that is being optimized In most implementations120574 parameter varies between 001 and 100

There are two special cases of the FA and they are bothassociated with the value of 120574 as follows [33]

(i) if 120574 = 0 then 120573 = 1205730 That means that the air around

firefly is completely clear In this case 120573 is alwaysthe largest it could possibly be and fireflies advancetowards other fireflies with the largest possible stepsThe exploration-exploitation is out of balance becausethe exploitation is maximal while the exploration isminimal

(ii) if 120574 = infin then 120573 = 0 In this case there is a thick fogaround fireflies and they could not see each otherThemovement is performed in a random steps and explo-ration is more intensive with practically no exploi-tation at all

The pseudocode for the original FA is given as Algo-rithm 1

In the presented pseudocode 119878119873 is total number offireflies in the population 119868119873 is total number of algorithmrsquositerations and 119905 is the current iteration

The Scientific World Journal 7

Generate initial population of fireflies 119909119894 (119894 = 1 2 3 119878119873)

Light intensity 119868119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INwhile 119905 lt 119868119873 do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119895lt 119868119894then

Move firefly 119895 towards firefly 119894 in 119889 dimensionAttractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace the worst withbetter solution and update light intensity

end ifend for

end forRank all fireflies and find the current best

end while

Algorithm 1 Original firefly algorithm

4 Proposed mFA for the CCMV PortfolioProblem with Entropy Constraint

As mentioned in Section 1 we propose a modified fireflyalgorithm for cardinality constrained mean-variance portfo-lio optimization with entropy constraint

By analyzing FA we noticed that as most other swarmintelligence algorithms the pure version of the algorithmdeveloped for unconstrained problems exhibits some defi-ciencies when applied to constrained problems In the earlycycles of algorithmrsquos execution established balance betweenexploitation and exploration is not completely appropriatefor this class of problems During early phase explorationis not intensive enough However during late cycles whenFA was able to discover the right part of the search spacethe exploration is no longer needed To control whetherthe exploration will be triggered or not we introducedexploration breakpoint 119864119861119875 control parameter

In this section we show implementation details of ourmodified FA algorithm which we named mFA

41 Initialization Phase and Fitness Calculation At the initial-ization step FA generates random population of 119878119873 fireflies(artificial agents) using

119909119894119895= 119897119887119895+ rand (0 1) lowast (119906119887

119895minus 119897119887119895) (33)

where 119909119894119895

is the weight of the 119895th portfoliorsquos asset of the 119894thagent rand(0 1) is random number uniformly distributedbetween 0 and 1 and 119906119887

119895and 119897119887

119895are upper and lower weight

bounds of the 119895th asset respectivelyIf the initially generated value for the 119895th parameter of

the 119894th firefly does not fit in the scope [119897119887119895 119906119887119895] it is being

modified using the following expression

if (119909119894119895) gt 119906119887

119895 then 119909

119894119895= 119906119887119895

if (119909119894119895) lt 119897119887119895 then 119909

119894119895= 119897119887119895

(34)

Moreover in the initialization phase decision variables119911119894119895(119894 = 1 119878119873 119895 = 1 119873) are also initialized for

each firefly agent 119894 119873 is the number of potential assets inportfolio According to this each firefly is modeled using2lowast119873 dimensions 119911

119894is a binary vector with values 1 when an

asset is included in portfolio and 0 when it is excluded fromit

Decision variables are generated randomly by applying

119911119894119895=

1 if 120601 lt 05

0 if 120601 ge 05(35)

where 120601 is random real number between 0 and 1To guarantee the feasibility of solutions we used similar

arrangement algorithm as proposed in [1] The arrangementalgorithm is applied first time in the initialization phase

In the arrangement algorithm 119894 is the current solutionthat consists of 119876 the distinct set of 119870lowast

119894assets in the 119894th

solution 119911119894119895

is the decision variable of asset 119895 and 119909119894119895

isthe weight proportion for asset 119895 Arrangement algorithmpseudocode is shown as Algorithm 2

For the constraint sum119873119894=1

119909119894= 1 we set 120595 = sum

119895isin119876119909119894119895

and put 119909119894119895

= 119909119894119895120595 for all assets that satisfy 119895 isin 119876

The same approach for satisfying this constraint was usedin [1] To make sure that each assetrsquos proportion is withinpredefined lower and upper bounds 120576 and 120575 respectively weused 119894119891 119909

119894119895gt 120575119894119895

then 119909119894119895

= 120575119894 119895 and 119894119891 119909119894119895

lt 120576119894119895

then119909119894119895= 120576119894119895

We did not apply 119888-value based approach for addingand removing assets from the portfolio as in [1] Accordingto our experiments using 119888-value does not improve FAperformance It only increases computational complexity

In modified FA the fitness is employed to model theattractiveness of the fireflies Attractiveness is directly propor-tional to the fitness

After generating 119878119873 number of agents fitness value is cal-culated for each firefly in the population Fitness (brightness)is calculated as in the original FA implementation (26)

8 The Scientific World Journal

while 119870lowast119894lt 119870 do

select random asset 119895 such that 119895 notin 119876119911119894119895= 1 119876 = 119876 cup [119895] 119870

lowast

119894= 119870lowast

119894+ 1

end whilewhile 119870lowast

119894gt 119870 do

select random asset 119895 such that 119895 isin 119876119911119894119895= 1 119876 = 119876 minus [119895] 119870

lowast

119894= 119870lowast

119894minus 1

end whilewhile true do120579 = sum

119895isin119876

119909119894119895 119909119894119895=

119909119894119895

120595 120578 = sum

119895isin119876

max (0 119909119894119895minus 120575119894) 120601 = sum

119895isin119876

max (0 120578119895minus 119909119894119895)

if 120578 = 0 and 120601 = 0 thenexit algorithm

end iffor 119895 = 1 to119873 do

if 119911119894119895= 1 then

if 119909119894119895gt 120575119895then

119909119894119895= 120575119895

end ifif 119909119894119895lt 120576119895then

119909119894119895= 120576119895

end ifend if

end forend while

Algorithm 2 Arrangement algorithm

In the initialization phase for each firefly in the popu-lation constraint violation CV is being calculated CV is ameasure of how much the agents violate constraints in theproblem definition

CV119894= sum

119892119895(119909119894)gt0

119892119895(119909119894) +

119898

sum

119895=119902+1

ℎ119895(119909119894) (36)

CV calculation is necessary because it is later used forperforming selection based on Debrsquos method [57 58]

42 Firefly Movement The movement of a firefly 119894 towardsthe firefly that has a higher fitness 119895 is calculated as in theoriginal FA implementation [56]

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (37)

where 119909119894(119905 + 1) is new solution generated in iteration (119905 + 1)

1205730is attractiveness at 119903 = 0 120572 is randomization parameter

120581 is random number drawn from uniform or Gaussiandistribution and 119903

119894119895is distance between fireflies 119894 and 119895

Also when moving a firefly new decision variables arecalculated

119911119905+1

119894119896= round( 1

1 + 119890minus119911119905

119894119896+120601119894119895(119911

119905

119894119896minus119911119905

119895119896)minus 006) (38)

where 119911119905+1119894119896

is decision variable for the 119896th asset of the newsolution 119911

119894119896is a decision variable of the 119896th parameter of the

old solution and 119911119895119896

is decision variable of 119896th parameter ofthe brighter firefly 119895

It should be noticed that the decision variables in theemployed bee phase are generated differently than in theinitialization phase equation (35)

After the new 119894th solution is generated in exploitationprocess using (37) and (38) the winner between new 119909

119894(119905 + 1)

and old 119909119894(119905) solution is retained using the selection process

based on Debrsquos rules

43 Exploration As mentioned before we noticed insuffi-cient exploration power in the original FA implementationparticularly in early iterations of algorithmrsquos execution Inthis phase of algorithmrsquos execution exploitation-explorationbalance is not well established for this type of problemsThis balance was also discussed in [14] Thus we adoptedmechanism similar to scout bee with 119897119894119898119894119905 parameter fromthe ABC metaheuristic

We introduced parameter abandonment threshold (119860119879)that represents the allowed predetermined number of unsuc-cessful tries to improve particular solution When a potentialsolution (firefly) is stagnating (not being improved) for 119860119879iterations it is replaced by a new randomone using (33) (34)and (35) Hence fireflies that exploited exhausted solutionsare transformed into scouts that perform the explorationprocess The value of 119860119879 is empirically determined and willbe shown in the experimental section

Also during late iterations with the assumption thatthe right part of the search space has been found the

The Scientific World Journal 9

Generate initial population of fireflies 119909119894and 119911

119894(119894 = 1 2 3 119878119873) by using (33) and (35)

Apply arrangement algorithmLight intensity 119868

119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INCalculate fitness and CV for all fireflies using (26) and (36)Set initial values for 120572Set 119905 value to 0while 119905 lt IN do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119894lt 119868119895then

Move firefly 119894 towards firefly 119895 in 119889 dimension using (37) and (38)Attractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace worse with better solutionusing Debrsquos method and update light intensityif solution 119894 is not improved and 119905

119894lt 119864119861119875 then

119880119868119862119894increment by 1

else119880119868119862119894set to 0

end ifend if

end forend forif 119905 lt 119864119861119875 then

replace all agents whose UIC gt 119860119879 with random agents using (33)end ifApply arrangement algorithmRank all fireflies and find the current bestRecalculate values for 120572 using (39)

end while

Algorithm 3 Modified firefly algorithm

intensive exploration is not needed anymore In that case theexploration is not being triggered For this purpose we intro-duce new control parameter exploration breakpoint (119864119861119875)which controls whether the exploration will be triggeredThediscussion of this parameter is also given in experimentalsection

Also we should note that the parameter 120572 for FA searchprocess is being gradually decreased from its initial valueaccording to

120572 (119905) = (1 minus (1 minus ((10minus4

9)

1119868119873

))) lowast 120572 (119905 minus 1) (39)

where 119905 is the current iteration and 119868119873 is the maximum num-ber of iterations

Pseudocode of mFA is given as Algorithm 3 Someimplementationrsquos details are omitted for the sake of simplicity

In the pseudocode 119878119873 is total number of fireflies in thepopulation 119868119873 is total number of algorithmrsquos iterations and119905 is the current iteration As explained 119860119879 is the maximumnumber of unsuccessful attempts to improve particular solu-tion after which it will be considered exhausted and replacedby a new random solution

5 Algorithm Settings andExperimental Results

In this section we first present parameter settings which wereadjusted for testing purposes of our proposed mFA Thenwe show experimental results discussion and comparativeanalysis with other state-of-the-art algorithms

51 Parameter Settings To test the performance and robust-ness of our modified FA we set algorithm parameters similarto [1] Number of firefly agents in the population 119878119873 iscalculated by employing the following expression

119878119873 = 20radic119873 (40)

where119873 is the number of potential assets in portfolioThe value of maximum number of iterations 119868119873 in one

algorithmrsquos run is set according to

119868119873 =1000 lowast 119873

119878119873 (41)

As mentioned in Section 4 to improve the explorationpower of the original FA we introduced parameter 119860119879 withcorresponding counters 119880119868119862

119894(119894 = 1 2 119878119873) that count

howmany times a particular firefly agent unsuccessfully tried

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 5: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

The Scientific World Journal 5

119888119894is the size of transaction lot for asset 119894 and 119909

119894denotes the

number of such lots (of asset 119894) that is purchasedDecision variable 119911

119894is used to apply cardinality con-

straint 119911119894is equal to 1 if an asset 119894 is present in the

portfolio otherwise its value is 0 Equation (17)models sectorcapitalization constraint Despite the fact that a certain sectorhas high capitalization security from this sector that haslow return andor high risk must be excluded from the finalportfoliorsquos structure To make such exclusion variable 119910

119904is

defined and it has a value of 1 if the corresponding sector hasat least one selected asset and 0 otherwise In (17) 119894

119904is a set

of assets which can be found in sector 119904 Sectors are sorted indescending order by their capitalization value

Entropy was introduced by Jaynes [46] for wide appli-cation in optimization crystallography in the beginningnetworks [47] and so forth but it also becomes an importanttool in portfolio optimization and asset pricing Entropy iswidely recognized measure of portfolio diversification [2]In multiobjective portfolio optimization models the entropycan be used as an objective function Here we will addressentropy as diversity constraint in portfolio models becausewe employed it in portfolio model that is used for testing ofour modified FA approach

The entropy constraint defines lower bound119871119864of entropy

119864(119875) of portfolio 119875 according to the following equation [48]

119864 (119875) = minus

119873

sum

119894=1

119909119894ln119909119894ge 119871119864 (19)

where119873 is the number of assets in portfolio119875 and119909119894is weight

variable of the security 119894In one extreme when the weigh variable of only one

asset in portfolio 119875 is 1 and for the rest of the assets is 0119864(119875) reaches its minimum at minus1 lowast ln 1 = 0 [49] This isthe least diverse scenario Contrarily in the most diversecondition that forforall119894 119909

119894= 1119873119864(119875) obtains itsmaximum in

minus119873(1119873 ln 1119873) = ln119873 According to this 119871119864is in the range

[0 ln119873] Greater value of entropy denotes better portfoliorsquosdiversity and 119871

119864is used to make sure that the diversity of 119875

is not too lowEntropy constraint equation (19) can be transformed into

the upper-bound constraint [49]

119865 (119875) = 119890minus119864(119875)

= 119890sum119873

119894=1119909119894 ln119909119894 le 119880

119864 (20)

As shown previously 0 le 119864(119875) le ln119873 which implicatesthat 0 ge minus119864(119875) ge minus ln119873 Then the condition 119890

0= 1 ge

119890minus119864(119875)

= 119865(119875) ge 119890minus ln119873

= 1119873 holds Thus the range ofupper-bound constraint 119880

119864is [1119873 1]

In this paper for testing purposes we used model whichemploys some of the constraints that can be found in theextended MV formulation In the experimental study weimplemented modified FA for optimizing cardinality con-strained mean-variance model (CCMV) which is derivedfrom the standard Markowitzrsquos and the efficiency frontiermodels

We were inspired by Ustarsquos and Kantarrsquos multiobjec-tive approach based on a mean-variance-skewness-entropyportfolio selection model (MVSEM) that employs Shannonrsquos

entropy measure to the mean-variance-skewness portfoliomodel (MVSM) to generate a well-diversified portfolio [5051] Thus we added entropy measure to the CCMV portfolioformulation to generate well-diversified portfolio

Formulation of theCCMVmodel with entropy constraintis

min120582[

[

119873

sum

119894=1

119873

sum

119895=1

119909119894119909119895120590119894119895]

]

minus (1 minus 120582) [

119873

sum

119894=1

119909119894120583119894] (21)

subject to

119873

sum

119894=1

119909119894= 1 (22)

119873

sum

119894=1

119911119894= 119870 (23)

120576119894119911119894le 119909119894le 120575119894119911119894 119911 isin 0 1 119894 = 1 2 3 119873 (24)

minus

119873

sum

119894=1

119911119894119909119894ln119909119894ge 119871119864 (25)

As already mentioned in this section119873 is the number ofpotential securities that will be included in portfolio 120582 is riskaversion parameter 119909

119894and 119909

119895are weight variables of assets 119894

and 119895 respectively 120575119894119895is their covariance and 120583

119894is 119894th assetrsquos

return119870 is the desired number of assets that will be includedin the portfolio Decision variable 119911

119894controls whether the

asset 119894 will be included in portfolio If its value is 1 asset 119894is included and if the value is 0 asset 119894 is excluded from theportfolio 120576 and 120575 are lower and upper bounds of the asset thatis included in portfolio and they make sure that the assetrsquosproportion in the portfolio is within the predefined range

We applied entropy constraint equation (25) with lowerbounds as in (19) to ensure that the diversity of portfolio isnot too low 119871

119864is lower bound of the entropy in the range

[0 ln119870] In (25) 119911119894ensures that only assets that are included

in portfolio are taken into accountFrom the CCMV formulation with entropy constraint it

can be seen that this problem belongs to the group of mixedquadratic and integer programming problems It employsboth real and integer variables with equity and inequityconstraints

3 Presentation of the Original FA

Firefly algorithm (FA) was originally proposed by Yang in2008 [33] with later improvements [52] It was applied tocontinuous [53] discrete [54] and mixed [55] optimizationproblems The emergence of this metaheuristic was inspiredby the social and flashing behavior of fireflies

Fireflies inhabit moderate and tropical climate environ-ments all around the word Their flashing behavior has manydifferent roles Synchronized flashing by males is unique inthe animal world and involves a capacity for visually coordi-nated rhythmically coincident and interindividual behaviorAlso flashing is used to alleviate communication for mating

6 The Scientific World Journal

and to frighten the predatorsThese flashing properties can beincorporated into swarm intelligence metaheuristic in such away that they are associatedwith the objective functionwhichis subject to optimization

With respect to the facts that the real firefly system issophisticated and that the metaheuristics are approximationsof real systems three idealized rules are applied with the goalto enable algorithmrsquos implementation [33] (1) all fireflies areunisex so the attractions between fireflies do not depend ontheir sex (2) attractiveness of a firefly is directly proportionalto their brightness and the less brighter firefly will movetowards the brighter one Brightness increases as the distancebetween fireflies decreases (3) the brightness of a firefly isdetermined by the value of objective function For minimiza-tion problems brightness increases as the objective functionvalue decreases There are also other forms of brightnesswhich can be defined similar to fitness function in geneticalgorithms (GA) [6]

In the implementation of FA one of the most importantissues that should be considered is the formulation of attrac-tiveness For the sake of simplicity a good approximationis that the attractiveness of a firefly is determined by itsbrightness which depends on the encoded objective function

In the case of maximization problems the brightness ofa firefly at a particular location 119909 can be chosen as 119868(119909) sim

119891(119909) where 119868(119909) is the attractiveness and 119891(119909) is the value ofobjective function at this location Otherwise if the goal is tominimize function the following expression can be used

119868 (119909) =

1

119891 (119909) if 119891 (119909) gt 0

1 +1003816100381610038161003816119891 (119909)

1003816100381610038161003816 otherwise(26)

The variations of light intensity and attractiveness aremonotonically decreasing functions because as the lightintensity and the attractiveness decrease the distance fromthe source increases and vice versa This can be formulatedas [56]

119868 (119903) =1198680

1 + 1205741199032 (27)

where 119868(119903) is the light intensity 119903 is distance and 1198680is the light

intensity at the source Besides that the air also absorbs partof the light and the light becomes weaker Air absorption ismodeled by the light absorption coefficient 120574

In most FA implementations that can be found in theliterature survey the combined effect of both the inversesquare law and absorption can be approximated using thefollowing Gaussian form

119868 (119903) = 1198680119890minus1205741199032

(28)

Attractiveness 120573 of a firefly is relative because it dependson the distance between the firefly and the beholder Thusit varies with the distance 119903

119894119895between fireflies 119894 and 119895 The

attractiveness is direct proportional to fireflies light intensity(brightness) as shown in the following

120573 (119903) = 1205730119890minus1205741199032

(29)

where 1205730is the attractiveness at 119903 = 0 Equation (29) deter-

mines a characteristic distance Γ = 1radic120574 over which theattractiveness changes significantly from 120573

0to 1205730119890minus1

But in practical applications the above expression isusually replaced with

120573 (119903) =1205730

1 + 1205741199032 (30)

Main reason for this replacement is that the calculation ofexponential function in (29) demands much more computa-tional power than simple division in (30)

The movement of a firefly 119894 (its new position in iteration119905 + 1) towards the brighter and thus more attractive firefly 119895is calculated using

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (31)

where 1205730is attractiveness at 119903 = 0 120572 is randomization

parameter 120581 is random number drawn from uniform orGaussian distribution and 119903

119894119895is distance between fireflies 119894

and 119895 The positions of fireflies are updated sequentially bycomparing and updating each pair of them at every iteration

The distance between fireflies 119894 and 119895 is calculated usingCartesian distance form [56]

119903119894119895=10038171003817100381710038171003817119909119894minus 119909119895

10038171003817100381710038171003817= radic

119863

sum

119896=1

(119909119894119896minus 119909119895119896) (32)

where 119863 is the number of problem parameters For mostproblems 120573

0= 0 and 120572 isin [0 1] are adequate settings

The parameter 120574 has crucial impact on the convergencespeed of the algorithm This parameter shows the variationof attractiveness and in theory it has a value of [0 +infin) butin practice it is determined by the characteristic distance Γ ofthe system that is being optimized In most implementations120574 parameter varies between 001 and 100

There are two special cases of the FA and they are bothassociated with the value of 120574 as follows [33]

(i) if 120574 = 0 then 120573 = 1205730 That means that the air around

firefly is completely clear In this case 120573 is alwaysthe largest it could possibly be and fireflies advancetowards other fireflies with the largest possible stepsThe exploration-exploitation is out of balance becausethe exploitation is maximal while the exploration isminimal

(ii) if 120574 = infin then 120573 = 0 In this case there is a thick fogaround fireflies and they could not see each otherThemovement is performed in a random steps and explo-ration is more intensive with practically no exploi-tation at all

The pseudocode for the original FA is given as Algo-rithm 1

In the presented pseudocode 119878119873 is total number offireflies in the population 119868119873 is total number of algorithmrsquositerations and 119905 is the current iteration

The Scientific World Journal 7

Generate initial population of fireflies 119909119894 (119894 = 1 2 3 119878119873)

Light intensity 119868119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INwhile 119905 lt 119868119873 do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119895lt 119868119894then

Move firefly 119895 towards firefly 119894 in 119889 dimensionAttractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace the worst withbetter solution and update light intensity

end ifend for

end forRank all fireflies and find the current best

end while

Algorithm 1 Original firefly algorithm

4 Proposed mFA for the CCMV PortfolioProblem with Entropy Constraint

As mentioned in Section 1 we propose a modified fireflyalgorithm for cardinality constrained mean-variance portfo-lio optimization with entropy constraint

By analyzing FA we noticed that as most other swarmintelligence algorithms the pure version of the algorithmdeveloped for unconstrained problems exhibits some defi-ciencies when applied to constrained problems In the earlycycles of algorithmrsquos execution established balance betweenexploitation and exploration is not completely appropriatefor this class of problems During early phase explorationis not intensive enough However during late cycles whenFA was able to discover the right part of the search spacethe exploration is no longer needed To control whetherthe exploration will be triggered or not we introducedexploration breakpoint 119864119861119875 control parameter

In this section we show implementation details of ourmodified FA algorithm which we named mFA

41 Initialization Phase and Fitness Calculation At the initial-ization step FA generates random population of 119878119873 fireflies(artificial agents) using

119909119894119895= 119897119887119895+ rand (0 1) lowast (119906119887

119895minus 119897119887119895) (33)

where 119909119894119895

is the weight of the 119895th portfoliorsquos asset of the 119894thagent rand(0 1) is random number uniformly distributedbetween 0 and 1 and 119906119887

119895and 119897119887

119895are upper and lower weight

bounds of the 119895th asset respectivelyIf the initially generated value for the 119895th parameter of

the 119894th firefly does not fit in the scope [119897119887119895 119906119887119895] it is being

modified using the following expression

if (119909119894119895) gt 119906119887

119895 then 119909

119894119895= 119906119887119895

if (119909119894119895) lt 119897119887119895 then 119909

119894119895= 119897119887119895

(34)

Moreover in the initialization phase decision variables119911119894119895(119894 = 1 119878119873 119895 = 1 119873) are also initialized for

each firefly agent 119894 119873 is the number of potential assets inportfolio According to this each firefly is modeled using2lowast119873 dimensions 119911

119894is a binary vector with values 1 when an

asset is included in portfolio and 0 when it is excluded fromit

Decision variables are generated randomly by applying

119911119894119895=

1 if 120601 lt 05

0 if 120601 ge 05(35)

where 120601 is random real number between 0 and 1To guarantee the feasibility of solutions we used similar

arrangement algorithm as proposed in [1] The arrangementalgorithm is applied first time in the initialization phase

In the arrangement algorithm 119894 is the current solutionthat consists of 119876 the distinct set of 119870lowast

119894assets in the 119894th

solution 119911119894119895

is the decision variable of asset 119895 and 119909119894119895

isthe weight proportion for asset 119895 Arrangement algorithmpseudocode is shown as Algorithm 2

For the constraint sum119873119894=1

119909119894= 1 we set 120595 = sum

119895isin119876119909119894119895

and put 119909119894119895

= 119909119894119895120595 for all assets that satisfy 119895 isin 119876

The same approach for satisfying this constraint was usedin [1] To make sure that each assetrsquos proportion is withinpredefined lower and upper bounds 120576 and 120575 respectively weused 119894119891 119909

119894119895gt 120575119894119895

then 119909119894119895

= 120575119894 119895 and 119894119891 119909119894119895

lt 120576119894119895

then119909119894119895= 120576119894119895

We did not apply 119888-value based approach for addingand removing assets from the portfolio as in [1] Accordingto our experiments using 119888-value does not improve FAperformance It only increases computational complexity

In modified FA the fitness is employed to model theattractiveness of the fireflies Attractiveness is directly propor-tional to the fitness

After generating 119878119873 number of agents fitness value is cal-culated for each firefly in the population Fitness (brightness)is calculated as in the original FA implementation (26)

8 The Scientific World Journal

while 119870lowast119894lt 119870 do

select random asset 119895 such that 119895 notin 119876119911119894119895= 1 119876 = 119876 cup [119895] 119870

lowast

119894= 119870lowast

119894+ 1

end whilewhile 119870lowast

119894gt 119870 do

select random asset 119895 such that 119895 isin 119876119911119894119895= 1 119876 = 119876 minus [119895] 119870

lowast

119894= 119870lowast

119894minus 1

end whilewhile true do120579 = sum

119895isin119876

119909119894119895 119909119894119895=

119909119894119895

120595 120578 = sum

119895isin119876

max (0 119909119894119895minus 120575119894) 120601 = sum

119895isin119876

max (0 120578119895minus 119909119894119895)

if 120578 = 0 and 120601 = 0 thenexit algorithm

end iffor 119895 = 1 to119873 do

if 119911119894119895= 1 then

if 119909119894119895gt 120575119895then

119909119894119895= 120575119895

end ifif 119909119894119895lt 120576119895then

119909119894119895= 120576119895

end ifend if

end forend while

Algorithm 2 Arrangement algorithm

In the initialization phase for each firefly in the popu-lation constraint violation CV is being calculated CV is ameasure of how much the agents violate constraints in theproblem definition

CV119894= sum

119892119895(119909119894)gt0

119892119895(119909119894) +

119898

sum

119895=119902+1

ℎ119895(119909119894) (36)

CV calculation is necessary because it is later used forperforming selection based on Debrsquos method [57 58]

42 Firefly Movement The movement of a firefly 119894 towardsthe firefly that has a higher fitness 119895 is calculated as in theoriginal FA implementation [56]

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (37)

where 119909119894(119905 + 1) is new solution generated in iteration (119905 + 1)

1205730is attractiveness at 119903 = 0 120572 is randomization parameter

120581 is random number drawn from uniform or Gaussiandistribution and 119903

119894119895is distance between fireflies 119894 and 119895

Also when moving a firefly new decision variables arecalculated

119911119905+1

119894119896= round( 1

1 + 119890minus119911119905

119894119896+120601119894119895(119911

119905

119894119896minus119911119905

119895119896)minus 006) (38)

where 119911119905+1119894119896

is decision variable for the 119896th asset of the newsolution 119911

119894119896is a decision variable of the 119896th parameter of the

old solution and 119911119895119896

is decision variable of 119896th parameter ofthe brighter firefly 119895

It should be noticed that the decision variables in theemployed bee phase are generated differently than in theinitialization phase equation (35)

After the new 119894th solution is generated in exploitationprocess using (37) and (38) the winner between new 119909

119894(119905 + 1)

and old 119909119894(119905) solution is retained using the selection process

based on Debrsquos rules

43 Exploration As mentioned before we noticed insuffi-cient exploration power in the original FA implementationparticularly in early iterations of algorithmrsquos execution Inthis phase of algorithmrsquos execution exploitation-explorationbalance is not well established for this type of problemsThis balance was also discussed in [14] Thus we adoptedmechanism similar to scout bee with 119897119894119898119894119905 parameter fromthe ABC metaheuristic

We introduced parameter abandonment threshold (119860119879)that represents the allowed predetermined number of unsuc-cessful tries to improve particular solution When a potentialsolution (firefly) is stagnating (not being improved) for 119860119879iterations it is replaced by a new randomone using (33) (34)and (35) Hence fireflies that exploited exhausted solutionsare transformed into scouts that perform the explorationprocess The value of 119860119879 is empirically determined and willbe shown in the experimental section

Also during late iterations with the assumption thatthe right part of the search space has been found the

The Scientific World Journal 9

Generate initial population of fireflies 119909119894and 119911

119894(119894 = 1 2 3 119878119873) by using (33) and (35)

Apply arrangement algorithmLight intensity 119868

119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INCalculate fitness and CV for all fireflies using (26) and (36)Set initial values for 120572Set 119905 value to 0while 119905 lt IN do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119894lt 119868119895then

Move firefly 119894 towards firefly 119895 in 119889 dimension using (37) and (38)Attractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace worse with better solutionusing Debrsquos method and update light intensityif solution 119894 is not improved and 119905

119894lt 119864119861119875 then

119880119868119862119894increment by 1

else119880119868119862119894set to 0

end ifend if

end forend forif 119905 lt 119864119861119875 then

replace all agents whose UIC gt 119860119879 with random agents using (33)end ifApply arrangement algorithmRank all fireflies and find the current bestRecalculate values for 120572 using (39)

end while

Algorithm 3 Modified firefly algorithm

intensive exploration is not needed anymore In that case theexploration is not being triggered For this purpose we intro-duce new control parameter exploration breakpoint (119864119861119875)which controls whether the exploration will be triggeredThediscussion of this parameter is also given in experimentalsection

Also we should note that the parameter 120572 for FA searchprocess is being gradually decreased from its initial valueaccording to

120572 (119905) = (1 minus (1 minus ((10minus4

9)

1119868119873

))) lowast 120572 (119905 minus 1) (39)

where 119905 is the current iteration and 119868119873 is the maximum num-ber of iterations

Pseudocode of mFA is given as Algorithm 3 Someimplementationrsquos details are omitted for the sake of simplicity

In the pseudocode 119878119873 is total number of fireflies in thepopulation 119868119873 is total number of algorithmrsquos iterations and119905 is the current iteration As explained 119860119879 is the maximumnumber of unsuccessful attempts to improve particular solu-tion after which it will be considered exhausted and replacedby a new random solution

5 Algorithm Settings andExperimental Results

In this section we first present parameter settings which wereadjusted for testing purposes of our proposed mFA Thenwe show experimental results discussion and comparativeanalysis with other state-of-the-art algorithms

51 Parameter Settings To test the performance and robust-ness of our modified FA we set algorithm parameters similarto [1] Number of firefly agents in the population 119878119873 iscalculated by employing the following expression

119878119873 = 20radic119873 (40)

where119873 is the number of potential assets in portfolioThe value of maximum number of iterations 119868119873 in one

algorithmrsquos run is set according to

119868119873 =1000 lowast 119873

119878119873 (41)

As mentioned in Section 4 to improve the explorationpower of the original FA we introduced parameter 119860119879 withcorresponding counters 119880119868119862

119894(119894 = 1 2 119878119873) that count

howmany times a particular firefly agent unsuccessfully tried

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 6: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

6 The Scientific World Journal

and to frighten the predatorsThese flashing properties can beincorporated into swarm intelligence metaheuristic in such away that they are associatedwith the objective functionwhichis subject to optimization

With respect to the facts that the real firefly system issophisticated and that the metaheuristics are approximationsof real systems three idealized rules are applied with the goalto enable algorithmrsquos implementation [33] (1) all fireflies areunisex so the attractions between fireflies do not depend ontheir sex (2) attractiveness of a firefly is directly proportionalto their brightness and the less brighter firefly will movetowards the brighter one Brightness increases as the distancebetween fireflies decreases (3) the brightness of a firefly isdetermined by the value of objective function For minimiza-tion problems brightness increases as the objective functionvalue decreases There are also other forms of brightnesswhich can be defined similar to fitness function in geneticalgorithms (GA) [6]

In the implementation of FA one of the most importantissues that should be considered is the formulation of attrac-tiveness For the sake of simplicity a good approximationis that the attractiveness of a firefly is determined by itsbrightness which depends on the encoded objective function

In the case of maximization problems the brightness ofa firefly at a particular location 119909 can be chosen as 119868(119909) sim

119891(119909) where 119868(119909) is the attractiveness and 119891(119909) is the value ofobjective function at this location Otherwise if the goal is tominimize function the following expression can be used

119868 (119909) =

1

119891 (119909) if 119891 (119909) gt 0

1 +1003816100381610038161003816119891 (119909)

1003816100381610038161003816 otherwise(26)

The variations of light intensity and attractiveness aremonotonically decreasing functions because as the lightintensity and the attractiveness decrease the distance fromthe source increases and vice versa This can be formulatedas [56]

119868 (119903) =1198680

1 + 1205741199032 (27)

where 119868(119903) is the light intensity 119903 is distance and 1198680is the light

intensity at the source Besides that the air also absorbs partof the light and the light becomes weaker Air absorption ismodeled by the light absorption coefficient 120574

In most FA implementations that can be found in theliterature survey the combined effect of both the inversesquare law and absorption can be approximated using thefollowing Gaussian form

119868 (119903) = 1198680119890minus1205741199032

(28)

Attractiveness 120573 of a firefly is relative because it dependson the distance between the firefly and the beholder Thusit varies with the distance 119903

119894119895between fireflies 119894 and 119895 The

attractiveness is direct proportional to fireflies light intensity(brightness) as shown in the following

120573 (119903) = 1205730119890minus1205741199032

(29)

where 1205730is the attractiveness at 119903 = 0 Equation (29) deter-

mines a characteristic distance Γ = 1radic120574 over which theattractiveness changes significantly from 120573

0to 1205730119890minus1

But in practical applications the above expression isusually replaced with

120573 (119903) =1205730

1 + 1205741199032 (30)

Main reason for this replacement is that the calculation ofexponential function in (29) demands much more computa-tional power than simple division in (30)

The movement of a firefly 119894 (its new position in iteration119905 + 1) towards the brighter and thus more attractive firefly 119895is calculated using

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (31)

where 1205730is attractiveness at 119903 = 0 120572 is randomization

parameter 120581 is random number drawn from uniform orGaussian distribution and 119903

119894119895is distance between fireflies 119894

and 119895 The positions of fireflies are updated sequentially bycomparing and updating each pair of them at every iteration

The distance between fireflies 119894 and 119895 is calculated usingCartesian distance form [56]

119903119894119895=10038171003817100381710038171003817119909119894minus 119909119895

10038171003817100381710038171003817= radic

119863

sum

119896=1

(119909119894119896minus 119909119895119896) (32)

where 119863 is the number of problem parameters For mostproblems 120573

0= 0 and 120572 isin [0 1] are adequate settings

The parameter 120574 has crucial impact on the convergencespeed of the algorithm This parameter shows the variationof attractiveness and in theory it has a value of [0 +infin) butin practice it is determined by the characteristic distance Γ ofthe system that is being optimized In most implementations120574 parameter varies between 001 and 100

There are two special cases of the FA and they are bothassociated with the value of 120574 as follows [33]

(i) if 120574 = 0 then 120573 = 1205730 That means that the air around

firefly is completely clear In this case 120573 is alwaysthe largest it could possibly be and fireflies advancetowards other fireflies with the largest possible stepsThe exploration-exploitation is out of balance becausethe exploitation is maximal while the exploration isminimal

(ii) if 120574 = infin then 120573 = 0 In this case there is a thick fogaround fireflies and they could not see each otherThemovement is performed in a random steps and explo-ration is more intensive with practically no exploi-tation at all

The pseudocode for the original FA is given as Algo-rithm 1

In the presented pseudocode 119878119873 is total number offireflies in the population 119868119873 is total number of algorithmrsquositerations and 119905 is the current iteration

The Scientific World Journal 7

Generate initial population of fireflies 119909119894 (119894 = 1 2 3 119878119873)

Light intensity 119868119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INwhile 119905 lt 119868119873 do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119895lt 119868119894then

Move firefly 119895 towards firefly 119894 in 119889 dimensionAttractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace the worst withbetter solution and update light intensity

end ifend for

end forRank all fireflies and find the current best

end while

Algorithm 1 Original firefly algorithm

4 Proposed mFA for the CCMV PortfolioProblem with Entropy Constraint

As mentioned in Section 1 we propose a modified fireflyalgorithm for cardinality constrained mean-variance portfo-lio optimization with entropy constraint

By analyzing FA we noticed that as most other swarmintelligence algorithms the pure version of the algorithmdeveloped for unconstrained problems exhibits some defi-ciencies when applied to constrained problems In the earlycycles of algorithmrsquos execution established balance betweenexploitation and exploration is not completely appropriatefor this class of problems During early phase explorationis not intensive enough However during late cycles whenFA was able to discover the right part of the search spacethe exploration is no longer needed To control whetherthe exploration will be triggered or not we introducedexploration breakpoint 119864119861119875 control parameter

In this section we show implementation details of ourmodified FA algorithm which we named mFA

41 Initialization Phase and Fitness Calculation At the initial-ization step FA generates random population of 119878119873 fireflies(artificial agents) using

119909119894119895= 119897119887119895+ rand (0 1) lowast (119906119887

119895minus 119897119887119895) (33)

where 119909119894119895

is the weight of the 119895th portfoliorsquos asset of the 119894thagent rand(0 1) is random number uniformly distributedbetween 0 and 1 and 119906119887

119895and 119897119887

119895are upper and lower weight

bounds of the 119895th asset respectivelyIf the initially generated value for the 119895th parameter of

the 119894th firefly does not fit in the scope [119897119887119895 119906119887119895] it is being

modified using the following expression

if (119909119894119895) gt 119906119887

119895 then 119909

119894119895= 119906119887119895

if (119909119894119895) lt 119897119887119895 then 119909

119894119895= 119897119887119895

(34)

Moreover in the initialization phase decision variables119911119894119895(119894 = 1 119878119873 119895 = 1 119873) are also initialized for

each firefly agent 119894 119873 is the number of potential assets inportfolio According to this each firefly is modeled using2lowast119873 dimensions 119911

119894is a binary vector with values 1 when an

asset is included in portfolio and 0 when it is excluded fromit

Decision variables are generated randomly by applying

119911119894119895=

1 if 120601 lt 05

0 if 120601 ge 05(35)

where 120601 is random real number between 0 and 1To guarantee the feasibility of solutions we used similar

arrangement algorithm as proposed in [1] The arrangementalgorithm is applied first time in the initialization phase

In the arrangement algorithm 119894 is the current solutionthat consists of 119876 the distinct set of 119870lowast

119894assets in the 119894th

solution 119911119894119895

is the decision variable of asset 119895 and 119909119894119895

isthe weight proportion for asset 119895 Arrangement algorithmpseudocode is shown as Algorithm 2

For the constraint sum119873119894=1

119909119894= 1 we set 120595 = sum

119895isin119876119909119894119895

and put 119909119894119895

= 119909119894119895120595 for all assets that satisfy 119895 isin 119876

The same approach for satisfying this constraint was usedin [1] To make sure that each assetrsquos proportion is withinpredefined lower and upper bounds 120576 and 120575 respectively weused 119894119891 119909

119894119895gt 120575119894119895

then 119909119894119895

= 120575119894 119895 and 119894119891 119909119894119895

lt 120576119894119895

then119909119894119895= 120576119894119895

We did not apply 119888-value based approach for addingand removing assets from the portfolio as in [1] Accordingto our experiments using 119888-value does not improve FAperformance It only increases computational complexity

In modified FA the fitness is employed to model theattractiveness of the fireflies Attractiveness is directly propor-tional to the fitness

After generating 119878119873 number of agents fitness value is cal-culated for each firefly in the population Fitness (brightness)is calculated as in the original FA implementation (26)

8 The Scientific World Journal

while 119870lowast119894lt 119870 do

select random asset 119895 such that 119895 notin 119876119911119894119895= 1 119876 = 119876 cup [119895] 119870

lowast

119894= 119870lowast

119894+ 1

end whilewhile 119870lowast

119894gt 119870 do

select random asset 119895 such that 119895 isin 119876119911119894119895= 1 119876 = 119876 minus [119895] 119870

lowast

119894= 119870lowast

119894minus 1

end whilewhile true do120579 = sum

119895isin119876

119909119894119895 119909119894119895=

119909119894119895

120595 120578 = sum

119895isin119876

max (0 119909119894119895minus 120575119894) 120601 = sum

119895isin119876

max (0 120578119895minus 119909119894119895)

if 120578 = 0 and 120601 = 0 thenexit algorithm

end iffor 119895 = 1 to119873 do

if 119911119894119895= 1 then

if 119909119894119895gt 120575119895then

119909119894119895= 120575119895

end ifif 119909119894119895lt 120576119895then

119909119894119895= 120576119895

end ifend if

end forend while

Algorithm 2 Arrangement algorithm

In the initialization phase for each firefly in the popu-lation constraint violation CV is being calculated CV is ameasure of how much the agents violate constraints in theproblem definition

CV119894= sum

119892119895(119909119894)gt0

119892119895(119909119894) +

119898

sum

119895=119902+1

ℎ119895(119909119894) (36)

CV calculation is necessary because it is later used forperforming selection based on Debrsquos method [57 58]

42 Firefly Movement The movement of a firefly 119894 towardsthe firefly that has a higher fitness 119895 is calculated as in theoriginal FA implementation [56]

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (37)

where 119909119894(119905 + 1) is new solution generated in iteration (119905 + 1)

1205730is attractiveness at 119903 = 0 120572 is randomization parameter

120581 is random number drawn from uniform or Gaussiandistribution and 119903

119894119895is distance between fireflies 119894 and 119895

Also when moving a firefly new decision variables arecalculated

119911119905+1

119894119896= round( 1

1 + 119890minus119911119905

119894119896+120601119894119895(119911

119905

119894119896minus119911119905

119895119896)minus 006) (38)

where 119911119905+1119894119896

is decision variable for the 119896th asset of the newsolution 119911

119894119896is a decision variable of the 119896th parameter of the

old solution and 119911119895119896

is decision variable of 119896th parameter ofthe brighter firefly 119895

It should be noticed that the decision variables in theemployed bee phase are generated differently than in theinitialization phase equation (35)

After the new 119894th solution is generated in exploitationprocess using (37) and (38) the winner between new 119909

119894(119905 + 1)

and old 119909119894(119905) solution is retained using the selection process

based on Debrsquos rules

43 Exploration As mentioned before we noticed insuffi-cient exploration power in the original FA implementationparticularly in early iterations of algorithmrsquos execution Inthis phase of algorithmrsquos execution exploitation-explorationbalance is not well established for this type of problemsThis balance was also discussed in [14] Thus we adoptedmechanism similar to scout bee with 119897119894119898119894119905 parameter fromthe ABC metaheuristic

We introduced parameter abandonment threshold (119860119879)that represents the allowed predetermined number of unsuc-cessful tries to improve particular solution When a potentialsolution (firefly) is stagnating (not being improved) for 119860119879iterations it is replaced by a new randomone using (33) (34)and (35) Hence fireflies that exploited exhausted solutionsare transformed into scouts that perform the explorationprocess The value of 119860119879 is empirically determined and willbe shown in the experimental section

Also during late iterations with the assumption thatthe right part of the search space has been found the

The Scientific World Journal 9

Generate initial population of fireflies 119909119894and 119911

119894(119894 = 1 2 3 119878119873) by using (33) and (35)

Apply arrangement algorithmLight intensity 119868

119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INCalculate fitness and CV for all fireflies using (26) and (36)Set initial values for 120572Set 119905 value to 0while 119905 lt IN do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119894lt 119868119895then

Move firefly 119894 towards firefly 119895 in 119889 dimension using (37) and (38)Attractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace worse with better solutionusing Debrsquos method and update light intensityif solution 119894 is not improved and 119905

119894lt 119864119861119875 then

119880119868119862119894increment by 1

else119880119868119862119894set to 0

end ifend if

end forend forif 119905 lt 119864119861119875 then

replace all agents whose UIC gt 119860119879 with random agents using (33)end ifApply arrangement algorithmRank all fireflies and find the current bestRecalculate values for 120572 using (39)

end while

Algorithm 3 Modified firefly algorithm

intensive exploration is not needed anymore In that case theexploration is not being triggered For this purpose we intro-duce new control parameter exploration breakpoint (119864119861119875)which controls whether the exploration will be triggeredThediscussion of this parameter is also given in experimentalsection

Also we should note that the parameter 120572 for FA searchprocess is being gradually decreased from its initial valueaccording to

120572 (119905) = (1 minus (1 minus ((10minus4

9)

1119868119873

))) lowast 120572 (119905 minus 1) (39)

where 119905 is the current iteration and 119868119873 is the maximum num-ber of iterations

Pseudocode of mFA is given as Algorithm 3 Someimplementationrsquos details are omitted for the sake of simplicity

In the pseudocode 119878119873 is total number of fireflies in thepopulation 119868119873 is total number of algorithmrsquos iterations and119905 is the current iteration As explained 119860119879 is the maximumnumber of unsuccessful attempts to improve particular solu-tion after which it will be considered exhausted and replacedby a new random solution

5 Algorithm Settings andExperimental Results

In this section we first present parameter settings which wereadjusted for testing purposes of our proposed mFA Thenwe show experimental results discussion and comparativeanalysis with other state-of-the-art algorithms

51 Parameter Settings To test the performance and robust-ness of our modified FA we set algorithm parameters similarto [1] Number of firefly agents in the population 119878119873 iscalculated by employing the following expression

119878119873 = 20radic119873 (40)

where119873 is the number of potential assets in portfolioThe value of maximum number of iterations 119868119873 in one

algorithmrsquos run is set according to

119868119873 =1000 lowast 119873

119878119873 (41)

As mentioned in Section 4 to improve the explorationpower of the original FA we introduced parameter 119860119879 withcorresponding counters 119880119868119862

119894(119894 = 1 2 119878119873) that count

howmany times a particular firefly agent unsuccessfully tried

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 7: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

The Scientific World Journal 7

Generate initial population of fireflies 119909119894 (119894 = 1 2 3 119878119873)

Light intensity 119868119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INwhile 119905 lt 119868119873 do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119895lt 119868119894then

Move firefly 119895 towards firefly 119894 in 119889 dimensionAttractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace the worst withbetter solution and update light intensity

end ifend for

end forRank all fireflies and find the current best

end while

Algorithm 1 Original firefly algorithm

4 Proposed mFA for the CCMV PortfolioProblem with Entropy Constraint

As mentioned in Section 1 we propose a modified fireflyalgorithm for cardinality constrained mean-variance portfo-lio optimization with entropy constraint

By analyzing FA we noticed that as most other swarmintelligence algorithms the pure version of the algorithmdeveloped for unconstrained problems exhibits some defi-ciencies when applied to constrained problems In the earlycycles of algorithmrsquos execution established balance betweenexploitation and exploration is not completely appropriatefor this class of problems During early phase explorationis not intensive enough However during late cycles whenFA was able to discover the right part of the search spacethe exploration is no longer needed To control whetherthe exploration will be triggered or not we introducedexploration breakpoint 119864119861119875 control parameter

In this section we show implementation details of ourmodified FA algorithm which we named mFA

41 Initialization Phase and Fitness Calculation At the initial-ization step FA generates random population of 119878119873 fireflies(artificial agents) using

119909119894119895= 119897119887119895+ rand (0 1) lowast (119906119887

119895minus 119897119887119895) (33)

where 119909119894119895

is the weight of the 119895th portfoliorsquos asset of the 119894thagent rand(0 1) is random number uniformly distributedbetween 0 and 1 and 119906119887

119895and 119897119887

119895are upper and lower weight

bounds of the 119895th asset respectivelyIf the initially generated value for the 119895th parameter of

the 119894th firefly does not fit in the scope [119897119887119895 119906119887119895] it is being

modified using the following expression

if (119909119894119895) gt 119906119887

119895 then 119909

119894119895= 119906119887119895

if (119909119894119895) lt 119897119887119895 then 119909

119894119895= 119897119887119895

(34)

Moreover in the initialization phase decision variables119911119894119895(119894 = 1 119878119873 119895 = 1 119873) are also initialized for

each firefly agent 119894 119873 is the number of potential assets inportfolio According to this each firefly is modeled using2lowast119873 dimensions 119911

119894is a binary vector with values 1 when an

asset is included in portfolio and 0 when it is excluded fromit

Decision variables are generated randomly by applying

119911119894119895=

1 if 120601 lt 05

0 if 120601 ge 05(35)

where 120601 is random real number between 0 and 1To guarantee the feasibility of solutions we used similar

arrangement algorithm as proposed in [1] The arrangementalgorithm is applied first time in the initialization phase

In the arrangement algorithm 119894 is the current solutionthat consists of 119876 the distinct set of 119870lowast

119894assets in the 119894th

solution 119911119894119895

is the decision variable of asset 119895 and 119909119894119895

isthe weight proportion for asset 119895 Arrangement algorithmpseudocode is shown as Algorithm 2

For the constraint sum119873119894=1

119909119894= 1 we set 120595 = sum

119895isin119876119909119894119895

and put 119909119894119895

= 119909119894119895120595 for all assets that satisfy 119895 isin 119876

The same approach for satisfying this constraint was usedin [1] To make sure that each assetrsquos proportion is withinpredefined lower and upper bounds 120576 and 120575 respectively weused 119894119891 119909

119894119895gt 120575119894119895

then 119909119894119895

= 120575119894 119895 and 119894119891 119909119894119895

lt 120576119894119895

then119909119894119895= 120576119894119895

We did not apply 119888-value based approach for addingand removing assets from the portfolio as in [1] Accordingto our experiments using 119888-value does not improve FAperformance It only increases computational complexity

In modified FA the fitness is employed to model theattractiveness of the fireflies Attractiveness is directly propor-tional to the fitness

After generating 119878119873 number of agents fitness value is cal-culated for each firefly in the population Fitness (brightness)is calculated as in the original FA implementation (26)

8 The Scientific World Journal

while 119870lowast119894lt 119870 do

select random asset 119895 such that 119895 notin 119876119911119894119895= 1 119876 = 119876 cup [119895] 119870

lowast

119894= 119870lowast

119894+ 1

end whilewhile 119870lowast

119894gt 119870 do

select random asset 119895 such that 119895 isin 119876119911119894119895= 1 119876 = 119876 minus [119895] 119870

lowast

119894= 119870lowast

119894minus 1

end whilewhile true do120579 = sum

119895isin119876

119909119894119895 119909119894119895=

119909119894119895

120595 120578 = sum

119895isin119876

max (0 119909119894119895minus 120575119894) 120601 = sum

119895isin119876

max (0 120578119895minus 119909119894119895)

if 120578 = 0 and 120601 = 0 thenexit algorithm

end iffor 119895 = 1 to119873 do

if 119911119894119895= 1 then

if 119909119894119895gt 120575119895then

119909119894119895= 120575119895

end ifif 119909119894119895lt 120576119895then

119909119894119895= 120576119895

end ifend if

end forend while

Algorithm 2 Arrangement algorithm

In the initialization phase for each firefly in the popu-lation constraint violation CV is being calculated CV is ameasure of how much the agents violate constraints in theproblem definition

CV119894= sum

119892119895(119909119894)gt0

119892119895(119909119894) +

119898

sum

119895=119902+1

ℎ119895(119909119894) (36)

CV calculation is necessary because it is later used forperforming selection based on Debrsquos method [57 58]

42 Firefly Movement The movement of a firefly 119894 towardsthe firefly that has a higher fitness 119895 is calculated as in theoriginal FA implementation [56]

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (37)

where 119909119894(119905 + 1) is new solution generated in iteration (119905 + 1)

1205730is attractiveness at 119903 = 0 120572 is randomization parameter

120581 is random number drawn from uniform or Gaussiandistribution and 119903

119894119895is distance between fireflies 119894 and 119895

Also when moving a firefly new decision variables arecalculated

119911119905+1

119894119896= round( 1

1 + 119890minus119911119905

119894119896+120601119894119895(119911

119905

119894119896minus119911119905

119895119896)minus 006) (38)

where 119911119905+1119894119896

is decision variable for the 119896th asset of the newsolution 119911

119894119896is a decision variable of the 119896th parameter of the

old solution and 119911119895119896

is decision variable of 119896th parameter ofthe brighter firefly 119895

It should be noticed that the decision variables in theemployed bee phase are generated differently than in theinitialization phase equation (35)

After the new 119894th solution is generated in exploitationprocess using (37) and (38) the winner between new 119909

119894(119905 + 1)

and old 119909119894(119905) solution is retained using the selection process

based on Debrsquos rules

43 Exploration As mentioned before we noticed insuffi-cient exploration power in the original FA implementationparticularly in early iterations of algorithmrsquos execution Inthis phase of algorithmrsquos execution exploitation-explorationbalance is not well established for this type of problemsThis balance was also discussed in [14] Thus we adoptedmechanism similar to scout bee with 119897119894119898119894119905 parameter fromthe ABC metaheuristic

We introduced parameter abandonment threshold (119860119879)that represents the allowed predetermined number of unsuc-cessful tries to improve particular solution When a potentialsolution (firefly) is stagnating (not being improved) for 119860119879iterations it is replaced by a new randomone using (33) (34)and (35) Hence fireflies that exploited exhausted solutionsare transformed into scouts that perform the explorationprocess The value of 119860119879 is empirically determined and willbe shown in the experimental section

Also during late iterations with the assumption thatthe right part of the search space has been found the

The Scientific World Journal 9

Generate initial population of fireflies 119909119894and 119911

119894(119894 = 1 2 3 119878119873) by using (33) and (35)

Apply arrangement algorithmLight intensity 119868

119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INCalculate fitness and CV for all fireflies using (26) and (36)Set initial values for 120572Set 119905 value to 0while 119905 lt IN do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119894lt 119868119895then

Move firefly 119894 towards firefly 119895 in 119889 dimension using (37) and (38)Attractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace worse with better solutionusing Debrsquos method and update light intensityif solution 119894 is not improved and 119905

119894lt 119864119861119875 then

119880119868119862119894increment by 1

else119880119868119862119894set to 0

end ifend if

end forend forif 119905 lt 119864119861119875 then

replace all agents whose UIC gt 119860119879 with random agents using (33)end ifApply arrangement algorithmRank all fireflies and find the current bestRecalculate values for 120572 using (39)

end while

Algorithm 3 Modified firefly algorithm

intensive exploration is not needed anymore In that case theexploration is not being triggered For this purpose we intro-duce new control parameter exploration breakpoint (119864119861119875)which controls whether the exploration will be triggeredThediscussion of this parameter is also given in experimentalsection

Also we should note that the parameter 120572 for FA searchprocess is being gradually decreased from its initial valueaccording to

120572 (119905) = (1 minus (1 minus ((10minus4

9)

1119868119873

))) lowast 120572 (119905 minus 1) (39)

where 119905 is the current iteration and 119868119873 is the maximum num-ber of iterations

Pseudocode of mFA is given as Algorithm 3 Someimplementationrsquos details are omitted for the sake of simplicity

In the pseudocode 119878119873 is total number of fireflies in thepopulation 119868119873 is total number of algorithmrsquos iterations and119905 is the current iteration As explained 119860119879 is the maximumnumber of unsuccessful attempts to improve particular solu-tion after which it will be considered exhausted and replacedby a new random solution

5 Algorithm Settings andExperimental Results

In this section we first present parameter settings which wereadjusted for testing purposes of our proposed mFA Thenwe show experimental results discussion and comparativeanalysis with other state-of-the-art algorithms

51 Parameter Settings To test the performance and robust-ness of our modified FA we set algorithm parameters similarto [1] Number of firefly agents in the population 119878119873 iscalculated by employing the following expression

119878119873 = 20radic119873 (40)

where119873 is the number of potential assets in portfolioThe value of maximum number of iterations 119868119873 in one

algorithmrsquos run is set according to

119868119873 =1000 lowast 119873

119878119873 (41)

As mentioned in Section 4 to improve the explorationpower of the original FA we introduced parameter 119860119879 withcorresponding counters 119880119868119862

119894(119894 = 1 2 119878119873) that count

howmany times a particular firefly agent unsuccessfully tried

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 8: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

8 The Scientific World Journal

while 119870lowast119894lt 119870 do

select random asset 119895 such that 119895 notin 119876119911119894119895= 1 119876 = 119876 cup [119895] 119870

lowast

119894= 119870lowast

119894+ 1

end whilewhile 119870lowast

119894gt 119870 do

select random asset 119895 such that 119895 isin 119876119911119894119895= 1 119876 = 119876 minus [119895] 119870

lowast

119894= 119870lowast

119894minus 1

end whilewhile true do120579 = sum

119895isin119876

119909119894119895 119909119894119895=

119909119894119895

120595 120578 = sum

119895isin119876

max (0 119909119894119895minus 120575119894) 120601 = sum

119895isin119876

max (0 120578119895minus 119909119894119895)

if 120578 = 0 and 120601 = 0 thenexit algorithm

end iffor 119895 = 1 to119873 do

if 119911119894119895= 1 then

if 119909119894119895gt 120575119895then

119909119894119895= 120575119895

end ifif 119909119894119895lt 120576119895then

119909119894119895= 120576119895

end ifend if

end forend while

Algorithm 2 Arrangement algorithm

In the initialization phase for each firefly in the popu-lation constraint violation CV is being calculated CV is ameasure of how much the agents violate constraints in theproblem definition

CV119894= sum

119892119895(119909119894)gt0

119892119895(119909119894) +

119898

sum

119895=119902+1

ℎ119895(119909119894) (36)

CV calculation is necessary because it is later used forperforming selection based on Debrsquos method [57 58]

42 Firefly Movement The movement of a firefly 119894 towardsthe firefly that has a higher fitness 119895 is calculated as in theoriginal FA implementation [56]

119909119894(119905 + 1) = 119909

119894(119905) + 120573

0119903minus1205741199032

119894119895 (119909119895minus 119909119894) + 120572 (120581 minus 05) (37)

where 119909119894(119905 + 1) is new solution generated in iteration (119905 + 1)

1205730is attractiveness at 119903 = 0 120572 is randomization parameter

120581 is random number drawn from uniform or Gaussiandistribution and 119903

119894119895is distance between fireflies 119894 and 119895

Also when moving a firefly new decision variables arecalculated

119911119905+1

119894119896= round( 1

1 + 119890minus119911119905

119894119896+120601119894119895(119911

119905

119894119896minus119911119905

119895119896)minus 006) (38)

where 119911119905+1119894119896

is decision variable for the 119896th asset of the newsolution 119911

119894119896is a decision variable of the 119896th parameter of the

old solution and 119911119895119896

is decision variable of 119896th parameter ofthe brighter firefly 119895

It should be noticed that the decision variables in theemployed bee phase are generated differently than in theinitialization phase equation (35)

After the new 119894th solution is generated in exploitationprocess using (37) and (38) the winner between new 119909

119894(119905 + 1)

and old 119909119894(119905) solution is retained using the selection process

based on Debrsquos rules

43 Exploration As mentioned before we noticed insuffi-cient exploration power in the original FA implementationparticularly in early iterations of algorithmrsquos execution Inthis phase of algorithmrsquos execution exploitation-explorationbalance is not well established for this type of problemsThis balance was also discussed in [14] Thus we adoptedmechanism similar to scout bee with 119897119894119898119894119905 parameter fromthe ABC metaheuristic

We introduced parameter abandonment threshold (119860119879)that represents the allowed predetermined number of unsuc-cessful tries to improve particular solution When a potentialsolution (firefly) is stagnating (not being improved) for 119860119879iterations it is replaced by a new randomone using (33) (34)and (35) Hence fireflies that exploited exhausted solutionsare transformed into scouts that perform the explorationprocess The value of 119860119879 is empirically determined and willbe shown in the experimental section

Also during late iterations with the assumption thatthe right part of the search space has been found the

The Scientific World Journal 9

Generate initial population of fireflies 119909119894and 119911

119894(119894 = 1 2 3 119878119873) by using (33) and (35)

Apply arrangement algorithmLight intensity 119868

119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INCalculate fitness and CV for all fireflies using (26) and (36)Set initial values for 120572Set 119905 value to 0while 119905 lt IN do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119894lt 119868119895then

Move firefly 119894 towards firefly 119895 in 119889 dimension using (37) and (38)Attractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace worse with better solutionusing Debrsquos method and update light intensityif solution 119894 is not improved and 119905

119894lt 119864119861119875 then

119880119868119862119894increment by 1

else119880119868119862119894set to 0

end ifend if

end forend forif 119905 lt 119864119861119875 then

replace all agents whose UIC gt 119860119879 with random agents using (33)end ifApply arrangement algorithmRank all fireflies and find the current bestRecalculate values for 120572 using (39)

end while

Algorithm 3 Modified firefly algorithm

intensive exploration is not needed anymore In that case theexploration is not being triggered For this purpose we intro-duce new control parameter exploration breakpoint (119864119861119875)which controls whether the exploration will be triggeredThediscussion of this parameter is also given in experimentalsection

Also we should note that the parameter 120572 for FA searchprocess is being gradually decreased from its initial valueaccording to

120572 (119905) = (1 minus (1 minus ((10minus4

9)

1119868119873

))) lowast 120572 (119905 minus 1) (39)

where 119905 is the current iteration and 119868119873 is the maximum num-ber of iterations

Pseudocode of mFA is given as Algorithm 3 Someimplementationrsquos details are omitted for the sake of simplicity

In the pseudocode 119878119873 is total number of fireflies in thepopulation 119868119873 is total number of algorithmrsquos iterations and119905 is the current iteration As explained 119860119879 is the maximumnumber of unsuccessful attempts to improve particular solu-tion after which it will be considered exhausted and replacedby a new random solution

5 Algorithm Settings andExperimental Results

In this section we first present parameter settings which wereadjusted for testing purposes of our proposed mFA Thenwe show experimental results discussion and comparativeanalysis with other state-of-the-art algorithms

51 Parameter Settings To test the performance and robust-ness of our modified FA we set algorithm parameters similarto [1] Number of firefly agents in the population 119878119873 iscalculated by employing the following expression

119878119873 = 20radic119873 (40)

where119873 is the number of potential assets in portfolioThe value of maximum number of iterations 119868119873 in one

algorithmrsquos run is set according to

119868119873 =1000 lowast 119873

119878119873 (41)

As mentioned in Section 4 to improve the explorationpower of the original FA we introduced parameter 119860119879 withcorresponding counters 119880119868119862

119894(119894 = 1 2 119878119873) that count

howmany times a particular firefly agent unsuccessfully tried

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 9: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

The Scientific World Journal 9

Generate initial population of fireflies 119909119894and 119911

119894(119894 = 1 2 3 119878119873) by using (33) and (35)

Apply arrangement algorithmLight intensity 119868

119894at point 119909

119894is defined by 119891(119909)

Define light absorption coefficient 120574Define number of iterations INCalculate fitness and CV for all fireflies using (26) and (36)Set initial values for 120572Set 119905 value to 0while 119905 lt IN do

for 119894 = 1 to SN dofor 119895 = 1 to 119894 do

if 119868119894lt 119868119895then

Move firefly 119894 towards firefly 119895 in 119889 dimension using (37) and (38)Attractiveness varies with distance 119903 via exp[minus120574119903]Evaluate new solution replace worse with better solutionusing Debrsquos method and update light intensityif solution 119894 is not improved and 119905

119894lt 119864119861119875 then

119880119868119862119894increment by 1

else119880119868119862119894set to 0

end ifend if

end forend forif 119905 lt 119864119861119875 then

replace all agents whose UIC gt 119860119879 with random agents using (33)end ifApply arrangement algorithmRank all fireflies and find the current bestRecalculate values for 120572 using (39)

end while

Algorithm 3 Modified firefly algorithm

intensive exploration is not needed anymore In that case theexploration is not being triggered For this purpose we intro-duce new control parameter exploration breakpoint (119864119861119875)which controls whether the exploration will be triggeredThediscussion of this parameter is also given in experimentalsection

Also we should note that the parameter 120572 for FA searchprocess is being gradually decreased from its initial valueaccording to

120572 (119905) = (1 minus (1 minus ((10minus4

9)

1119868119873

))) lowast 120572 (119905 minus 1) (39)

where 119905 is the current iteration and 119868119873 is the maximum num-ber of iterations

Pseudocode of mFA is given as Algorithm 3 Someimplementationrsquos details are omitted for the sake of simplicity

In the pseudocode 119878119873 is total number of fireflies in thepopulation 119868119873 is total number of algorithmrsquos iterations and119905 is the current iteration As explained 119860119879 is the maximumnumber of unsuccessful attempts to improve particular solu-tion after which it will be considered exhausted and replacedby a new random solution

5 Algorithm Settings andExperimental Results

In this section we first present parameter settings which wereadjusted for testing purposes of our proposed mFA Thenwe show experimental results discussion and comparativeanalysis with other state-of-the-art algorithms

51 Parameter Settings To test the performance and robust-ness of our modified FA we set algorithm parameters similarto [1] Number of firefly agents in the population 119878119873 iscalculated by employing the following expression

119878119873 = 20radic119873 (40)

where119873 is the number of potential assets in portfolioThe value of maximum number of iterations 119868119873 in one

algorithmrsquos run is set according to

119868119873 =1000 lowast 119873

119878119873 (41)

As mentioned in Section 4 to improve the explorationpower of the original FA we introduced parameter 119860119879 withcorresponding counters 119880119868119862

119894(119894 = 1 2 119878119873) that count

howmany times a particular firefly agent unsuccessfully tried

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 10: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

10 The Scientific World Journal

120582 = 0

while 120582 le 1 do119878119873 = 20radic119873

Set portfolio problem parameters119870 120576 and 120575InitializationPhase()ArrangementAlgorithm()FitnessCalculation()Set UIC to 0 and calculate AT value according to (42)Set initial values for 120592 and 120572119868119873 =

1000119873

119878119873

for 119905 = 1 to IN doFirefly movementApply Selection between old and new solution using Deb rulesExploration phase (if necessary)ArrangementAlgorithm()Rank all fireflies and find the current bestRecalculate values for 120592 and 120572119905 + +

end for120582 = 120582 + Δ120582

end while

Algorithm 4 Modified firefly with parameters

improvement When the value of 119880119868119862119894reaches predeter-

mined abandonment threshold 119860119879 corresponding agent isbeing replaced by a random agent 119860119879 is determined by thevalues of 119878119873 and 119868119873 like in [14]

119860119879 =119868119873

119878119873=(1000 lowast 119873) 119878119873

20radic119873

(42)

Exploration breakpoint 119864119861119875 controls whether or not theexploration will be triggered According to our experimentaltests modified FA generates worse results if the explorationis triggered during late iterations In most of the runs thealgorithm is able to find a proper part of the search spaceduring early cycles and exploration during late cycles is notuseful To the contrary it just relaxes the exploitation 119864119861119875 isempirically set to 1198681198732

FA search process parameter 120572 is set to start at 05 but itis being gradually decreased from its initial value accordingto (39)

The promising approaches for handling equality con-straints include dynamic self-adaptive tolerance adjustment[59] When this tolerance is included the exploration isenhanced by exploring a larger space

In modified FA implementation besides the adoptionof arrangement algorithm we used (4) and violation limit120592 for handling constraints Good experimental results areobtained by starting with a relatively large 120592 value whichis gradually decreasing through the algorithmrsquos iterationsIt is very important to chose the right value for 120592 If thechosen value is too small the algorithmmay not find feasiblesolutions and otherwise the results may be far from thefeasible region [14]

We used the following dynamic settings for the 120592

] (119905 + 1) =] (119905)119889119890119888

(43)

where 119905 is the current generation and 119889119890119888 is a value slightlylarger than 1 For handling equality constraints we set initialvalue for 120592 to 10 119889119890119888 to 1001 and the threshold for 120592 to 00001like in [3]

For generating heuristics efficient frontier we used 120585 = 51

different120582 valuesThus we setΔ120582 to 002 because120582 in the firstalgorithmrsquos run is 0 and in the last is 1

We also set number of assets that will be included inportfolio 119870 to 10 lower assetrsquos weight 120576 to 001 and upperassetrsquos weight 120575 to 1

Since the entropy lower bound depends on the number ofassets that will be included in portfolio we set 119871

119864in the range

of [0 ln 10]We present again short modified FA pseudocode as Algo-

rithm 4 but this time with the emphasis on the parametersettings

For making better distinction between parameters wedivided algorithm parameters into four groups modified FAglobal control parameters FA search parameters portfolioparameters and constraint-handling parameters

Parameters are summarized in Table 1

52 Experimental Results and Comparative Analysis In thissubsection we show the results obtained when search-ing the general efficient frontier that provides the solu-tion for the problem formulated in (21)ndash(25) The testdata were downloaded from httppeoplebrunelacuksimmastjjbjeborlibportinfohtml

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 11: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

The Scientific World Journal 11

Table 1 Parameters

Parameter ValueModified FA global control parameters

Number offireflies-solutions (SN) Depends on119873

Number of iterations (IN) Depends on SNAbandonment threshold(AT) Depends on SN and IN

Exploration breakpoint(EBP) Depends on IN

FA search parametersInitial value forrandomization parameter 120572 05

Attractiveness at 119903 = 0 1205730

02

Absorption coefficient 120574 10Portfolio parameters

Number of potentialsecurities (119873) Depends on the problem

Number of assets inportfolio (119870) 10

Initial value of risk aversion(120582) 0

Different 120582 values (120585) 51

Lower assetrsquos weight (120576) 001

Upper assetrsquos weight (120575) 10Lower bound of entropy(119871119864) [0 ln119870]

Constraint-handling parametersInitial violation tolerance(120592) 10

Decrement (dec) 1002

Benchmark data refers to the weekly stock prices fromMarch 1992 to September 1997 for the indexes theHongKongHang Seng with 31 assets the German Dax 100 with 85 assetsthe British FTSE 100 with 89 assets the US SampP 100 with 98assets and the Japanese Nikkei with 225 assets

We adapted test data and stored it in Excel spreadsheetsFor all indexes we used the following data mean returnstandard deviation of return for each asset and correlationfor each possible pair of assets Also for generating standardefficiency frontier we used mean return and variance ofreturn for each security

Since 119878119873 119872119862119873 and 119860119879 parameters depend on theproblem size 119873 (number of securities in the test) we showexact values used for all indexes (tests) in Table 2 Formularesults are rounded to the closest integer values

Lower bound for entropy for all benchmarks set is in therange between 0 and ln 10 because 119870 is set to 10 for all testcases

We conducted tests on Intel CoreTM i7-4770K processor4GHz with 16GB of RAM memory Windows 7 x64Ultimate 64 operating system and Visual Studio 2012 withNET 45 Framework

Table 2 Benchmark specific parameters

Parameter ValueHang Seng index with 31 assets

Number of fireflies-solutions (SN) 111Number of iterations (IN) 279Abandonment threshold (AT) 3Exploration breakpoint (EBP) 140

DAX 100 index with 85 assetsNumber of fireflies-solutions (SN) 185Number of iterations (IN) 459Abandonment threshold (AT) 3Exploration breakpoint (EBP) 230

FTSE 100 index with 89 assetsNumber of fireflies-solutions (SN) 189Number of iterations (IN) 479Abandonment threshold (AT) 3Exploration breakpoint (EBP) 240

SampP 100 index with 98 assetsNumber of fireflies-solutions (SN) 198Number of iterations (IN) 494Abandonment threshold (AT) 3Exploration breakpoint (EBP) 247

Nikkei index with 225 assetsNumber of fireflies-solutions (SN) 300Number of iterations (IN) 750Abandonment threshold (AT) 3Exploration breakpoint (EBP) 375

When sets of Pareto optimal portfolios obtained withmodified FA are taken heuristic efficient frontier can betraced In this paper we compare the standard efficientfrontiers for five real-world benchmark sets mentioned abovewith the heuristic efficient frontier for the same data set Forcomparison of standard and heuristic efficiency frontier weuse mean Euclidean distance variance of return error andmean return error as in [1] We also give the execution timeof modified FA for each benchmark on our computer systemplatform

For calculation purposes of mean Euclidean distancelet the pair (V119904

119894 119903119904

119894) = (119894 = 1 2 3 2000) denote the

variance andmean return of the point in the standard efficientfrontier and the pair (Vℎ

119895 119903ℎ

119895) = (119895 = 1 2 3 120585) represents

the variance and mean return of the point in the heuristicefficient frontier Then the index 119894

119895of the closest standard

efficiency frontier point to the heuristic efficiency frontierpoint denoted as (V119904

119894119895 119903119904

119894119895) is calculated using Euclidean

distance by

119894119895= arg min119894=122000

(radic(V119904119894minus Vℎ119895)2

+ (119903119904

119894minus 119903ℎ

119895)2

)

119895 = 1 2 3 120585

(44)

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 12: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

12 The Scientific World Journal

Using (44) mean Euclidean distance is defined as

sum120585

119895=1radic(V119904119894119895minus Vℎ119895)2

+ (119903119904

119894119895minus 119903ℎ

119895)2

120585

(45)

In addition to mean Euclidean distance we used twoother measures to test modified FA variance of return errorand mean return error

Variance of return error is defined as

(

120585

sum

119895=1

10038161003816100381610038161003816V119904119894119895minus Vℎ119895

10038161003816100381610038161003816

Vℎ119895

)1

120585 (46)

Mean return error is calculated as

(

120585

sum

119895=1

10038161003816100381610038161003816119903119904

119894119895minus 119903ℎ

119895

10038161003816100381610038161003816

119903ℎ

119895

)1

120585 (47)

For testing purposes we conducted three experimentsIn the first experiment we compared mFA with the originalFA for CCMV problem with entropy constraint Secondexperiment refers to comparative analysis between mFAfor CCMV problem with and without entropy constraintFinally in the third experiment we perform comparativeanalysis between our modified mFA and other state-of-the-art metaheuristics We compared our proposed algorithm toCurarsquos PSO [1] and also to GA TS and SA indirectly from[23]

We first wanted to analyze how our mFA compares tothe original FA when optimizing CCMV portfolio modelwith entropy constraint Thus we also implemented orig-inal FA for this purpose We compared mean Euclideandistance variance of return error and mean return errorThese performance indicators were described above We alsocalculated computational time for both algorithmsThis timeis comparable since the same computer platformwas used fortesting both original FA and mFAThis comparison is shownin Table 3 For better distinction between indicator values wemarked better results in bold

As can be seen fromTable 3mFAobtains better results foralmost all benchmarks Only for variance of return error andmean return error indicators for119865119879119878119864100 index test originalFA managed to achieve better values For this benchmarkexploration in early iterations is unnecessary because thealgorithm quickly converges to the right part of the searchspace and the firefly agents are being wasted on exploration

All three indicators mean Euclidean distance varianceof return error and mean return error are significantlybetter for mFA tests for 119867119886119899119892119878119890119899119892 DAX100 SampP100 and119873119894119896119896119890119894 indexes SincemFAutilizes exploration at early cyclescomputation time for all tests is worse (higher) than for theoriginal FA implementation

In the second experiment we compared our mFA forCCMVproblemwith andwithout entropy constraint to showhow the entropy constraint influences the results CCMVformulation without entropy constraint is defined in (21)ndash(24)

According to the results presented in Table 4 it is clearthat the entropy constraint slightly effects the portfoliorsquosperformance In the CCMV optimization with entropy con-straint for 119867119886119899119892119878119890119899119892 and SampP tests mean Euclidean dis-tance is slightly better so the portfolio is better diversified Forother three tests the results obtained for this indicator are thesame Also for 119867119886119899119892119878119890119899119892 DAX100 119865119879119878119864100 and SampP100indexes optimization of the model with entropy gains bettervariance of return error and mean return error values Onlyfor119873119894119896119896119890119894 tests those indicators have better value for CCMVmodel optimization without entropy constraint Since thealgorithm takes extra time to calculate the entropy constraintexecution time for CCMV with entropy is higher for all testsexcept 119867119886119899119892119878119890119899119892 because this benchmark incorporates lesssecurities than the other benchmarks

The implementation of metaheuristics for CCMV port-folio model with entropy constrained could not be found inthe literature Thus in the third experiment we comparedour mFA approach with metaheuristics for CCMV portfolioformulation which did not employ entropy This model isdefined by (21)ndash(24) We note that this test is not objectiveindicator of mFArsquos effectiveness compared to the other algo-rithms

We compared mFA with tabu search (TS) genetic algo-rithm (GA) simulated annealing (SA) from [23] and PSOfrom [1] for the same set of benchmark data As in thefirst two experiments for performance indicators we usedmean Euclidean distance variance of return error and meanreturn error Parameter settings for our mFA are given inTables 1 and 2 and are comparable to parameters for otherfour compared algorithms that can be found in [1 23] Wealso give computational time for mFA but those results areincomparable with results for other metaheuristics becausewe used different computer platform and portfolio model Inexperiments in [1] PentiumM 213GHz computer with 1 GBRAM was used In the results table best obtained results ofall five heuristics are printed bold

Other metaheuristic implementations for CCMV port-folio problem such as modified ABC [29] and hybrid ABC(HABC) [41] that have similar performance can be found inthe literature

If we consider that the optimization of CCMV withentropy constraint obtains only slightly better results thanoptimization of CCMVmodel without entropy in Table 4 theexperimental results in Table 5 could be used for comparisonof the performance ofmFAwith othermetaheuristics in somesense

The experimental results presented in Table 5 prove thatnone of the four algorithms which we used for comparisonshas distinct advantages but that on average mFA is betterapproach than other four metaheuristics

mFA obtains better (smaller) mean Euclidean distancefor all five benchmark sets In 119867119886119899119892119878119890119899119892 and 119865119879119878119864100

benchmarks mFA is better than all four algorithms for allthree indicators mean Euclidean distance variance of returnerror and mean return error For those benchmarks mFAwas able to approximate the standard efficient frontier withthe smallest mean return and variance of return error andunder the same risk values

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 13: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

The Scientific World Journal 13

Table 3 Experimental results of FA and mFA for CCMVmodel

Index 119873 Performance indicators FA mFA

Hang Seng 31

Mean Euclidean distance 00006 00003Variance of return error () 17092 12387

Mean return error () 07172 04715Execution time 18 20

DAX 100 85

Mean Euclidean distance 00032 00009Variance of return error () 73892 72569

Mean return error () 14052 13786Execution time 67 71

FTSE 100 89

Mean Euclidean distance 00005 00004Variance of return error () 26391 27085

Mean return error () 03025 03121Execution time 81 94

SampP 100 98

Mean Euclidean distance 00011 00003Variance of return error () 39829 36026

Mean return error () 10025 08993Execution time 129 148

Nikkei 225

Mean Euclidean distance 00001 00000Variance of return error () 17834 12015

Mean return error () 07283 04892Execution time 335 367

Table 4 Experimental results of mFA for CCMVmodel with and without entropy constraint

Index 119873 Performance indicators mFA for CCMV mFA for CCMV with entropy

Hang Seng 31

Mean Euclidean distance 00004 00003Variance of return error () 12452 12387

Mean return error () 04897 04715Execution time 20 20

DAX 100 85

Mean Euclidean distance 00009 00009Variance of return error () 72708 72569

Mean return error () 13801 13786Execution time 70 71

FTSE 100 89

Mean Euclidean distance 00004 00004Variance of return error () 27236 27085

Mean return error () 03126 03121Execution time 92 94

SampP 100 98

Mean Euclidean distance 00004 00003Variance of return error () 36135 36026

Mean return error () 08997 08993Execution time 146 148

Nikkei 225

Mean Euclidean distance 00000 00000Variance of return error () 11927 12015

Mean return error () 0464 04892Execution time 360 367

Second best algorithm shown in Table 5 is GA whichobtains best mean return error and variance of return errorin DAX100 and SampP100 tests respectively TS shows bestperformance for mean return error indicator in SampP100benchmark SA for mean return error in 119873119894119896119896119890119894 test while

PSO proves to be most robust for variance of return error inDAX100 index

From the presented analysis it can be concluded that ourapproach obtained results for CCMV portfolio optimizationproblem that can be more valuable for the investors mFArsquos

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 14: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

14 The Scientific World Journal

Table 5 Experimental results for five metaheuristics

Index 119873 Performance indicators GA TS SA PSO mFA

Hang Seng 31

Mean Euclidean distance 00040 00040 00040 00049 00003Variance of return error () 16441 16578 16628 22421 12387

Mean return error () 06072 06107 06238 07427 04715Execution time 18 9 10 34 20

DAX 100 85

Mean Euclidean distance 00076 00082 00078 00090 00009Variance of return error () 72180 90309 85485 68588 72569

Mean return error () 12791 19078 12817 15885 13786Execution time 99 42 52 179 71

FTSE 100 89

Mean Euclidean distance 00020 00021 00021 00022 00004Variance of return error () 28660 40123 38205 30596 27085

Mean return error () 03277 03298 03304 03640 03121Execution time 106 42 55 190 94

SampP 100 98

Mean Euclidean distance 00041 00041 00041 00052 00003Variance of return error () 34802 57139 54247 39136 36026

Mean return error () 12258 07125 08416 14040 08993Execution time 126 51 66 214 148

Nikkei 225

Mean Euclidean distance 00093 00010 00010 00019 00000Variance of return error () 12056 12431 12017 24274 12015

Mean return error () 53266 04207 04126 07997 04892Execution time 742 234 286 919 367

results are more accurate and the generated investmentstrategy is able to more efficiently diversify the risk of theportfolio

6 Conclusions

In this paper we presented modified firefly algorithm (mFA)for cardinality constrained mean-variance portfolio opti-mization problem with entropy constraint We adopted fromthe ABC algorithm 119897119894119898119894119905 parameter that controls and directsthe exploration process Original firefly algorithm suffersfrom low exploration power at early iterations of algo-rithmrsquos execution for this type of problems By introducingexploration into this phase of execution we overcome thisdeficiency However during late cycles when the right partof the search space was reached the exploration is no longerneeded To control whether the exploration will be triggeredor not we introduced exploration breakpoint 119864119861119875 controlparameter

Since swarm intelligence implementations for the CCMVportfolio model with entropy constraint could not be foundin the literature we conducted three experiments In thefirst experiment to measure the enhancement gained by ourmodifications we compared our proposed mFA with theoriginal FA for CCMV model Test results show that ourmodifications completely rectified original FA deficienciesTo show how the entropy constraint affects the CCMV port-folio model in the second experiment we compared resultsof the mFA for CCMV models with and without entropyconstraints Test results proved that inclusion of the entropyconstraint is justified since it ensures portfolio diversificationand consequently quality of results enhancement Finally

to test the performance and robustness of our algorithmwe compared it with four other state-of-the-art algorithmsfrom [1] (and indirectly [23]) Our proposed algorithmproved almost uniformly better compared to genetic algo-rithm tabu search simulated annealing and particle swarmoptimization This all establishes modified firefly algorithmas a usable tool for cardinality constrained mean-varianceportfolio optimization problem with entropy constraint

Future research may include application of the proposedmFA to other portfolio optimization models and formula-tions with different constraints Also additional modifica-tions of the FA algorithm can be investigated for possiblefurther improvement of results

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgment

This research was supported by the Ministry of Science ofRepublic of Serbia Grant no III-44006

References

[1] T Cura ldquoParticle swarm optimization approach to portfoliooptimizationrdquo Nonlinear Analysis Real World Applications vol10 no 4 pp 2396ndash2406 2009

[2] R Zhou R Cai and G Tong ldquoApplications of entropy infinance a reviewrdquo Entropy vol 15 no 11 pp 4909ndash4931 2013

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 15: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

The Scientific World Journal 15

[3] E Mezura-Montes Ed Constraint-Handling in EvolutionaryOptimization vol 198 of Studies in Computational IntelligenceSpringer 2009

[4] T El-Ghazali Metaheuristics From Design To ImplementationWiley 2009

[5] X-S Yang Nature-Inspired Optimization Algorithms Elsevier2014

[6] K Tang J Yang H Chen and S Gao ldquoImproved geneticalgorithm for nonlinear programming problemsrdquo Journal ofSystems Engineering and Electronics vol 22 no 3 pp 540ndash5462011

[7] X-S Yang ldquoSwarm intelligence based algorithms a criticalanalysisrdquoEvolutionary Intelligence vol 7 no 1 pp 175ndash184 2014

[8] M Dorigo and L M Gambardella ldquoAnt colonies for thetravelling salesman problemrdquo Biosystems vol 43 no 2 pp 73ndash81 1997

[9] R Jovanovic and M Tuba ldquoAn ant colony optimization algo-rithm with improved pheromone correction strategy for theminimum weight vertex cover problemrdquo Applied Soft Comput-ing Journal vol 11 no 8 pp 5360ndash5366 2011

[10] R Jovanovic and M Tuba ldquoAnt colony optimization algo-rithm with pheromone correction strategy for the minimumconnected dominating set problemrdquo Computer Science andInformation Systems vol 10 no 1 pp 133ndash149 2013

[11] M Tuba and R Jovanovic ldquoImproved ACO algorithm withpheromone correction strategy for the traveling salesman prob-lemrdquo International Journal of Computers Communications ampControl vol 8 no 3 pp 477ndash485 2013

[12] D Karaboga ldquoAn idea based on honey bee swarm for numericaloptimizationrdquo Tech Rep 2005

[13] I Brajevic and M Tuba ldquoAn upgraded artificial bee colony(ABC) algorithm for constrained optimization problemsrdquo Jour-nal of IntelligentManufacturing vol 24 no 4 pp 729ndash740 2013

[14] N Bacanin andM Tuba ldquoArtificial bee colony (ABC) algorithmfor constrained optimization improved with genetic operatorsrdquoStudies in Informatics and Control vol 21 no 2 pp 137ndash1462012

[15] M Subotic and M Tuba ldquoParallelized multiple swarm artificialbee colony algorithm (MS-ABC) for global optimizationrdquoStudies in Informatics and Control vol 23 no 1 pp 117ndash1262014

[16] X-S Yang and S Deb ldquoCuckoo search via Levy flightsrdquo inProceedings of the World Congress on Nature and BiologicallyInspired Computing (NABIC rsquo09) pp 210ndash214 December 2009

[17] X-S Yang and S Deb ldquoEngineering optimisation by cuckoosearchrdquo International Journal of Mathematical Modelling andNumerical Optimisation vol 1 no 4 pp 330ndash343 2010

[18] I Brajevic and M Tuba ldquoCuckoo search and firefly algorithmapplied to multilevel image thresholdingrdquo in Cuckoo Searchand Firey Algorithm Theory and Applications X-S Yang Edvol 516 of Studies in Computational Intelligence pp 115ndash139Springer 2014

[19] CDaiWChen Y Song andY Zhu ldquoSeeker optimization algo-rithm a novel stochastic search algorithm for global numericaloptimizationrdquo Journal of Systems Engineering and Electronicsvol 21 no 2 pp 300ndash311 2010

[20] M Tuba I Brajevic andR Jovanovic ldquoHybrid seeker optimiza-tion algorithm for global optimizationrdquoApplied Mathematics ampInformation Sciences vol 7 no 3 pp 867ndash875 2013

[21] N Srinivas and K Deb ldquoMultiobjective optimization usingnondominated sorting in genetic algorithmsrdquo EvolutionaryComputation vol 2 no 3 pp 221ndash248 1994

[22] K Deb A Pratap S Agarwal and T Meyarivan ldquoA fast andelitist multiobjective genetic algorithm NSGA-IIrdquo IEEE Trans-actions on Evolutionary Computation vol 6 no 2 pp 182ndash1972002

[23] T-J Chang N Meade J E Beasley and Y M SharaihaldquoHeuristics for cardinality constrained portfolio optimisationrdquoComputers and Operations Research vol 27 no 13 pp 1271ndash1302 2000

[24] H Soleimani H R Golmakani andM H Salimi ldquoMarkowitz-based portfolio selection with minimum transaction lots car-dinality constraints and regarding sector capitalization usinggenetic algorithmrdquo Expert Systems with Applications vol 36 no3 pp 5058ndash5063 2009

[25] G-F Deng and W-T Lin ldquoAnt colony optimization forMarkowitz mean-variance portfolio modelrdquo Swarm Evolution-ary and Memetic Computing vol 6466 pp 238ndash245 2010

[26] K F Haqiqi and T Kazemi ldquoAnt colony optimization approachto portfolio optimizationmdasha lingo companionrdquo InternationalJournal of Trade Economics and Finance vol 3 no 2 pp 148ndash153 2012

[27] Y Li B Heng S Zhou R Chen and S Liu ldquoA novel ACOalgorithm based on average entropy for real estate portfoliooptimizationrdquo Journal of Theoretical and Applied InformationTechnology vol 45 no 2 pp 502ndash507 2012

[28] H Zhu Y Wang K Wang and Y Chen ldquoParticle SwarmOptimization (PSO) for the constrained portfolio optimizationproblemrdquo Expert Systems with Applications vol 38 no 8 pp10161ndash10169 2011

[29] Z Wang S Liu and X Kong ldquoArtificial bee colony algorithmfor portfolio optimization problemsrdquo International Journal ofAdvancements in Computing Technology vol 4 no 4 pp 8ndash162012

[30] M Tuba N Bacanin and B Pelevic ldquoArtificial bee colonyalgorithm for portfolio optimization problemsrdquo InternationalJournal of Mathematical Models and Methods in Applied Sci-ences vol 7 no 10 pp 888ndash896 2013

[31] M Tuba and N Bacanin ldquoArtificial bee colony algorithmhybridizedwith fireflymetaheuristic for cardinality constrainedmean-variance portfolio problemrdquo Applied Mathematics ampInformation Sciences vol 8 no 6 pp 2809ndash2822 2014

[32] A Fernandez and S Gomez ldquoPortfolio selection using neuralnetworksrdquo Computers and Operations Research vol 34 no 4pp 1177ndash1191 2007

[33] X-S Yang Nature-Inspired Metaheuristic Algorithms LuniverPress 2008

[34] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[35] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[36] A Galvez and A Iglesias ldquoFirefly algorithm for explicit B-spline curve fitting to data pointrdquo Mathematical Problems inEngineering vol 2013 Article ID 528215 12 pages 2013

[37] R K Moghadas A Garakani and M Kalantarzadeh ldquoOpti-mum design of geometrically nonlinear double-layer domes byfirefly metaheuristic algorithmrdquo Journal of Applied Mathemat-ics vol 2013 Article ID 169823 13 pages 2013

[38] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 16: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

16 The Scientific World Journal

[39] L di Gaspero G di Tollo A Roli and A Schaerf ldquoHybridmetaheuristics for constrained portfolio selection problemsrdquoQuantitative Finance vol 11 no 10 pp 1473ndash1487 2011

[40] H Markowitz ldquoPortfolio selectionrdquoThe Journal of Finance vol7 no 1 pp 77ndash91 1952

[41] Z Wang R Ouyang and X Kong ldquoA hybrid artificial beecolony for portfolio optimizationrdquo Journal of Theoretical andApplied Information Technology vol 49 no 1 pp 94ndash100 2013

[42] K P Anagnostopoulos and G Mamanis ldquoMultiobjective evo-lutionary algorithms for complex portfolio optimization prob-lemsrdquo Computational Management Science vol 8 no 3 pp259ndash279 2011

[43] H R Golmakani andM Fazel ldquoConstrained portfolio selectionusing particle swarm optimizationrdquo Expert Systems with Appli-cations vol 38 no 7 pp 8327ndash8335 2011

[44] W F Sharpe ldquoMutual fund performancerdquo The Journal of Busi-ness vol 39 no 1 pp 119ndash138 1966

[45] M Corazza and D Favaretto ldquoOn the existence of solutions tothe quadratic mixed-integer mean-variance portfolio selectionproblemrdquoEuropean Journal ofOperational Research vol 176 no3 pp 1947ndash1960 2007

[46] E T Jaynes ldquoInformation theory and statistical mechanicsrdquoPhysical Review vol 106 no 4 pp 620ndash630 1957

[47] M Tuba ldquoAsymptotic behavior of the maximum entropy rout-ing in computer networksrdquo Entropy vol 15 no 1 pp 361ndash3712013

[48] X Huang ldquoAn entropy method for diversified fuzzy portfolioselectionrdquo International Journal of Fuzzy Systems vol 14 no 1pp 160ndash165 2012

[49] J-L Lin ldquoOn the diversity constraints for portfolio optimiza-tionrdquo Entropy vol 15 no 11 pp 4607ndash4621 2013

[50] I Usta and Y M Kantar ldquoMean-variance-skewness-entropymeasures a multi-objective approach for portfolio selectionrdquoEntropy vol 13 no 1 pp 117ndash133 2011

[51] J Xu X Zhou and D DWu ldquoPortfolio selection using 120582meanand hybrid entropyrdquoAnnals of Operations Research vol 185 no1 pp 213ndash229 2011

[52] X-S Yang ldquoFirey algorithm stochastic test functions anddesign optimisationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[53] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering With Computers vol 29 no 2 pp175ndash184 2013

[54] M K Sayadia A Hafezalkotobb and S G J Nainia ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[55] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using fireflyAlgorithmrdquoComputers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[56] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoStochastic Algorithms Foundations and Applications vol 5792pp 169ndash178 2009

[57] K Deb ldquoAn efficient constraint handling method for geneticalgorithmsrdquo Computer Methods in Applied Mechanics and Engi-neering vol 186 no 2ndash4 pp 311ndash338 2000

[58] K Deb Optimization For Engineering Design Algorithms andExamples PHI 2012

[59] E Mezura-Montes and C A Coello ldquoConstraint-handlingin nature-inspired numerical optimization past present andfuturerdquo Swarm and Evolutionary Computation vol 1 no 4 pp173ndash194 2011

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 17: Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio Optimization Problem with Entropy Diversity Constraint

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014