A Firefly Algorithm for Portfolio Optimization Problem with Cardinality Constraint

Document Type : Original Article


1 Department of Accounting, University of Qom., Qom, Iran

2 Assistant Professor &Dean, Department of Accounting & Finance, Iranian E-Institute of Higher Education, Tehran, Iran

3 Department of Financial Engineering, University of Science and Culture., Tehran, Iran

4 Department of Industrial Engineering, Iran University of Science and Technology, Tehran, Iran



The Portfolio Selection Problem is one of the most widely studied topics in the finance and economics area. Many portfolio optimization problems are formulated as a complex mathematical model where direct optimal solutions cannot be obtained in a reasonable amount of time with dependable accuracy. In this paper, the firefly algorithm, a newly introduced metaheuristic approach, has been used to solve the Markowitz portfolio optimization problem with cardinality constraints which is among the difficult mathematical problems in finance. The performance of the proposed method is then compared with some other available techniques in the literature; such as Genetic Algorithm, Tabu Search, Simulated Annealing, and Particle Swarm Optimization. The preliminary results indicated that the proposed model outperforms other methods in some cases considering error criteria for some benchmark data sets that are widely tested in the past. We illustrate with numerical examples with the statistical test that by using a well-tuned firefly algorithm we can have a better result