Please note this is a comparison between versions V1 by GIL COHEN and V4 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

Support vector machine (SVM) is a supervised learning method aimed to predict and classify items using linear or nonlinear processes ^{[1]}[15]. The process allows error within the training data resulting in a significantly reduced error in the tested data. Ref. ^{[2]}[16] 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]}[17] 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]}[18] used the SVM algorithm to make automated transaction decisions on the Forex market and proved the system’s contribution to successful trading. Ref. ^{[5]}[19] 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]}[20] 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.

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.

C_{t} Ct in **Figure 1** is the Cell in which the main processes are conducted, and i_{t}, o_{t} and f_{t }ft are the input, output, and the forget gates. The mathematical process is described in Equations (1)–(5).

ft=σg(Wfxt+Ufct−1+bf)

it=σg(Wfxt+Uict−1+bi)

ot=σg(Woxt+Uoct−1+bo)

ct=ft o ct−1+it o σc(Wcxt+bc)

$$$$
f
t
=
σ
g
W
f
x
t
+
U
f
c
t
−
1
+
b
f

ht=ot o σh (ct)

$$$$
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: f_{t}∈(0,1)^{h} is the forget gate activiation vector, fi_{t}∈(0,1)^{h} is the input gte activiation vector, o_{t}∈(0,1)^{h} is the output gate activiation vector, c_{t} is the cell vector, h_{t}∈(−1,1)^{h} is the output vector, σ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]}[23] 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]}[24] 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]}[25] 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]}[26] 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]}[27] 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]}[28] 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]}[29] 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.

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**.

Fuzzy Logic Process. Source:

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]}[30] 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]}[31,32] 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]}[33] 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]}[34] 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]}[35] 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]}[36] 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]}[37] 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]}[38] 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]}[39] 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]}[40] 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]}[41] 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.