Q-learning 是一種強化學習算法,通過使用歷史股價數據作為環境反饋來學習最優投資決策。 監督學習可用於通過股票價格相關特徵來訓練未來股票價格的狀態分類模型。 本研究提出了一種基於Q-learning的投資策略,並結合監督學習對未來股價趨勢進行分類,以定義Qlearning過程中所需的狀態輸入值。最後,將所提出的方法應用於台灣上市股票以評估其運營績效。 數值結果表明,該方法在考慮交易費用的情況下具有良好的盈利表現。;Q-learning is a reinforcement learning algorithm that learns optimal investment decisions by using historical stock price data as feedback from the environment. Supervised learning can be applied to train a state classification model for future stock prices via stock price-related features. This study proposes an investment strategy based on Q-learning, and combines supervised learning to classify future stock price trends to define the state input values required in the Qlearning process. Finally, the proposed method is applied to Taiwan′s listed stocks to evaluate its perational performance. The numerical results show that the proposed method has a good profit performance under the consideration of transaction fees.