Abstract
According to several previous studies, neural network-based stock price predictors perform better for plunging patterns of stock prices than normal stock price patterns. Focusing on this issue, this study proposes a novel method that uses a neural network-based stock price predictor to predict the upward trend-reversal of the plunging market itself. To achieve more consistent prediction results for plunging patterns, newly designed input features are added to improve the performance of traditionally used neural network-based predictors. The statistics of the prediction scores for past plunging markets and analyzed, and the results are used to predict the upward trend-reversal in the plunging market that occurred during the test period. We demonstrate the superiority of the proposed method through the simulation results of 3-year trading on KOSDAQ, a representative stock market in South Korea.
MSC: 62M45, 62M10
Keywords: Plunging pattern, Plunge market, Stock price prediction, Neural network, Trend reversal
Highlights
-
•
Proposes a novel neural network-based stock price predictor for predicting upward trend-reversals in plunging markets.
-
•
Enhances prediction consistency for plunging patterns by incorporating newly designed input features into traditional neural network-based predictors.
-
•
Analyzes the statistical distribution of neural network prediction scores for individual stocks during past stock market crashes and trend reversals.
-
•
Introduces extended features in neural network modeling to improve the assignment of consistent prediction scores to plunging patterns.
-
•
Demonstrates the possibility of stock price prediction and validates return predictions through the developed pattern and model in this study.
1. Introduction
This study delves into the challenge of predicting trend reversals in the stock market, a topic that has garnered attention and research from various fields. In the realms of business administration and economics, researchers have explored fundamental and technical analysis methodologies [1], [2]. In the fields of physics and mathematics, chaos theory and time-series analysis have been employed to forecast stock prices [3], [4]. However, despite the abundance of such research, a persistent debate remains regarding the feasibility of accurately predicting stock prices and the practical utility of such predictions in real-world markets. In contrast, the field of artificial intelligence has witnessed studies that leverage machine learning methods, demonstrating prediction models with notably high levels of statistical reliability [5], [6], [7]. Additionally, there are reports of the development of intelligent automatic trading systems that combine predictive results with dynamic trading strategies [8], [9], [10]. Since 2015, the application of deep learning techniques has emerged in the domains of economics, mathematics, statistics, and computer science. Some of these studies have revealed that employing separate and independent stock price predictors can lead to enhancements in trading performance [11], [12], [13], [14], [15], [16], [17]. While prior research predominantly focused on predicting the upward and downward movements of individual stocks, our study seeks to anticipate the specific moments when the stock market experiences an upward trend reversal during a market crash. It's crucial to note that a plunging market cannot sustain its descent indefinitely. As fear among investors reaches its peak, leading to selloffs and a maximal decline in stock prices, a rational phenomenon known as ‘smart money’ begins to underpin a new buying trend. Eventually, this trend leads to an upward reversal in market dynamics. Previous studies have highlighted that neural network-based stock price predictors tend to assign high prediction scores to plunging patterns [10], [12], [18]. They've observed that, as the market's decline intensifies, the number of individual stocks exhibiting plunging patterns gradually increases. Consequently, the number of stocks receiving high prediction scores from neural network-based price predictors also rises.
This study presents a viewpoint on attaining real returns from predictive models, a realm where prior studies often only offered simple validation. The limitations of previous research lie in their provision of solely simple predictive outcomes and period-based returns, which are challenging to apply to actual trading. Moreover, using past data that does not encapsulate external volatility factors like COVID-19 limits the effectiveness of predictions based on recent data. Meanwhile, the model introduced in this study generates purchase signals based on predictive scores and verifies specific returns linked to the duration of asset retention post-purchase. By foreseeing particular moments, it ultimately facilitates profit generation through the precise timing of acquisitions. Moreover, it aids investors in mitigating potential losses associated with their investments. Losses incurred from investments sometimes contribute to addiction and depression, leading to significant ramifications. Nonetheless, with dependable trading guidelines, these risks can be effectively managed. The primary aim of this research extends beyond simple profitability models, aiming to assist investors in risk minimization and promote stable, sustainable investment strategies.
The contributions of this paper can be summarized as follows, and these contributions should be emphasized in the paper:
-
•
Predicting Stock Market Trend Reversals: This paper aims to predict when upward trend reversals occur in the stock market. Predicting these trend reversals is a crucial topic in the field of finance, and this research explores its real-world applicability.
-
•
Differentiation from Prior Research: This study differentiates itself from prior stock price prediction research. While previous studies primarily focused on individual stock price movements, this paper focuses on predicting upward trend reversals during stock market crashes.
-
•
Statistical Analysis and Experiments: The study analyzes the statistical distribution of neural network prediction scores for future stock prices during past stock market crashes and trend reversals. Based on this analysis, the study measures the profitability when buying at high prediction scores, validating the proposed reversal prediction input features by comparing the profitability with the returns obtained using only previous features.
The flow of this paper is shown in Fig. 1. First, it predicts upward trend reversals based on enriched stock input features. Deep learning using a neural network model is employed in this process. Subsequently, it calculates buy signals based on the prediction results and verifies the profit and loss generated when actual purchases are made based on these signals. This result is compared with cases where enriched input features are not used, validating the enriched features' effectiveness in predicting upward trend reversals.
Figure 1.
Workflow of the Study.
The structure of this paper is as follows. Section 2 discusses the related studies. Section 3 introduces the key characteristics of market crashes and upward trend reversals. It elucidates the prediction of these reversals using trained conventional neural network-based stock price predictors. Section 3 describes a method that improves conventional neural networks to facilitate more consistent predictions for plunging patterns. In Section 4, we conduct experiments to predict trend reversals in the plunging intervals shown in the South Korean stock market in the last 3 years and present the trading simulation results at the time of the trend reversal. Finally, in the conclusion, planned future follow-up research is described.
2. Related works
Before introducing this study, we explored various research approaches that employed traditional models for predicting stock prices. These studies involved techniques such as ARIMA, GARCH, Random Forest, and SVM, among others. When reviewing studies focusing on stock price prediction using statistical models like ARIMA, it was noted that while these models can predict stock prices, they are more suited for short-term predictions due to the significant volatility in stock prices [19], [20], [21], [35]. These models heavily rely on the stationarity of time series data and specific patterns, which poses challenges in responding to unexpected sharp price fluctuations or events.
The use of the GARCH model in stock price prediction comes with several noteworthy limitations. Firstly, this model primarily focuses on modeling volatility and may struggle to directly capture the directional movements or specific patterns within stock prices. Consequently, its ability to accurately predict the direction of stock prices might be restricted. Secondly, relying on past volatility data, the GARCH model may face challenges in generating forecasts for the future. Particularly during sudden fluctuations or unexpected events, its predictive capability could be limited. For instance, the unforeseen impact of events like the stock market crash triggered by COVID-19 can significantly undermine the predictive performance of traditional time series models. [22], [23], [24].
Studies on stock price prediction using machine learning techniques like SVM and Random Forest have been ongoing, with varying opinions on their comparative performance. [25], [26] However, multiple studies have highlighted comparatively lower performance of these machine learning models when contrasted with neural network-based models. Specifically, concerning the prediction of the KOSDAQ market using identical data to our study, neural network-based models have exhibited superior performance over SVM and Random Forest [27], [28], [29]. Furthermore, in predictions involving high-dimensional data, models such as ARIMA are deemed unsuitable, while SVM and Random Forest are criticized for their high model complexity and computational costs [30], [31]. In contrast, neural network-based models consider non-linear data relationships, recognize intricate patterns, and excel in learning highly predictive models. [32]
Although achieving remarkable predictive accuracy, further comprehensive research is essential to translate these predictions into profitable returns. The validation of profitability stands as a crucial aspect of stock price prediction models. To attain this, additional insights are required to determine optimal buy and sell timings based on the predicted price changes.
While most stock price prediction studies emphasize model accuracy alone, our study takes a different approach by aggregating highly accurate predictions to generate buy signals. This strategy specifically targets the highest buy signals during market crashes, systematically validating the returns yielded from purchasing at these pivotal moments. Consequently, the empirical findings from our study not only enable accurate predictions of rebound points post-crash but also facilitate actionable trading through these identified buy signals.
3. Prediction of trend reversals exploiting neural networks
Fig. 2 shows the major patterns of change, from a downward trend in stock prices to an upward trend. From a perspective of technical analysis, they include double bottom, triple bottom, inverse head and shoulder, rounded bottom, and spike bottom. Among them, the spike bottom type is also called the V-formation. It is the most dramatic reversal pattern, which occurs when a short-term sharp plunge is followed by a sharp surge with the sudden appearance of a buying trend.
Figure 2.

Major upward reversal patterns (adopted from Fig. 3.4 of [33]).
According to the results of analyzing the experiments of the previous studies, stock price predictors developed using neural network training assigned high prediction scores to the plunging stock prices [10], [12], [15]. In particular, most cases corresponded to the first half of the V-formation pattern. The plunging patterns appear most when the entire stock market crashes due to bearish factors or an unexpected event around the world. For example, most of the stock markets around the world experienced a crash from early to mid-March 2020, caused by the COVID-19 pandemic. The typical progress of the V-formation trend reversal is as follows. After a period of the stock price decline, an excessive plunge in the stock price occurs additionally in the short-term. A strong buying trend appears to resist this, followed by a V-shaped increase in the stock price, after which the trend itself turns into an upward trend. In the process, the decline in the stock price begins with fundamental factors stemming from a recession across the industry to which the company belongs, or the company's temporary performance decline. In many cases, however, excessive plunging occurs because investors whose investment sentiment has worsened sell the stock collectively. A stock price plunge, which is overly reflective of crowd sentiment, leads to the emergence of a new buying group that has identified the excessively undervalued stock price based on rational grounds and ultimately leads to the upward reversal of the stock price trend. Fig. 3 shows a typical example of V-formation trend reversals.
Figure 3.

An example of V-formation trend reversal.
Even if the stock market is not plunging but is in a flat or increasing trend, there are almost always some individual stocks that correspond to plunging patterns. The trading simulations in the previous studies [15], [14], [34] have shown that the trading performance can be achieved at a level where the profit per trade (PPT) exceeds 2%. Here, however, it does not mean that the V-formation trend reversal will occur just because a specific individual company's stock prices have plunged. For example, the company may be designated as a company with administrative issues or even delisted in a severe case due to serious damage to the enterprise value, such as the management's embezzlement or breach of trust, and accounting fraud. Fig. 4 shows an example of this case, where the trading of the stock has been suspended as a prior measure before deciding whether to delist the company. Since there was a huge stock price plunge just before the trading stop interval indicated by the arrow, the predictors developed in the previous studies of this study assign, unfortunately, quite high scores to this interval.
Figure 4.

An instance opposing the V-formation trend reversal: a significant decline in stock price occurring immediately before the trading halt, as highlighted by the arrow.
As such, an excessively plunged price of an individual stock in a typical market may lead to a V-formation rebound and upward trend-reversal, or conversely, a huge loss due to the company's uncertainty. Therefore, even if a neural network-based individual stock price predictor can predict a V-formation rebound pattern with a high probability, normal investment cannot be made without additional information other than technical analysis, which can cope with the aforementioned serious risks. We tentatively conclude that the best interval to detect and use the V-formation trend reversal is an interval in the market crash where the entire market plunges. In a market-wide crash, such as the one in the COVID-19 crisis mentioned in the example above, a technical rebound can be expected because psychological factors called anxiety and fear of investors have a very large effect. However, since the plunging market is defined as an interval where stock prices continue to fall sharply [34], it is a very difficult task to figure out where it ends. In this study, we use statistical information of the prediction scores assigned by the neural network-based predictor to each stock to detect the V-formation trend reversal and propose a method of using it in trading. As a means of estimating the end of a market crash using a neural network-based predictor, we use the sum of the prediction scores of stocks that have high prediction scores. As the market crash progresses, the number of plunging stocks will also increase, but since the extent of the plunge will become greater, the prediction score will also gradually increase for the plunged stocks. The question is how large the sum of the prediction scores should reach before it can be determined to be the end of the market crash. To answer this question, we analyzed the process of changes in the prediction scores of the trained predictor using the input features proposed by [10] for the past plunging intervals. For the descriptions hereafter, we have defined two equations. Suppose is a sequence of the prediction scores of a total of m stocks existing in the stock market, which is sorted in descending order. Equation (1) defines as the sum of the top k prediction scores:
| (1) |
Equation (2) defines the buy signal using this as follows:
| (2) |
where τ is a threshold and a learning parameter. If the on a particular day is 1, it is assumed that the investor participates with a buy position in the stock market on the next trading day. Fig. 5 shows the changing process of the KOSDAQ market index, which is highly volatile among the South Korean stock markets, from the beginning of April 2013 to the end of April 2014. A in the figure indicates the end of a plunging market, which hit the bottom on June 25, 2013, and B indicates the end of a plunging market, which hit the bottom on December 19, 2013. , the sum of the top 30 prediction scores was 14.42 at the lowest point of A and 6.21 at the lowest point of B.
Figure 5.
The KOSDAQ index demonstrates distinctive behavior during preceding market downturns. In the figure, ‘A’ designates the conclusion of a market decline, reaching its lowest point on June 25, 2013, while ‘B’ denotes the termination of another downturn.
If τ is set to 14.00, the investor will profit from buying participation after the lowest point of A but will miss the opportunity to participate for B. On the other hand, if τ is lowered to 6.00, the investor can participate in a rally at point B but will take the buy position too early for the A point, which will threaten the achievement of an ideal return due to the impact of further market declines. As such, when the sum of the prediction scores is significantly different between two plunging points, it means that the deviation of the scores assigned to the plunging pattern is quite large, and it can be interpreted that there is a slight lack of consistency in the prediction scores assigned by the predictor. To improve the consistency, we represent the plunging pattern more elaborately using the additional input features presented in the next section.
4. Additional features to train neural networks
Before describing the input features that will be additionally used in the neural network of this study, the input features used to train the traditional neural network used in the analysis in the previous section can be summarized as follows. First, binary features were used to represent the rise and fall of the moving average line for the close price. Equation (3) defines the presence/absence of the upward trend in the five-day moving average, of a stock s on a trading day t as follows:
| (3) |
In this way, five binary input features were used to represent the presence/absence of an upward trend in the 5, 10, 20, 60, and 120-day price moving average lines. In the same way, four binary input features were used to represent the presence/absence of an upward trend in the 5, 20, 60, and 120-day trading volume moving average lines. Next, features that compare the i-day moving average and the j-day moving average were used. Equation (4) defines the feature for comparing the 5-day average and the 10-day moving average, , of a stock s on a trading day t as follows:
| (4) |
In this way, we used ten binary input features to represent the results of the size comparison for ten moving average combinations. In the same way, we used five binary input features to represent the results of comparing the close price with the 5, 10, 20, 60, and 120-day price moving averages and four binary input features to represent the results of comparing with the 5, 20, 60, and 120-day trading volume moving averages. As continuous features, we used disparity, gradient, and rate of change. The disparity represents the distance between the close price and the i-day moving average. For example, the distance between the close price and the 5-day moving average of a stock s on a trading day t can be expressed by the following Equation (5):
| (5) |
In this way, five input features were used to represent the distance between the close price and the 5, 10, 20, 60, and 120-day moving averages, respectively. The gradient represents the gradient of the i-day moving average line. For example, Equation (6) calculates the gradient of the 5-day moving average of a stock s on a trading day t as follows:”
| (6) |
In this way, we used five input features to represent the gradient of the 5, 10, 20, 60, and 120-day moving average lines. The rate of change represents the rate of change in the current close price compared to the close price before i days. For example, the rate of change in the current close price of a stock s on a trading day t compared to the 1-day previous close price can be calculated by the following Equation (7):
| (7) |
In this way, nine input features were used to represent the rate of change in the current close price compared to the close prices of 1, 2, 4, 7, 12, 20, 33, 54, and 68 days ago.
The reason for selecting 1, 2, 4, 7, 12, 20, 33, 54, and 68-day closing prices in RC1 is to analyze the changes in stock prices at various time intervals, drawing inspiration from the concept of the Fibonacci sequence. These time intervals have been chosen for the following reasons. In the stock market, different time intervals reveal distinct patterns and trends in stock prices. Each time interval provides specific information, and analyzing the rate of change in closing prices allows us to consider various characteristics of the stock.
For instance, the 1-day closing price change is associated with short-term daily volatility in the stock and captures temporary fluctuations in the stock market. This helps in understanding the key movements within short time frames, aiding in short-term trading decisions.
Furthermore, the rate of change in 2-day, 4-day, and 7-day closing prices is linked to medium-term trends in the stock, providing a broader perspective on the stock's price movements. On the other hand, the rate of change in 12-day, 20-day, 33-day, 54-day, and 68-day closing prices assists in identifying long-term trends in the stock, and supporting long-term investment strategies. Considering these various time intervals allows the model to encompass a wide range of trends and patterns in stock price data, akin to the concept of the Fibonacci sequence [35]. Consequently, utilizing these diverse time intervals is vital for enabling stock prediction models to consider the multifaceted nature of the stock market and effectively analyze time-series data. The approach of calculating the rate of change in a manner inspired by the Fibonacci sequence aids in gaining a multidimensional understanding of market trends.
The following Table 1 provides detailed information and descriptions regarding the features explained above.
Table 1.
Detailed Information and Descriptions of Features.
| Features | Descriptions |
|---|---|
| (k = 5,10,20,60,120) | Indicates a 1 when the k-day moving average (MAk) exceeds a threshold τ, representing an upward trend in the stock's price. Otherwise, it is set to 0. |
| (k = 5,10,20,60,120,l = 10,20,60,120) | This feature is assigned a value of 1 when the k-day moving average (MAk) surpasses the l-day moving average (MAl), indicating a short-term price uptrend compared to a longer-term one. In all other cases, it is set to 0. |
| (k = 5,10,20,0,120) | Measures the extent to which the closing price of a stock deviates from the k-day MAk, expressed as a percentage. This feature reflects the price volatility of the stock. |
| (k = 5,10,20,60,120) | Indicates the percentage change in the slope of the k-day MAk compared to the previous day, providing insight into the stock's trend direction. |
| (k = 1,2,4,7,12,20,33,54) | Represents the daily return percentage of the stock, calculated as the percentage change between the closing price of the current day and the closing price of the previous day. |
4.1. Extended features
In addition to the input features explained above, we designed the following input features for the consistency of the upward reversal prediction of plunging patterns in the training of the neural network in this study. First, features for comparing the distance between the i-day moving average and the j-day moving average are used. For example, the distance between the 5-day moving average and the 10-day moving average of a stock s on a trading day t can be calculated by the following Equation (8):
| (8) |
In the same way, we added features for ten moving average line combinations. The trading volume disparity represents the distance between the trading volume and the i-day moving average of the trading volume. For example, when the trading volume of a stock s on a trading day t is , and the 5-day moving average of trading volume is , the distance between the two is calculated using the following Equation (9):
| (9) |
In this way, four input features are used to express the distance between the trading volume and the 5, 20, 60, and 120-day trading volume moving averages. The gradient of the trading volume line represents the gradient of the i-day trading volume moving average line. For example, the gradient of the 5-day moving average line of the trading volume of a stock s on a trading day t can be calculated by the following Equation (10):
| (10) |
In the same way, four input features are used to express the gradient of the 5, 20, 60, and 120-day trading volume moving averages. The following Table 2 provides detailed information and descriptions regarding the features explained above.
Table 2.
Detailed Information and Descriptions of Extended Features.
| Features | Descriptions |
|---|---|
| (k = 5,10,20,60,120),l = 10,20,60,120) | These features calculate the percentage difference between the k-day moving average (MAk) and the l-day moving average (MAl) of a stock's closing prices. They quantify how the short-term price trends (k-day) relate to the long-term trends (l-day), expressed as a percentage difference. |
| (k = 5,10,20,60,120) | These features measure the percentage difference between the daily trading volume () and the k-day volume moving average (VMAk) for a stock. They help assess how the current trading volume deviates from the short-term volume average (k-day), represented as a percentage difference. |
| (k = 5,10,20,60,120) | These features indicate the percentage change in the slope of the k-day volume moving average (VMAk) from the previous day. They provide information about the stock's volume trend direction over the short term, expressed as a percentage change. |
4.2. Target and continuous feature normalization
As the target of the predictor, we used the future price change for a stock s on a trading day t, which was defined as the following Equation (11):
| (11) |
Here, γ is the discount factor, and T is the size of the window that will be reflected in the future price change after the trading day t. If γ is close to 1, changes in the distant future are reflected, and if it is close to 0, only the changes very shortly are reflected. In this study, we set T to 0.85 and γ to 11.
5. Experiments
For the experiment on the upward reversal prediction of the stock market trend in this study, we constructed approximately 1,000 stocks constituting the KOSDAQ market. In the process, stocks with low volatility were excluded. Specifically, we set as an indicator of the volatility and measured the mean value for the training set. The bottom 50% of stocks with low values of this indicator were excluded from the trading simulations. Table 3 shows the composition of the experimental data as a whole.
Table 3.
Experimental data set.
| Data set name | Period |
|---|---|
| Training set | February 2014 – December 2016 |
| Validation set | January 2017 – March 2018 |
| Threshold selection set | April 2013 – January 2014 |
| Test set | April 2018 – June 2020 |
The V-formation pattern is one of the key price patterns in the stock market, and it plays a crucial role in shaping stock price movements. The reason for selecting data from the period spanning 2017 to 2020, which includes the significant market crash due to the pandemic, is to gain a deeper understanding of this V-formation pattern and its importance in predicting stock prices.
The market crash induced by the pandemic had a profound impact on financial markets, making it a compelling motivation for the analysis of stock market trends. The choice of data from this specific period is grounded in the need to comprehend the significant market volatility and changes resulting from the pandemic.
The training set and the validation set were used for optimal neural network structure search and weight training. Table 4 summarizes the results of training the neural network through the grid search technique. The neural network initialized with a structure based on each setup was trained until the Mean Absolute Error (MAE) and Mean Square Error (MSE) became the minimum. It was implemented using the framework of TensorFlow 2.4, which is open-source, and the ‘Adam’ optimization strategy in the default setting was used as the optimization strategy [36]. A batch-normalization layer and a dropout layer set up with a dropout rate of 0.3 were added commonly between each hidden layer. The activation function was fixed to ‘Relu’ on each layer, except for the last layer, where it was set to ‘linear’. As a result, it was found that the optimal model structure of hidden layers is ‘768x512x16’ hidden layers. The Fig. 6 shows the declining trend in loss throughout the training process.
Table 4.
The neural network architecture determined using the grid search method.
| Structure | MAE | MSE | |
|---|---|---|---|
| Two hidden layers | 2048x128 | 0.045 | 0.002025 |
| Three hidden layers | 768x512x16 | 0.039 | 0.001521 |
| Four hidden layers | 128x128x128x32 | 0.042 | 0.001764 |
Figure 6.

The graph displaying losses corresponds to the model structure ‘768x512x16’.
Table 4 does not include the structure search results for more complex structures consisting of five or more hidden layers because the optimal performance was not reached.
The threshold τ of the buy signal in Equation (2) was set to 7.50, and the value that achieved the optimal trading simulation performance for the threshold select set was found through the grid search technique.
5.1. Simulated trading results
Fig. 7 shows the process of changes in the KOSDAQ Index from mid-January 2018 to the end of June 2020, which includes the test period. A, B, and C indicate the ends of plunging markets, which hit the bottom, and correspond to October 29, 2018, August 6, 2019, and March 19, 2020, respectively. Among them, the index decline at C, which was caused by the global fear of COVID-19, was very large, but the increase after the trend reversal was the fastest and strongest.
Figure 7.
KOSDAQ index during the test period. A, B, and C indicate the ends of plunging markets, which hit the bottom, and correspond to October 29, 2018, August 6, 2019, and March 19, 2020, respectively.
In this study, we derived trading simulation strategies based on buy signals and analyzed the profit and loss ratios. The trading simulation is conducted through the trading and fund simulation system [8], [37]. This system utilizes an integrated multiple simulation technique based on the predictions of deep learning models to perform multiple simulations, considering various micro-trading policy factors in an integrated manner. The simulation results include metrics such as the buy rate compared to the previous day, holding period after purchase, profit rate, loss rate, and average profit per trade. Fig. 8 is to take a close look at the changes in the KOSDAQ Index and before and after point A. On October 28, 2018, indicated by the arrow, a buy signal occurred because was 8.29, which exceeded the threshold τ. The top 10 stocks of prediction scores were purchased equally every day for a total of five trading days, starting from the day after the buy signal occurred. It was assumed that each stock was purchased at the opening price on the trading day. The purchases stocks were set to be sold when a profit of 25% or a loss of 25% occurs, or after holding them for 20 trading days. In this simulation program, the transaction volume ranged between 500 million and 1 trillion, specifically set for the experiments.
Figure 8.

Comparison between the KOSDAQ and SS30 around point A in Fig. 7. At this point, a buy signal is indicated by an increase in SS30. The arrow highlights the occurrence of this buy signal.
Table 5 shows the simulation results for this strategy at point A. ‘PR’ refers to the profit realization, and it is the number of times the stocks were sold after reaching a profit of 25% or higher. ‘LC’ refers to the loss cut, and it is the number of times that forced selling occurred due to the occurrence of a loss of 25% or higher. In the case where the stocks were sold as the holding period expired, we recorded ‘Profit’, the number of times that a profit occurred, and ‘Loss’ the number of times a loss occurred, respectively. ‘PPT’ refers to the average profit per trade, which was 17.2%.
Table 5.
Trading performance at A. All metrics except Profit per Trade indicate the frequency of occurrences.
| Profit Realization | Profit | Loss | Loss Cut | Profit Per Trade |
|---|---|---|---|---|
| 24 | 17 | 6 | 3 | 17.2% |
Fig. 9 shows the changes in the KOSDAQ Index and before and after point B. On August 6, 2019, which is indicated by the arrow, is 8.40, exceeding the threshold τ. Thus, the buy position is taken on the next trading day.
Figure 9.

Comparison between the KOSDAQ and SS30 around point B in Fig. 7. At this point, a buy signal is indicated by an increase in SS30. The arrow highlights the occurrence of this buy signal.
Table 6 shows the results of applying the same trading simulation strategy as in the case of A. Although PR increased by 3, and LC decreased by 1, PPT was 18.1%, which is not much different from the trading performance at A.
Table 6.
Trading performance at B. All metrics except Profit per Trade indicate the frequency of occurrences.
| Profit Realization | Profit | Loss | Loss Cut | Profit Per Trade |
|---|---|---|---|---|
| 27 | 16 | 5 | 2 | 18.1% |
Fig. 10 shows the changes in the KOSDAQ Index and before and after point C. Since on March 16, 2020, indicated by the arrow, was 9.41, exceeding the threshold τ, the investor participates with a buy position on the next trading day. The market crash caused by the fear of COVID-19 showed a stronger intensity of plunging compared to the two previous market crashes. As a result, with the threshold τ found in this study, the predicted trend reversal point was 3 trading days ahead of the lowest point.
Figure 10.

Comparison between the KOSDAQ and SS30 around point C in Fig. 7. At this point, a buy signal is indicated by an increase in SS30. The arrow highlights the occurrence of this buy signal.
Table 7 shows the results of applying the same trading simulation strategy as A and B. PR decreased to 19 times, and LC increased significantly to 9 times. This is because the forced loss cut occurred among the stocks bought on the first and second days because of the buy position that occurred before the lowest point was hit. Because of this result, PPT also decreased significantly to 11.7%, but in the end, a profit was achieved.
Table 7.
Trading performance at C. All metrics except Profit per Trade indicate the frequency of occurrences.
| Profit Realization | Profit | Loss | Loss Cut | Profit Per Trade |
|---|---|---|---|---|
| 19 | 18 | 4 | 9 | 11.7% |
5.2. Comparison with the trading performance based on old feature representation
In this subsection, the trading simulation results are comparatively analyzed with the case of calculating using the conventional neural network predictor without using the extended features. Let us say that the conventional neural network is and the predictor using the extended features is . The threshold of Equation (2) for was optimized using the same grid search technique and fixed to 6.93.
Table 8 shows the comparison results. The date on which the buy signal occurred at each trend reversal point is shown in the “date” column. At position A, both methods generated an accurate signal at the end of the market crash. The PPT of -based trading was slightly higher. At position B, the -based signal occurred on July 29, 2019, which was six trading days ahead of the end of the crash. Because of this, loss cuts occurred for some of the purchased stocks. In contrast, the -based signal occurred at the correct time. At position C, both methods generated a signal ahead of the exact time point. However, it can be seen that the -based PPT decreased severely. From this, it can be seen that the introduction of the extended features helps in the consistent prediction of plunging patterns.
Table 8.
Trading performance comparison with old features. PPT (profit per trade): it refers to the average profit per trade.
| Used Model | A |
B |
C |
|||
|---|---|---|---|---|---|---|
| Date | Profit Per Trade (%) | Date | Profit Per Trade (%) | Date | Profit Per Trade (%) | |
| NNold | October 29, 2018 | 14.9 | July 29, 2019 | 8.3 | March 12, 2020 | 2.9 |
| NNnew | October 29, 2018 | 17.2 | August 06, 2019 | 18.1 | March 16, 2020 | 11.7 |
In the context of this study, the comparative analysis of trading simulation results between the conventional neural network () and the extended feature-based predictor () serves as a compelling illustration of the effectiveness of our proposed method. The results presented in Table 6 not only highlight the performance differences between these two approaches but also provide a practical example of how our extended features contribute to a more consistent prediction of plunging patterns.
For instance, consider Position B, where the -based signal generated a buy recommendation six trading days before the end of the market crash, resulting in early loss cuts for some investors. In stark contrast, the -based signal correctly pinpointed the ideal time for investment. These findings underscore the significance of our extended features, which offer more robust and reliable predictions in real-world scenarios
This example demonstrates the practical implications of our proposed method in the domain of stock market trend prediction. The extended features provide investors with a valuable tool to navigate the complexities of market fluctuations, reduce risks, and optimize their trading strategies. This motivational example illustrates the tangible benefits that can be derived from our approach, reaffirming its relevance and importance in the field of financial analysis.
5.3. Advantages and limitations
This study introduces an innovative approach to predicting stock market trend reversals based on deep learning models, particularly focusing on V-formation patterns. The advantages of this research include technological innovation in applying deep learning models to predict stock market trends and reversals, enhancing predictions through extended features, and empirical validation through real data.
Nevertheless, there are certain limitations to consider. The research relies on historical stock price data over a specific period, limiting the generalization of the model's performance. Additionally, the field of stock price prediction is highly competitive, requiring the model's performance to be compared to similar existing and future studies. Finally, the proposed model's generalizability may be constrained due to its specificity to the chosen period and stock market conditions.
In conclusion, this paper provides a fresh perspective on utilizing deep learning for stock market prediction, particularly trend reversals. It introduces extended input features that enhance predictive capabilities. However, the research has its limitations, and further exploration and practical application in diverse market conditions are warranted.
6. Conclusions
This study was based on the idea that the stock price predictors developed based on neural network training are strongly inclined to assign high prediction scores to plunging stock price patterns right before the V-formation rebound occurs.
Instead of predicting individual stocks, we attempted to predict the market trend reversal in the plunging market using the statistical information of the prediction score of each stock. We introduced extended features in neural network modeling so that more consistent prediction scores can be assigned to plunging patterns.
Furthermore, using the sum of the prediction scores of the top 30 stocks with high prediction scores, we conducted experiments to predict the upward trend-reversal time point of the entire market. In the result of predicting the upward trend-reversal time point in the three market crashes that occurred during the test period, a buy signal was generated at the lowest point for two-time points, respectively. For the remaining one, the signal was generated slightly early, but the trading simulation showed that a profit could be achieved in the end.
Although our current study focused on stock price prediction under specific market conditions and periods, we plan to expand our research in the following directions in the future: First, extension to additional market conditions and regions: While our current research emphasized specific market conditions, it is essential to develop and compare stock prediction models for various market conditions and regions. This will help assess the generalization capability of the models. Second, additional experiments and comparative analyses: In future research, we will perform additional experiments using various data sources and prediction models, comparing these results with the current research. This will extend and enhance the results and performance of the models. Third, the utilization of Explainable Artificial Intelligence (XAI) techniques: We will introduce XAI techniques to make the decision-making process of our models interpretable, thereby improving the explanations and reliability of stock predictions. Lastly, exploration of various asset classes and investment strategies: In the future, we will explore prediction models for not only stocks but also other asset classes and a variety of investment strategies. In this way, our future research aims to overcome the limitations of our current study, expand research in the field of stock market prediction, and provide better results and possibilities for future research.
CRediT authorship contribution statement
Yoojeong Song: Writing – review & editing, Writing – original draft, Visualization, Validation, Supervision, Software, Resources, Project administration, Methodology, Investigation, Funding acquisition, Formal analysis, Data curation, Conceptualization.
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgements
This research was supported by the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (grant number: RS-2022-00165818).
Data availability
A subset of the datasets used or analyzed during the current study is available in the Upward-Reversal repository.
References
- 1.Cottle S., Murray R.F., Block F.E., Dodd D.L. 5th edition. McGraw-Hill; New York, NY, USA: 1988. Graham and Dodd's Security Analysis. [Google Scholar]
- 2.Edwards R.D., Magee J. Stock Trend Service; MA, USA: 1948. Technical Analysis of Stock Trends. [Google Scholar]
- 3.Lo A.W. Long-term memory in stock market prices. Econometrica. 1991;59:1279–1313. [Google Scholar]
- 4.Kendall S.M., Ord K. Oxford; New York, NY, USA: 1997. Time Series. [Google Scholar]
- 5.Chenoweth T., Obradovic Z., Lee S.S. Embedding technical analysis into neural network based trading systems. Appl. Artif. Intell. 1996;10:523–541. [Google Scholar]
- 6.Fama E.F., French K.R. Dividend yields and expected stock returns. J. Financ. Econ. 1988;22:3–26. [Google Scholar]
- 7.Lee R.S.T. iJADE stock advisor: an intelligent agent based stock prediction system using hybrid RBF recurrent network. IEEE Trans. Syst. Man Cybern., Part A, Syst. Hum. 2004;34:421–428. [Google Scholar]
- 8.Lee J.W., Park J., O J., Lee J., Hong E.A. A multiagent approach to q-learning for daily stock trading. IEEE Trans. Syst. Man Cybern., Part A, Syst. Hum. 2007;37:864–877. [Google Scholar]
- 9.Lin X., Yang Z., Song Y. Intelligent stock trading system based on improved technical analysis and echo state network. Expert Syst. Appl. 2011;38:11347–11364. [Google Scholar]
- 10.Lee J.W. Short-term stock price prediction by supervised learning of rapid volume decreasing patterns. KIISE Trans. Comput. Pract. 2018;24:544–553. [Google Scholar]
- 11.O J., Lee J.W., Lee J., Zhang B.T. Dynamic asset allocation exploiting predictors in reinforcement learning framework. Lect. Notes Comput. Sci. 2004;3201:298–309. [Google Scholar]
- 12.Lee J.W., O J. Integrated multiple simulation for optimizing performance of stock trading systems based on neural networks. J. Korea Inf. Process. Soc. B. 2007;14-B:127–134. [Google Scholar]
- 13.Singh R., Srivastava S. Stock prediction using deep learning. Multimed. Tools Appl. 2016;76:18569–18584. [Google Scholar]
- 14.Song Y., Lee J.W., Lee J. Performance evaluation of price-based input features in stock price prediction using tensorflow. KIISE Trans. Comput. Pract. 2017;23:625–631. [Google Scholar]
- 15.Song Y., Lee J. Importance of event binary features in stock price prediction. Appl. Sci. 2020;10:1597. [Google Scholar]
- 16.Song Y., Lee J. Development of intelligent stock trading system using pattern independent predictor and turning point matrix. Comput. Econ. 2020 [Google Scholar]
- 17.Wang J., Zhang Y., Tang K., Wu J., Xiong Z. Proceedings of the Knowledge Discovery and Data Mining Conference. 2012. AlphaStock: a buying-winners-and-selling-losers investment strategy using interpretable deep reinforcement attention networks; pp. 1900–1908. [Google Scholar]
- 18.Lee J.W. A stock trading system based on moving average patterns and turning point matrix. KIISE Trans. Comput. Pract. 2012;18 [Google Scholar]
- 19.Wu Y., Wen X. Short term stock price prediction based on ARIMA model. Stat. Decis. 2016:83–86. [Google Scholar]
- 20.Xu S., Liang X. Research on stock price prediction based on ARIMA-GARCH model. J. Henan Univ. Educ. (Nat. Sci. Ed.) 2019;28:20–24. [Google Scholar]
- 21.Beniwal M., Singh A., Kumar N. Predicting long term prices of nifty index using linear regression and ARIMA: a comparative study. Int. J. Account. Bus. Finance. 2022;2(1):31–41. [Google Scholar]
- 22.Franses P.H., Van Dijk D. Forecasting stock market volatility using (non-linear) garch models. J. Forecast. 1996;15(3):229–235. [Google Scholar]
- 23.Lin Z. Modelling and forecasting the stock market volatility of SSE composite index using garch models. Future Gener. Comput. Syst. 2018;79:960–972. [Google Scholar]
- 24.Wang L., Ma F., Liu J., Yang L. Forecasting stock price volatility: new evidence from the GARCH-MIDAS model. Int. J. Forecast. 2020;36(2):684–694. [Google Scholar]
- 25.Khaidem L., Saha S., Dey S.R. Predicting the direction of stock market prices using random forest. 2016. arXiv:1605.00003 arXiv preprint.
- 26.Khoa B.T., Vinh D.P., Hiep T.T., Quang N.D., Huynh T.T. Predict stock price movement using long short-term memory recurrent neural network and support vector machine. Qual.-Access Success. 2023;24(194) [Google Scholar]
- 27.Noh H., Jang H., Yang C.W. Forecasting Korean stock returns with machine learning. Asia-Pac. J. Financ. Stud. 2023 [Google Scholar]
- 28.Kim H., Cho H., Ryu D. Measuring corporate failure risk: does long short-term memory perform better in all markets? Invest. Anal. J. 2023:1–13. [Google Scholar]
- 29.Song H.J., Lee S.J. A study on the optimal trading frequency pattern and forecasting timing in real time stock trading using deep learning: focused on KOSDAQ. J. Inf. Syst. 2018;27(3):123–140. [Google Scholar]
- 30.Otchere D.A., Ganat T.O.A., Gholami R., Ridha S. Application of supervised machine learning paradigms in the prediction of petroleum reservoir properties: comparative analysis of ANN and SVM models. J. Pet. Sci. Eng. 2021;200 [Google Scholar]
- 31.Ahmad A.S., Hassan M.Y., Abdullah M.P., Rahman H.A., Hussin F., Abdullah H., Saidur R. A review on applications of ANN and SVM for building electrical energy consumption forecasting. Renew. Sustain. Energy Rev. 2014;33:102–109. [Google Scholar]
- 32.Gupta A., Joshi K., Patel M., Pratap V. 2023 International Conference on Power, Instrumentation, Control and Computing (PICC) IEEE; 2023. Stock market prediction using machine learning techniques: a systematic review; pp. 1–6. [Google Scholar]
- 33.Zirilli J.S. ITP-Media; 1996. Financial Prediction Using Neural Networks. [Google Scholar]
- 34.Y. Song, J. Lee, Performance evaluation of deep learning stock price by chart type for buying policy verification, 2018, pp. 646–652.
- 35.Chen T.L., Cheng C.H., Teoh H.J. Fuzzy time-series based on Fibonacci sequence for stock price forecasting. Phys. A, Stat. Mech. Appl. 2007;380:377–390. [Google Scholar]
- 36.Kingma D.P., Ba J. Adam: a method for stochastic optimization. Proceedings of the International Conference on Learning Representations (ICLR); May 7-9, 2015; 2015. [Google Scholar]
- 37.Oh J. Short-term stock price prediction by supervised learning of rapid volume decrease patterns. IEICE Trans. Inf. Syst. 2022;105(8):1431–1442. [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
A subset of the datasets used or analyzed during the current study is available in the Upward-Reversal repository.



