Portfolio optimization is an important problem based on the modern portfolio theory (MPT) in the finance field. The idea is to maximize the portfolio expected return as well as minimizing portfolio risk at the same time. In this work, we propose a combinatorial algorithm for the portfolio optimization problem with the cardinality and bounding constraints. The proposed algorithm hybridizes a metaheuristic approach (particle swarm optimization, PSO) and a mathematical programming method where PSO is used to deal with the cardinality constraints and the math programming method is used to deal with the rest of the model. Computational results are given for the benchmark datasets from the OR-library and they indicate that it is a useful strategy for this problem. We also present the solutions obtained by the CPLEX mixed integer program solver for these instances and they can be used as the criteria for the comparison of algorithms for the same problem in the future.