Artificial Neural Network: Comparison
Please note this is a comparison between Version 3 by Catherine Yang and Version 2 by Catherine Yang.

Artificial neural networks (ANN) are known to be able to provide an abnormal return by using technical indicators as predictors in stock markets. The ANN, as a deep learning (DL)  technique is used to recognize patterns or images by imitating the visual processing of living organisms.

  • algorithmic trading
  • fuzzy systems
  • LSTM
  • forecasting
  • Artificial Intelligence

1. Support Vector Machine (SVM)

Support vector machine (SVM) is a supervised learning method aimed to predict and classify items using linear or nonlinear processes [1]. The process allows error within the training data resulting in a significantly reduced error in the tested data. Ref. [2] combined a cumulative auto-regressive moving average with a least squares SVM model to make basic predictions for the stock market. They concluded that their model is more suitable for stock price forecasting than the single forecasting model. Ref. [3] tested the predictability of the NIKKEI 225 index weekly movement direction with the SVM forecasting model and proved that SVM outperforms other classification methods. Furthermore, they offered an improved model that combines SVM with the other classification methods. Ref. [4] used the SVM algorithm to make automated transaction decisions on the Forex market and proved the system’s contribution to successful trading. Ref. [5] examined the predictability of the 12 cryptocurrency prices using SVM and concluded at the daily or minute level frequencies, ML classification algorithms reach about 55–65% of predictive accuracy. Ref. [6] used SVM kernel functions to predict the price directions of cryptocurrency and foreign exchange. They showed that the Radial Basis Gaussian (RBG) SVM forecasting model outperformed other SVM-kernel models.
SVM-based systems are widely used to predict financial asset price trends. Those systems use different models that filter past financial data and produce predictions. They all assume that future price trends can be forecasted by analyzing past correlations between financial assets and that economic conditions are repetitive. Such assumptions are correct under normal market conditions; however, they prove infertile under “Black Swan” conditions that surprise the market from time to time.

2. Long Short-Term Memory (LSTM)

LSTM is an artificial recurrent neural network (RNN) used in the fields of AI and DL. The procedure can process sequences of data simultaneously and it is useful for classifying, processing, and making predictions on time serious data, making it an ideal tool for financial assets price predictions. LSTM includes a cell, input and output gates, and a forget gate (see Figure 1). The cell remembers values while the other three gates control the information flow into and out of the cell.
Figure 1.
 LSTM System. Sources: Refs.
[7][8]
(accessed on 8 March 2022).
C t Ct in Figure 1 is the Cell in which the main processes are conducted, and i t  it, o t  ot and f t  ft are the input, output, and the forget gates. The mathematical process is described in Equations (1)–(5).
 
f t = σ g W f x t + U f c t 1 + b f    
i t = σ g W f x t + U i c t 1 + b i
o t = σ g W o x t + U o c t 1 + b o
c t = f t   o   c t 1 + i t   o   σ c W c x t + b c
h t = o t   o   σ h   c t  
where: ft(0,1)h f t 0 , 1 h is the forget gate activiation vector, f i t 0 , 1 h fit(0,1)h is the input gte activiation vector, o t 0 , 1 h ot(0,1)h is the output gate activiation vector, c t ct is the cell vector, ht(1,1)h h t 1 , 1 h is the output vector, σ g  σg = sigmoid function, σc,σh = hyperbolic tangent functions, W, U is the weight matrix, and b is the bias vector that are learned by training.
The major difference between LSTMs over traditional ANN is that they can learn selectively by remembering and forgetting the required historical data. This can be very useful for the financial assets trading system by setting a specific range of data that the designer wants the algorithm to perform predictions while at the same time, deciding upon the range and scope of data that the system should forget in order not to be destructed by irrelevant data. Ref. [9] ensembled an LSTM model that uses many technical indicators as the network inputs for predicting intraday stock movements of U.S. large-cap stocks. They concluded that the model performed better than benchmark models with lasso and ridge logistic classifiers or equally weighted ensembles. Ref. [10] used LSTM networks with technical analysis indicators to predict future stock prices. Results showed an average of 55.9% accuracy in predicting stock price trend shifts. Ref. [11] compared deep learning methods such as a deep neural network (DNN), a convolutional NN, and a deep residual network, for Bitcoin price prediction. They showed that DNN-based models were the best for price trend prediction of Bitcoin. Moreover, they found that the classification model was more effective than regression models for algorithmic trading. Ref. [12] tested forecasting models using daily cryptocurrency prices. For each cryptocurrency, they used different LSTM models and concluded that the model that is based on 50 days of data performed the best since it has the capability to capture long-term dependencies. Ref. [13] used LSTM for swing traders to predict future stock values. Their system reported the predicted values of the company stock price in the Indian stock market for 30 days. Their system was based on technical indicators such as Support and Resistance levels, Fibonacci retracement levels, MFI, RSI, and the MACD (Support and Resistance levels, Fibonacci retracement levels, MFI, RSI, and the MACD are technical indicators). The results achieved by the proposed model establish the efficacy of the proposed technique. Ref. [14] employs random forests and LSTM networks as training methodologies to forecast the movement of the S&P500 stocks from January 1993 until December 2018 for intraday trading. On each trading day, they bought 10 stocks with the highest probability to outperform the market and sell short 10 stocks with the lowest probability to do it. They showed that a multi-feature setting provided a daily return of 0.64% using LSTM networks. Ref. [15] conducted their research on China’s stock market; their data included opening price, closing price, lowest price, highest price, and daily trading volume of stocks. Their results showed that the LSTM neural network model can predict stock prices with limitations such as time lag of prediction. Moreover, to predict stock price trends, the model should explore internal rules through the selective memory advanced deep learning function of the LSTM neural network model.
The advantage of an LSTM in financial price forecasting is its ability to forget information that the system designer evaluates their relevance and therefore should be ignored after some time to enable correct predictions. This is a delicate task that can damage the system’s prediction ability since the financial markets are very dynamic and the relevancy of any specific data pieces to predictions may change over time.

3. Fuzzy Systems

A fuzzy system is a distinguished formation characterized as a set of interacting components with a well-defined structure. The uniqueness of fuzzy techniques is that they can process information, whereas classical theory or binary logic is impossible. fuzzy systems can model complex and often vague real problems. The inputs of fuzzy systems are sets of data with some degree of classified membership between 0 and 1 representing the strength of belonging to a specific fuzzy set. Fuzzy logic is a method of reasoning that resembles how humans perform decision-making. The fuzzy logic process consists of four main parts, as demonstrated in Figure 2.
Figure 2. Fuzzy Logic Process. Source: https://www.edureka.co/blog/fuzzy-logic-ai.(accessed on 10 July 2022).
Rules are the conditions offered by experts behind the algorithm. The Fuzzifier converts inputs into fuzzy classification sets. The Intelligence determines the degree of match between fuzzy inputs and the set of rules. At this stage, the system can also decide on the set of rules that do not improve prediction and should be dismissed. The final stage is Defuzzification in which the system converts the fuzzy sets into values that can be translated into action orders such as buying or selling a financial asset.
Fuzzy systems are often used in financial forecasting when traditional models have limited prediction power because of nonlinearity and nonstationary often characterizing financial phenomena. Ref. [16] used technical analysis to construct a fuzzy system that is able to perform medium-term optimal financial asset allocation. They showed that their model has outperformed the Buy and Hold (B&H) strategy between 1997 and 2012 for ASE (ASE = Athens Stock Exchange). Refs. [17][18] used a clustering genetic fuzzy system to predict daily stock prices. They used steps models that included stepwise regression analysis, data clustering, and a genetic fuzzy system for stock price prediction and concluded that their model has better forecasting accuracy of short-term stock price than alternative models. Ref. [19] studied the ability of a multi-objective fuzzy system to predict a bull signal or a bear signal in the cryptocurrency market. The fuzzy sets were partitioned as very low, low, medium, high, and very high, later to be used to signal whether a cryptocurrency is bearish or bullish on a specific day. They reported that the system yields a 53% accuracy with 25 days rule length. Ref. [20] proposed a clustering-based adaptive neuro-fuzzy system for predicting apple stock daily price. He used four technical indicators in his study: 1 and 2 weeks simple moving average, 14 days disparity (the disparity index measures the relative position of an asset’s most recent closing price to a selected moving average and reports the value as a percentage) and Larry Williams percent range (the Williams percent range is a momentum indicator that moves between 0 and −100 and measures oversold and overbought levels). The simulation results indicated that the average subtractive clustering-based neuro-fuzzy networks were better than other networks. Ref. [21] boosted the profitability of technical analysis for currency trading using a multivariate fuzzy logic. Their approach yielded consistently higher Sharp ratios (Sharp ratio measures the risk return ratio) for all investigated currencies. Ref. [22] suggests evolving possibilistic fuzzy modeling to forecast realized volatility with jumps. Adding or removing clusters was allowed using statistical distance-like criteria to update the model. The data consisted of global major market indexes (S&P500 and Nasdaq, FTSE, DAX, IBEX, and Ibovespa). Their results show that the possibilistic fuzzy model is highly efficient to model index volatility with jumps in terms of forecasting accuracy. Ref. [23] proposed a hybrid neuro-fuzzy controller to forecast the direction of the daily price of Bitcoin. Their system investment returns were 71.21% higher than the B&H strategy. Ref. [24] used fuzzy if–then rules for their stock trading system. They used three linguistic variables as inputs for the rules: view from the expert, earning-per-share, and price-to-earnings ratio. They concluded that using this fuzzy logic can improve trading results. Ref. [25] tested whether the occurrence of technical patterns along with a membership value is able to signal the future returns of stocks. They matched 1450 U.S. companies with control companies on the basis of market value and previous years’ returns and found that stocks with certain technical patterns can generate abnormal returns after pattern occurrence for up to 120 days. Ref. [26] combined technical analysis and fundamental analysis within a fuzzy system that utilizes 677 stocks from the Indonesian stock market exchange. They concluded that the Fuzzy technique combined with three candlesticks momentum entry buy/sell signals can make trading more rewarding. The use of any trading rule depends on the time frame preferences of the individual trader. Swing traders for example analyze daily and weekly bars (a trading bar contains information about the opening/closing prices along with the high/low levels of a specific time frame) while day traders analyze shorter periods such as an hour or even a few minutes bars and base their decision upon a short period’s momentums. Ref. [27] examined the intraday algorithmic system for trading precious metals futures and found that an RSI-based system produced above the B&H returns of 326.3%, 106.2%, 63.7%, and 22.4%, for palladium, gold, silver, and platinum, respectively, for the examined period. They also recommended that 60 min bars should be used for trading precious metal futures. These results can be useful for intraday traders both manual and algorithmic by implementing the most efficient trading rules and time frames for each of the precious metals futures.
The advantage of the fuzzy systems in predicting financial asset price trends is their relative simplicity and their ability to integrate different sources of information. The problem with such systems is their inability to adjust to changing financial conditions and relaxing predetermined rules that should be changed accordingly.

References

  1. Vapnik, V.N. The Nature of Statistical Learning Theory. Technometrics 1997, 38, 409.
  2. Xiao, C.; Xia, W.; Jiang, J. Stock price forecast based on combined model of ARI-MA-LS-SVM. Neural Comput. Appl. 2020, 32, 5379–5388.
  3. Huang, W.; Nakamori, Y.; Wang, S.-Y. Forecasting stock market movement direction with support vector machine. Comput. Oper. Res. 2005, 32, 2513–2522.
  4. Thu, N.T.; Xuan, V.D. Using support vector machine in Forex predicting. In Proceedings of the IEEE International Conference on Innovative Research and Development, Khlong Nueng, Thailand, 11–12 May 2018; pp. 1–5.
  5. Akyildirim, E.; Goncu, A.; Sensoy, A. Prediction of cryptocurrency returns using machine learning. Ann. Oper. Res. 2020, 297, 3–36.
  6. Hitam, N.A.; Ismail, A.R.; Samsudin, R.; Alkhammash, E.H. The Effect of Kernel Functions on Cryptocurrency Prediction Using Support Vector Machines. In Advances on Intelligent Informatics and Computing; Saeed, F., Mohammed, F., Ghaleb, F., Eds.; Springer: Berlin/Heidelberg, Germany, 2022.
  7. Gers, F.; Schmidhuber, E. LSTM recurrent networks learn simple context-free and context-sensitive languages. IEEE Trans. Neural Netw. 2001, 12, 1333–1340.
  8. Gers, F.; Schraudolph, N.; Schmidhuber, J. Learning precise timing with LSTM recurrent networks. J. Mach. Learn. Res. 2002, 3, 115–143.
  9. Borovkova, S.; Tsiamas, I. An ensemble of LSTM neural networks for high-frequency stock market classification. J. Forecast. 2019, 38, 600–619.
  10. Nelson, D.M.Q.; Pereira, A.C.; de Oliveira, O. Stock market’s price movement prediction with LSTM neural networks. In Proceedings of the International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, USA, 14–19 May 2017; pp. 1419–1426.
  11. Ji, S.; Kim, J.; Im, H. A Comparative Study of Bitcoin Price Prediction Using Deep Learning. Mathematics 2019, 7, 898.
  12. Alessandretti, L.; ElBahrawy, A.; Aiello, L.M.; Baronchelli, A. Anticipating cryptocurrency prices using machine learning. Complexity 2018, 2018, 8983590.
  13. Banik, S.; Sharma, N.; Mangla, M.; Mohanty, S.N.; Shitharth, S. LSTM based decision support system for swing trading in stock market. Knowledge-Based Syst. 2021, 239, 107994.
  14. Ghosh, P.; Neufeld, A.; Sahoo, J.K. Forecasting directional movements of stock prices for intraday trading using LSTM and random forests. Finance Res. Lett. 2022, 46, 102280.
  15. Wei, D. Prediction of Stock Price Based on LSTM Neural Network. In Proceedings of the 2019 International Conference on Artificial Intelligence and Advanced Manufacturing (AIAM), Dublin, Ireland, 17–19 October 2019; pp. 544–547.
  16. Chourmouziadis, K.; Chourmouziadou, D.K.; Chatzoglou, P.D. Embedding Four Medium-Term Technical Indicators to an Intelligent Stock Trading Fuzzy System for Predicting: A Portfolio Management Approach. Comput. Econ. 2020, 57, 1183–1216.
  17. Hadavandi, E.; Shavandi, H.; Ghanbari, A. Integration of genetic fuzzy systems and artificial neural networks for stock price forecasting. Knowledge-Based Syst. 2010, 23, 800–808.
  18. Zarandi, M.H.F.; Hadavandi, E.; Turksen, I.B. A hybrid fuzzy intelligent agent-based system for stock price prediction. Int. J. Intell. Syst. 2012, 27, 947–969.
  19. Satyaloka, D.; Giamiko, S.; Hidayat, A. SK-MOEFS Multi-Objective Evolutionary Fuzzy System Library effectiveness as User-Friendly Cryptocurrency Prediction Tool. In Proceedings of the 2021 International Conference on Artificial Intelligence and Big Data Analytics, Bandung, Indonesia, 27–29 October 2021; pp. 1–5.
  20. Chandar, S.K. Stock market prediction using subtractive clustering for a neuro fuzzy hybrid approach. Clust. Comput. 2017, 22, 13159–13166.
  21. Kleinbrod, V.; Xiaoming, L. Order Flow, Volatility and Fuzzy Logic: Technical Analyses for Currency Trading. 2017. Available online: https://ssrn.com/abstract=2976558 (accessed on 10 April 2022).
  22. Maciel, L.; Ballini, R.; Gomide, F. Evolving Possibilistic Fuzzy Modeling for Realized Volatility Forecasting with Jumps. IEEE Trans. Fuzzy Syst. 2016, 25, 302–314.
  23. Atsalakis, G.S.; Atsalaki, I.G.; Pasiouras, F.; Zopounidis, C. Bitcoin price forecasting with neuro-fuzzy techniques. Eur. J. Oper. Res. 2019, 276, 770–780.
  24. Othman, S.; Schneider, E. Decision making using fuzzy logic for stock trading. In Proceedings of the 2010 International Symposium on Information Technology, Kuala Lumpur, Malaysia, 15–17 June 2010; Volume 2, pp. 880–884.
  25. Zhou, X.S.; Dong, M. Can Fuzzy Logic Make Technical Analysis 20/20? Financ. Anal. J. 2004, 60, 54–75.
  26. Ahmad, M.; Soeparno, H.; Napitupulu, T.A. Stock Trading Alert: With fuzzy knowledge-based systems and technical analysis. In Proceedings of the 2020 International Conference on Information Technology Systems and Innovation (ICITSI), Bandung-Padang, Indonesia, 19–23 October 2020; pp. 155–160.
  27. Cohen, G. Intraday Trading of Precious Metals Futures Using Algorithmic Systems. Chaos Solitons Fractals 2022, 154, 111676.
More