Applying Machine Learning method in stock trading by indicator using Python programming language
DOI:
https://doi.org/10.56097/binhduonguniversityjournalofscienceandtechnology.v7i1.212Keywords:
Dải Bollinger; Danh mục đầu tư tối ưu; MACD; RSI; SMA; tỷ lệ SharpeAbstract
The stock market is always considered a highly potential investment channel for
the public. However, it is often characterized by unpredictable fluctuations that require
investors to continuously monitor and analyze the market with a huge amount of data. This
research was conducted to implement machine learning methods in automated stock trading
based on indicators, aiding investors in evaluating the effectiveness of trading strategies
based on these indicators and suggesting the most appropriate investment portfolios, thus
minimizing the time and effort spent on data processing. Specifically, the application
process we developed and implemented involves four steps: (i) data collection, (ii)
automated trading based on indicators (SMA, Bollinger Bands, RSI, MACD), (iii) building
an optimal investment portfolio based on automated trading results using the Sharpe ratio
method, and (iv) testing and evaluating the trading results with new data. Using data
collected from VN30 stocks, the study results demonstrate that trading based on indicators,
coupled with proposing an optimal investment portfolio, yields high profit rates and
minimizes risks for investors.