Inductive logic programming (ILP) is one of the most popular approaches in machine learning. ILP can be used to automate the construction of first-order definite clause theories from examples and background knowledge. Although ILP has been successfully applied in various domains, it has the following weaknesses: (1) weak capabilities in numerical data processing. (2) zero noise tolerance, and (3) unsatisfactory learning time with a large number of arguments in the relation. This paper proposes a phenotypic genetic algorithm (PGA) to overcome these weaknesses. To strengthen the numerical data processing capabilities, a multiple level encoding structure is used that can represent three different types of relationships between two numerical data. To tolerate noise, PGA's goal of finding perfect rules is changed to finding top-k rules, which allows noise in the induction process. Finally, to shorten learning time, we incorporate the semantic roles constraint into PGA, reducing search space and preventing the discovery of infeasible rules. Stock trading data from Yahool Finance Online is used in our experiments. The results indicate that the PGA algorithm can find interesting trading rules from real data. (c) 2008 Elsevier Ltd. All rights reserved.