Investing in the stock market involves high risks and equivalent returns. Many investors tend to be loss averse and suffer significant losses due to information asymmetry and emotion-based investing. In order to minimize such losses, various studies are attempting to predict the stock market's future and automate investment decisions. However, the stock market is affected by many factors and poses a challenge in prediction. Also, many researchers who develop stock trading systems are interested primarily in improving prediction model performance. Particularly, most studies set up-down labels in the data labeling phase. However, up-down labeling views all stock price fluctuations as identical, resulting in inefficient model training by including substantial noise in the learning data. Therefore, this study proposes SGA (Selective Genetic Algorithm) labeling to overcome such concerns. A trading system was developed using the proposed method, and a machine learning model and ensemble method supported the label prediction phase. The proposed trading system was analyzed empirically with 38 NASDAQ stocks and 33 KOSPI stocks, and a comparative experiment with up-down labeling method was conducted. In this study, SGA labeling performance exceeded that of up-down labeling. Additionally, instance selection and ensemble methods affected the trading system's performance.