Since Markowitz proposed the mean-variance (MV) formulation in 1952, it has been used to formulate various portfolio selection problems. However Markowitz's solution is only for single period. As to multi-period portfolio selection problems, many researchers have also studied for a long time. However, most solutions depend on various forms of utility functions, which are unfamiliar for general investors. Some works formulate the problems as MV models and solve them analytically with some assumptions. Unlike analytical solutions, genetic algorithms (GA) can solve problems without assumptions and thus be more flexible. The purpose of this paper is to formulate multi-period portfolio selection problems as MV models and solve them by GA. First, We implement a prototype software based on GA; solve a single-period portfolio selection problem by analytical techniques found in literatures and by our software respectively; compare efficient frontiers generated by the two methods to show the correctness of our algorithm. Furthermore, we use the software to solve a multi-period portfolio selection problem, for which there exists no general analytical solution, to show the generality of our algorithm.