logo
ResearchBunny Logo
Introduction
Predicting stock price movements is a complex challenge that has attracted significant research attention. While the efficient market hypothesis and random walk hypothesis suggest inherent unpredictability, other studies have explored various methods for improving prediction accuracy, including time series decomposition and machine learning algorithms. Recent research highlights the potential of machine learning, particularly deep learning algorithms like LSTM, for short-term stock price forecasting. LSTM's ability to handle long sequences and synthesize short-term and long-term factors makes it particularly suitable for this task. This study focuses on applying LSTM, combined with technical analysis indicators (SMA, MACD, RSI), to predict short-term stock price trends in the Vietnamese market. This market, while rapidly developing, has not been extensively studied using this approach. The research aims to evaluate the model's accuracy and applicability to the Vietnamese context.
Literature Review
The literature review examines existing research on stock price prediction. Studies using time series decomposition methods have shown promising accuracy. Machine learning and deep learning algorithms, including LSTM, have demonstrated high accuracy in short-term stock price prediction, surpassing traditional methods. Several studies confirm the strong predictive power of machine learning models for stock prices, including regression and classification models. The use of social media sentiment analysis in conjunction with algorithms like SOFNN has also yielded high accuracy in predicting stock indices. The use of CNN algorithms for time-series data analysis has also shown promise. Technical analysis indicators such as Bollinger Bands, MACD, RSI, moving averages, and various chart patterns are frequently incorporated into predictive models, improving investment decision-making. However, there is a lack of research on the application of LSTM combined with technical indicators specifically within the Vietnamese stock market context. This gap prompted the current study.
Methodology
This study employed the LSTM algorithm, a type of recurrent neural network known for its ability to handle sequential data, to forecast stock prices. Data were collected from vietstock.vn, encompassing historical price data (opening, closing, high, low, volume) for the VN-Index and 30 stocks from the VN-30 index. The data preprocessing involved handling missing values and calculating technical indicators (SMA, MACD, RSI). The dataset was divided into training (up to December 31, 2020) and testing (January 1, 2021, to April 1, 2021) sets. The LSTM model comprised four layers with specific units, activation functions ('relu'), and dropout rates (0.1). The model was built and trained using Python with libraries like Sklearn, Keras, and Tensorflow. The model was optimized using the 'adam' optimizer and 'mean_squared_error' loss function. EarlyStopping was implemented to prevent overfitting. The model's prediction accuracy was evaluated using a formula that compares predicted and actual closing prices, establishing a 93% baseline (based on the maximum daily fluctuation of 7% on the Ho Chi Minh City Stock Exchange).
Key Findings
The LSTM model demonstrated high prediction accuracy for most of the 31 stocks (including the VN-Index) analyzed. The majority of stocks exceeded the 93% accuracy baseline. Specifically, PNJ achieved the highest accuracy (97.7%), followed by MSN and TPB (approximately 97%). However, some stocks showed lower accuracy, with NVL exhibiting the lowest accuracy (78.9%), along with TCH (86.8%) and FPT, PLX, POW, VPB, and VRE (around 89%). Visual comparisons between predicted and actual prices confirmed the model's generally accurate tracking of price trends but also revealed instances of significant divergence, particularly for the stocks showing lower accuracy. The authors observe a high concentration of companies in the Finance, Construction, and Manufacturing sectors within the VN-30 sample, indicating the dominance of these industries in terms of market capitalization.
Discussion
The high prediction accuracy for most stocks supports the suitability of the LSTM model for analyzing and forecasting Vietnamese stock price movements, aligning with findings from previous studies using LSTM. The incorporation of technical indicators enhances the predictive power of the model. The results demonstrate the synergistic potential of combining technical analysis and machine learning. The observed discrepancies between predicted and actual prices for certain stocks warrant further investigation. Factors such as market volatility, unique characteristics of specific companies, and potential data limitations might contribute to these variations. The study's findings provide valuable insights for investors and market regulators in the Vietnamese context.
Conclusion
This study successfully applied LSTM combined with technical indicators to predict Vietnamese stock price trends. The model achieved high accuracy for most stocks, demonstrating the applicability of this approach in an emerging market. Future research could investigate the impact of incorporating additional data sources (e.g., news sentiment, macroeconomic indicators), exploring other machine learning algorithms, and expanding the dataset to encompass a broader range of stocks and time periods.
Limitations
The study's primary limitation is the focus on a specific set of stocks (primarily VN-30) and a limited time frame. This restricts the generalizability of the findings. The model's performance could be affected by market volatility, data limitations, and the inherent complexity of stock price prediction. Furthermore, the study only utilized structured numerical data, excluding valuable unstructured data sources (e.g., news articles, social media sentiment).
Listen, Learn & Level Up
Over 10,000 hours of research content in 25+ fields, available in 12+ languages.
No more digging through PDFs—just hit play and absorb the world's latest research in your language, on your time.
listen to research audio papers with researchbunny