Machine Learning in Technical Analysis: Ensure Data Quality

06 Dec Machine Learning in Technical Analysis: Ensure Data Quality

Accurate prediction of the stock market is therefore a complex task due to changes in the international and national markets. Consequently, data analysts, chart analysts, and scholars have tried to utilize deep neural networks for price prediction in a manner that it can reach a considerable profit within the desired interval. Hiransha (2018) employed a Multilayer Perceptron (MLP), Recurrent Neural Networks (RNN), Long Short-Term Memory (LSTM), and Convolutional Neural Network (CNN) for predicting the stock price of a company based on the historical prices available. Lee et al. (2019) designed a reinforcement learning-based network called DQN, which demonstrated extraordinary performance with daily scenarios excluding transaction fees, tax, and stock demand.

Relationships to other fields

This conclusion is consistent with the studies of Sen and Chaudhuri (2016), Sen (2017), Sen and Chaudhuri (2016) and Mehtab and Sen (2019). In addition, the study uses a combination of price history and technical analysis indicators to build an LSTM model. This also confirms the potential of technical analysis indicators in forecasting stock price movements. At the same time, it shows the compatibility and mutual support when combining technical analysis and financial data analysis models on a machine learning platform, specifically the LSTM algorithm in this study. Reinforcement learning is a type of machine learning that involves training a model with feedback from its actions and environment. This means that the model learns by trial and error, and optimizes its behavior based on rewards or penalties.

Stock Market Forecasting: From Traditional Predictive Models to Large Language Models

Comparison with alternative models such as LSTM and Random Forest shows that although the model developed in this study is superior in some aspects, deep learning-based methods such as LSTM offer advantages in handling highly volatile and non-linear data 27. This suggests that integrating these approaches in more complex models may offer further improvements in prediction accuracy 28. The next visualization displays the seasonal decomposition of the time series data (Figure 7), which divides the data into the main components of trend, seasonality, and residual (random variation). The trend component reflects long-term price movements, while the seasonal component shows patterns that repeat at certain intervals. The remaining fluctuations are shown as the residual component, which reflects random variation. This analysis helps identify the presence of seasonal patterns or cycles in stock price movements.

A Machine Learning Platform for Stock Investment Recommendation Systems

Once we liquidate all these holdings on 11th January 2019, we once again run the model on the data obtained until 11th January to get prediction probabilities and buy the stocks with highest probability on Open of 12th January 2019 and repeat the process. We see that 9 out of 10 stocks gave a positive and decent returns over the 7 trading day period. While scipy offers a TrainTestSplit function, we will not use that here since our data is a time series data and we want to split the Train-Test as a timeline rather than randomly selecting observations as train or test.

Zhuge et al. (2017) combine LSTM with Naiev Bayes method to extract market emotional factors to improve predictive performance. This method can be used to predict financial markets on completely different time scales from other variables. The sentiment analysis model is integrated with the LSTM time series model to predict the stock’s opening price and the results show that this model can improve the prediction accuracy. When discussing the stock market, with its inherent and complexity, the predictability of stock returns has always been a subject of debate that attracts much research. Fama (1970) postulates the efficient market hypothesis that determines that the current price of an asset always reflects all prior information available to it immediately.

Optimizing Trading Strategies with Bayesian Optimization

To mitigate the forgetting phenomenon, a transformer-based (Vaswani et al. 2017) model is used. Transformer utilizes a matrix that incorporate all previous data in a sequence, determining correlated values of the data. Therefore, it does not suffer from forgetting, however, all data segments should be provided as input, confining the model to a specific attention window (this study, the historical days of the stock). The cornerstone and the key advantage of the transformer despite its memory size (n2) compared to LSTM (n.log(n)), is its ability for parallel computation.

The forecast results of the LSTM model show a good predictive level for most data of the stocks studied. With the characteristics of the structure and analytical method, the LSTM model is evaluated and highly suitable for time series data such as stock price history. Therefore, the application of the LSTM algorithm to analyze and forecast stock prices is considered appropriate, the results of this study are also consistent with the above conclusions. However, the machine learning algorithms that have been developed strongly in recent times have many applications in the financial field, specifically a few popular algorithms applied in the financial field such as Random Forest, Support Vector Machine. These algorithms also have great potential for application to the topic of stock price analysis and forecasting. Further studies on this topic may consider using other machine learning algorithms in analysis and research.

  • Trained models derived from biased or non-evaluated data can result in skewed or undesired predictions.
  • In addition, the findings of this study are expected to motivate further research and practical applications in the financial industry, as well as provide new insights into the development of more effective investment strategies 16.
  • Consequently, data analysts, chart analysts, and scholars have tried to utilize deep neural networks for price prediction in a manner that it can reach a considerable profit within the desired interval.
  • This leads to the result that the summary prediction for NVL code on the test set is not good.
  • Artificial neurons and edges typically have a weight that adjusts as learning proceeds.

These technical indicators are highly customizable with regards to the time horizon captured along with allowing various Feature Engineering that would help create a better model. These values can either directly fit into a Machine Learning model or form a subset of factors for a bigger model. Average Directional Index was developed by Wilder to assess the strength of a trend in stock prices. Two of its main components, +DI and -DI helps in identifying the direction of the trend.

For each different stock ticker, the forecast performance of the machine learning technical analysis built model is also different. Figure 5 shows the forecast results of the LSTM model for the VN-Index on the data set. Figure 12 shows the comparison between actual and predicted stock prices over the testing period. The RMSE and MAE provide a sense of the average error magnitude, with lower values indicating better model performance. Tensor Processing Units (TPUs) are specialised hardware accelerators developed by Google specifically for machine learning workloads.

  • In addition, the difference between the forecast price and the actual price is not significant.
  • I would leave the ML part on the user as the target variable varies by the use-case.
  • Additionally, the table for “Top 10 Models” compares cumulative returns as both a ratio and a percentage.

Therefore, these approaches are impractical for the real market if the temporal context of predictions is overlooked. In addition, we identify specific errors in these studies and explain how they may lead to suboptimal or misleading results. Furthermore, we examine alternative deep learning architectures that may be better suited for predicting dynamical systems including CNN, LSTM, Transformer, and their combinations on real data of 12 stocks in the Tehran Stock Exchange (TSE). We propose an optimal CNN-based method, which can better capture the dynamics of semi-random environments such as the stock market, providing a more sophisticated prediction.

With the nature of short-term predictive analysis based on time series data, the combination of machine learning and technical analysis in forecasting stock prices in the short term is widely applied. Further, a few studies suggest stock price technical analysis patterns where the goal is to detect stock volatility patterns that lead to returns for investors. These approaches provide more effectiveness for potential investors in making investment decisions. Follow experimental research this approach, there were studied of Sen and Chaudhuri (2016) and Sen (2017) using time series decomposition to forecast stock prices and gives results with a potential accuracy. In addition, forecasting stock prices in the short term by applying machine learning and deep learning algorithms also show very high results (Sen and Chaudhuri, 2016; Sen & Datta Chaudhuri, 2018).

This work enables future researchers to avoid these issues and conduct their work in a more meaningful and practical manner. Additionally, we demonstrated that a small number of the stock market tickers is insufficient for a neural network to achieve predictive. Therefore, datasets two to three orders of magnitude larger than those often used in this field are necessary for robust and capable models. Most of the studies mentioned appear to outperform any traditional stockbroker’s prediction with more than 90% accuracy for a range of several months. However, despite the reported success, these methods are not widely adopted and used extensively, replacing classical methods such as ARIMA (Anon. n.d.; Dhyani 2020). This is in spite of ARIMA’s limitations, which only allow for short-horizon predictions and low-number regression parameters.

No Comments

Sorry, the comment form is closed at this time.