Chaotic Bi-LSTM and attention HLCO predictor-based quantum price level fuzzy logic trading system

There are various indicators, i.e., Relative Strength Index (RSI) [1] [2], Moving Average Convergence Divergence (MACD) [3] [4] [5] [6], Stochastic Oscillator [7] [8] applications, to determine market movements with buying and selling decisions in computational Finance, but they have drawbacks that induced discrepancies to match against the best trading times at fixed order-triggering boundaries and delay problems. For example, RSI [1] [2]’s 70 and 30 overbuy and oversell are fixed boundaries. Orders can only be triggered when RSI’s value exceeds one of these boundaries, its computation only considers past market condition prompting indicators like RSI to trigger orders with delay. In this paper, we proposed a method to reduce these problems with advanced AI technologies to generate indicators’ buy and sell signals in the best trading time. Recurrent Neural Network (RNN) [9] has outstanding performance to learn time-series data automatic with long-time sequences but its ordinary RNN units [10] [11] such as Long-Short-Term-Memory(LSTM)[12] are unable to decipher the relationships between time units called context. Hence, researchers have proposed an algorithm based on RNNs’ Attention Mechanism [13] [14] allowing RNNs to learn information such as chaotic attributes [15] [16] [17] [18] and Quantum properties [19] [20] [21] contained in time sequences. Chaos Theory [15] [16] and Quantum Finance Theory (QFT) [22] are also proposed to simulate these two features (or attributes?). Quantum Price Level (QPL) [22] [23] is one of the well-formed QFT models to simulate all possible vibration levels to locate price. The system used in this paper consists of two components 1) neural network to predict future data and solve indicators lagging problem, and 2) fuzzy logic to solve fixed order-triggering boundaries problem. Its system design has two main parts 1) Chaotic HLCO Predictor consists of LSTM, Lee-Oscillator and attention mechanism to predict the High, Low, Close and Open, 2) QPL-based Fuzzy Logic Trading Strategy to receive the result and trigger trading signals. This new proposed model has obtained significant results in backtesting previous data and outperformed other traditional indicators to facilitate investment decisions when market changes constantly. Codes are available at https://github.com/JarvisLee0423/ Chaotic Quantum Finance AI Predicted Trading System.


Introduction
There are financial indicators such as Relative Strength Index (RSI; Hari and Dewi 2018;Gumparthi 2017), Moving Average Convergence Divergence (MACD; Chong and Ng 2008;Chong et al. 2014), Stochastic Oscillator called KDJ (Ni et al. 2015;Yuan 2019) used in real-time trading with fixed order-triggering boundaries and delay problems. KDJ (Ni et al. 2015;Yuan 2019) for example has two oversell and overbuy trading boundaries. When %K value line reaches 20 or 80, it means the financial market is in oversell or overbuy condition inducing an order that is triggered when either of these two boundaries is set. Therefore, KDJ (Ni et al. 2015;Yuan 2019) is easy to overlook the best ordering time and only consider when %K's value is slightly lower or than the set boundaries.
Communicated by Oscar Castillo.
Zihao Huang, Lirong Lin, Yuchen Guo, are the authors contributed equally to this work.
Extended author information available on the last page of the article RSI (Hari and Dewi 2018;Gumparthi 2017) is another example to disregard the current price in ordering. Since traditional financial indicators apply mostly one-dimensional past financial data to simulate current market conditions, order-trigger delay problems occurred naturally due to market changes constantly.
Researchers learnt that many real-world problems and models in financial market contain chaotic attributes (Hsieh 1991;Klioutchnikov et al. 2017;Mammadli 2017;Ozun et al. 2010) that even a predictable, deterministic model or system such as a three-body problem will become unpredictable in its evolution. Therefore, novel designed predictor with algorithm should be capable (Lahmiri and Bekiros 2019;Ning et al. 2009;Wang and Lee 2021) to learn chaotic attributes or simulate chaos theory and improve prediction in financial market.
Quantum Mechanics and Quantum Field Theory development or Quantum Mechanics in financial market, socalled Quantum Finance Theory (Ataullah et al. 2009;Gao and Chen 2017;Meng et al. 2016;Lee, R.: Quantum finance (2020). 2020) with models such as Quantum Price Level (QPL; Lee 2022) has obtained outstanding prediction performance to chaotic attributes. QPL can be regarded as resistance and support levels in any financial market that can label all possible products price vibration levels. QPLs (Lee 2022) can also be regarded as a type of financial data like high, low, close, open, and volume. They can cooperate with advanced artificial intelligence model as training data to learn from abstract features or possible vibrating price location in market to compute the latest QPLS (Lee 2022) with current price conditions to perform prediction condition.
Recurrent neural network (RNN ;Elman 1990;Shin et al. 2017;Rehman et al. 2014;Balcazar et al.2022;Rubio et al. 2022;Aguilar-Ibanez et al. 2021;Soriano et al.2021;Soriano et al. 2020;Silva-Ortigoza et al. 2021) is applied to construct the predictor time-series financial data for an advanced artificial neural network. Long-Short-Term-Memory units (LSTM; Gers et al. 2000;Pawar et al. 2019) Chen et al. 2015;Nelsons et al. 2017;Bao et al. 2017;Fischer and Krauss 2018) are also applied for its outstanding performance in learning time-series features to predict the next day's high, low, close, and open prices. This proposed predictor is split into two independent LSTM units similar to the sequence-to-sequence model in machine translation (Luong et al. 2015), enabling one LSTM model called the encoder to learn time-series features and another LSTM model called the decoder to perform prediction. They are modified so that the encoder is a bidirectional LSTM unit to extract more time-series features. Attention Mechanism Luong et al. 2015;Chen and Ge 2019;Cheng and Huang 2018) is assigned to assist decoder to learn the context of timeseries features relationships with a novel designed QPLsbased (Lee, 2020;Lee 2022) Fuzzy Logic (Tanaka 1996;Kosko 1993;Novak 2012) trading strategy to trigger orders. QPLs (Lee 2020;Lee 2022) will be one of the fuzzy variables to construct the fuzzy logic system where high and low values predicted by the above predictor will be another fuzzy variable. They also assist neural network model to learn in-depth and abstract features from financial market. Further, Chaotic Neuro-Oscillator neural network (Kwong et al. 2009;Kwong et al. 2008;Wong et al. 2008;Wang and Lee 2021;Aihara et al. 1990;Lee 2019a;Lee 2019b) is applied to the model design for chaotic attributes (Hsieh 1991;Klioutchnikov et al. 2017) management.
The system proposed is designed to solve lagging and fixed boundary problems occurred in traditional financial indicators. Lagging is due to mainstream financial indicators such as MACD and KDJ being based on past financial information; it is impossible to predict the future market trend accurately. Fixed trading boundaries are also absolute to withhold compatibility of market changes. Hence, the model proposed to predict future changes through existing neural network algorithms to indemnify the lagging nature of mainstream financial indicators, whereas fixed boundary in the trading strategy is transformed into an interval by fuzzy logic sensitive to market changes. This paper is aimed to propose a process based on Attention Mechanism Luong et al. 2015), Bidirectional LSTM (Gers et al. 2000), Chaotic Neuro-Oscillator (Lee 2004;Kwong et al. 2009;Kwong et al. 2008;Wong et al. 2008), Quantum Price Level (Lee; Lee 2022) and combine a novel fuzzy logic-based trading strategy (Lahmiri and Bekiros 2019;Ning et al. 2009) to indemnify fixed ordertriggering boundaries and traditional finance indicators (Hari and Dewi 2018;Chong and Ng 2008;Ramadoss and Muthuvel 2013;Ni et al. 2015;Wang and Lee 2021) dilemma. They are incorporated by a Chaotic HLCO Predictor to handle financial time-series data and predict future High, Low, Close and Open (HLCO) with Quantum Price Level from the predicted data to generate a Fuzzy Logic Trading System.
It was found that neural networks such as RNN (Recurrent Neural Networks) proposed in 1990 (Elman 1990) have a significant role in financial forecasting. Since then, other neural networks and architectures such as LSTM (Gers et al. 2000) and GRU (Cho 2009) have been applied. LSTM with RNN and GRU are used by most industries to model stock market price changes (Shin et al. 2017;Pawar et al. 2019) prediction at US stock market DJIA (Nelson et al. 2017;Fischer and Krauss 2018), China (Chen et al. 2015), and Hong Kong (Chen and Ge 2019).These neural networks are also used to predict forex trading (Rehman et al. 2014).
A single neural network has not proven effective in financial forecasting. Attentive mechanism ) is introduced to deal with rapid and high weighted trades sets in financial transactions. It has achieved satisfactory results in sequential financial data models (Luong et al. 2015), i.e., added to LSTM for stock prediction (Cheng and Huang 2018).
Financial markets can be regarded as a quantum physics mapping in quantum finance theory, i.e., wave-particle duality in quantum mechanics and uncertainty principle in quantum field theory are counterparts in financial markets (Lee 2020). For example, if current price of a product in financial market is a particle property, its price movement can be regarded as a wave property (Ataullah et al. 2009). Researchers used these quantum physics-based properties to model financial markets. Quantum Price Levels (Lee 2020) are amongst one of the indicators to model, and use as support and resistance levels.
Unlike traditional computer logic, i.e., 1 for yes and 0 for no, the proposed fuzzy logic (Kosko 1993) has improved ambiguous scenarios (Tanaka 1996) and enabled traditional financial market indicators to regulate single value is fuzzified to assist traders' investment decisions.

Chaotic HLCO Predictor
Chaotic HLCO Predictor is a traditional sequence-to-sequence model that contains an encoder, a decoder, and a simple Attention Mechanism (Bahdanau et al. 1409;Luong et al. 2015) as High, Low, Close, and Open predictor to extract time-based features from financial time-series data. Lee-Oscillator (Lee 2004;Wong et al. 2008;Wang and Lee 2021;Lee 2019a;Lee 2019b) is applied simultaneously to replace activation functions and enable encoder to learn the chaos occurred in financial market.
Long-Short Term Memory (LSTM) unit (Gers et al. 2000;Pawar et al. 2019;Chen et al. 2015;Nelsons et al. 2017) can process time-series data and avoid gradient vanishing and exploding; thus, it is used for encoder implementation. Further, a bi-directional LSTM is applied in encoder to extract in-depth time-series features to process data from forward and backward directions.
A Chaotic HLCO Predictor decoder is to decode extracted time-series features from encoder, a unidirectional LSTM will only be applied into decoder to perform High, Low, Close, and Open's prediction. An architecture of a sequence-to-sequence model pipeline is illustrated in Fig. 1 and Eq. 1. where X T is the set of time series data like X T = (x 1 , x 2 ,, x t ), Encoder and Decoder consist of LSTM unit, Lee means Lee-Oscillator, and Atten is the simple attention mechanism. An attention mechanism Luong et al. 2015;Chen and Ge 2019;Cheng and Huang 2018) has applied in decoder to understand encoding to predict High, Low, Close, and Open based on time-series features extracted by encoder. It has performed satisfactorily to understand relationships between the context of time-series data and Luong et al. 2015) applied a punishing method to assign weights to input data, and indicate the currently used times data as illustrated in Fig. 2.
It showed that encoder's output and decoder's previous hidden state received are two inputs. A matrix multiplication and a softmax function will be applied for these two parts to generate the weight called alpha. Then, another matrix multiplication will be used between alpha and encoder's output to generate content and become decoder's input. Its mathematical expressions are shown in Eqs. 2 and 3.
where alpha t is the weight for current time-series t of the decoder, s t-1 is the hidden state for previous time-series t -1 of decoder, a is the output from encoder, and content t is the input for current time-series t of decoder.
It is necessary to model a predictor that can deal with chaotic attributes (Hsieh 1991; Klioutchnikov et al. 2017) and obtain reliable prediction in financial market. Lee-Oscillator (Lee 2004;Wong et al. 2008;Wong et al. 2010) is applied in enabling the encoder to learn and simulate chaotic attributes. It is used directly (Wong et al. 2010) to replace all activation functions (tanh and sigmoid in LSTM) in encoder to generate a Chaotic Neural Network (Kwong et al. 2009; Lahmiri and Bekiros 2019) (Ning et al. 2009;Wang and Lee 2021;Aihara et al. 1990; Lee 2019a) called Chaotic Encoder. Lee-Oscillator's formula in encoder is shown in Eqs. 4, 5, 6 and 7.
where f is the activation function, x is the stimulation of Lee-Oscillator which is input data, t is the iteration number for Lee-Oscillator, a n and K are hyper-parameters, and u t , v t , w, and z t are excitatory, inhibitory, input and output. There are Wong-oscillator and Lee-oscillator (Lee 2004) used to describe chaotic attributes in the system but an extra chaotic region of Wong-oscillator bifurcation diagram is unable to fit in the activation function like sigmoid function. Thus, Lee-oscillator was selected to be of the current activation function chaotic replacement. This property is illustrated in Fig. 3.
It was noted that a single type of Lee-Oscillator is insufficient to handle chaotic attributes in all financial products (Lee 2019a) due to highly stochastic and different intrinsic properties in various financial markets. There are 5 Lee-Oscillator categories (Type A, B, C, D, and E) leading to 5 different predictor types applied in Chaotic HLCO Predictor. Their hyper-parameters are shown in Table 1 with the first four types being proposed to simulate chaotic condition effectively in Wong et al. (2010). Bifurcation graphs of these five tanh activation functions are shown in Fig. 2 The architecture of the simple Attention Mechanism Fig. 3. The original four types of Lee-Oscillators' bifurcation ranges are significant in bifurcation graphs. It showed that the bigger bifurcation range will be occurred in a volatile system. A Type-E Lee-oscillator is designed to reduce its bifurcation range for performance evaluation. It also showed that the range was the only difference between Lee-Oscillator-based tanh activation function and its sigmoid activation function.

QPL-based fuzzy logic
A fuzzy logic (Tanaka 1996;Kosko 1993 Fuzzy logic in the proposed system is to obtain a trading strategy consistent with market. Further, this trading strategy is robust to market volatility. High and Low obtained from prediction are amongst the selected fuzzy variables to reflect market changes while QPLs are to reflect potential market volatility. This fuzzy logic trading strategy considers future trading conditions than only previous condition ones due to one of the fuzzy variables being predicted future. High and Low values as compared with traditional financial indicators to deal with trading delay problem. Meanwhile, QPLs (Lee 2022) are indicators to conduct past financial market condition than traditional financial indicators. Thus, the fixed trading boundaries problem from traditional financial indicators can be solved by a Fuzzy Logic QPL Trading Strategy of the system. There are two main fuzzy variables in this fuzzy logic trading strategy 1) current High and Low values and 2) QPLs (Lee 2022) generated by the latest 2048 trading days' financial data.  High-Low fuzzy variables are the predicted daily financial data generated by Chaotic HLCO Predictor. It will automatically collect the latest past-20-days financial data after each day trading hours and feed them into a welltrained Chaotic HLCO Predictor to generate the predicted daily high and low values for the next day.
QPLs (Lee 2020;Lee 2022) are another fuzzy variable calculated by price return (Ataullah et al. 2009) of the latest 2048 trading data. Price return is the quotient between current and previous days' close. After obtaining the latest 2048 days' price return for each day, all will be used to generate a probability density function (PDF; Ataullah et al. 2009) by Eq. 8. pdf r ð Þ ¼ num of the occurrence of a return num of the total trading days ð8Þ Once PDF (Ataullah et al. 2009) is obtained, Quantum Finance Theory (QFT; Lee 2020) and Quantum Finance Energy Level (QFEL, Eq. 9) are applied to generate 42 Quantum Price Levels (QPLs; Lee 2022).
where E(n) is the n th Quantum Finance Energy Level, K 0 (n) is a constant, and k is the coefficient (Lee 2022). There are overbuy, oversell, and no-order memberships for all fuzzy variables in this fuzzy logic (Tanaka 1996;Kosko 1993; Novak, V., Perfilieva, I., Mockor, J. 2012) similar to traditional financial indicator RSI (Gumparthi 2017). When fuzzy variable value is smaller than boundary, an oversell membership will be triggered. If it is larger than a boundary, an overbuy membership will be triggered. Meanwhile, there is an interval to trigger an no-order membership where overbuy and oversell boundaries lie within this interval. There are four boundaries for these three memberships' functions; a standard trapezoidal membership function is applied in this fuzzy logic formation.
For High-Low fuzzy variable membership function, the high and low values represent overbuy and oversell memberships boundaries. The two remaining no-order membership boundaries are the closest QPLs (Lee 2022) above high value (QPL H ) and below low value (QPL L ). Their High-Low fuzzy variable memberships' functions are illustrated in Fig. 4.
Trading behavior is considered to drive market movements. Traders gained by buying at low prices and selling at high prices without considering shorting (what does it mean?) and inclined to hold (position/investment?) when the market is stable. This trapezoid membership function can describe this behavior because of two state existences: change and stability which correspond to trade and hold (position/investment?) in the market.
There are 42 QPLs (Lee 2022) split into positive and negative types with 21 QPLs on each type. The first two positive QPLs and the first two negative QPLs are selected to four membership function boundaries of QPLs fuzzy variables in descending order (QPL ? 2 [ QPL ? 1 [ QPL -1 [ QPL 2 ). Their memberships' functions are illustrated in Fig. 4.
Fuzzy rules for this fuzzy logic (Kosko 1993;Novak, V., Perfilieva, I., Mockor, J. 2012) are formulated to combine the membership between QPLs (Lee 2022) and High-Low fuzzy variables. These rules consist of operate and no-operate (Operate means to trigger buy or sell order) attributes. If and only both QPLs (Lee 2022) and High-Low memberships are at overbuy or oversell, then the fuzzy rule will be in operate status. Once a no-order membership is occurred, the fuzzy rule will be in no-operate status. If both oversell and overbuy memberships occurred, fuzzy rules become meaningless. Meanwhile, an AND fuzzy-logic (Novak, V., Perfilieva, I., Mockor, J. 2012) operation is applied to each fuzzy rule to combine two different memberships which means that the smallest memberships will be the final value of fuzzy rule. Details of fuzzy rules are illustrated in Table 2.
QPLs, High, and Low values are regarded as support and resistance levels. When the price is vibrated within QPLs range or the High and Low values, it means that the market is stable. In this case, investors are comfortable and do nothing on their investments. On the other hand, when the price is lower or higher than QPLs or the High and Low values, it means the price has a significant change in the market. In this case, buy or sell orders will be operated by investors according to market condition changes. When the price lies on these two circumstances, investors have no operate and operate statuses. Because the top of standard trapezoidal membership function is maintained in a fixed value, it can be used to fit into these two conditions. The trapezoidal waist can also be described as investors indecision to operate or not operate at market change. Thus, a standard trapezoidal membership function is selected.
Defuzzification (Novak, V., Perfilieva, I., Mockor, J. 2012) is a requisite method to combine all fuzzy rulesresults and obtain the fuzzy logic result. A weighted average defuzzification method is applied to complete this process (Novak, V., Perfilieva, I., Mockor, J. 2012). KDJ (Ni et al. 2015;Yuan 2019) is to compute and assign weight for each membership where strategy boundaries are 20 and80. Weights computation for each membership is illustrated in Eqs. 10, 11 and 12.
w Oversell ¼ buy + 5 2 ð10Þ where buy and sell are the strategy KDJ boundaries, which means buy = 20 and sell = 80. After obtaining weights for all memberships, defuzzification results will be computed by using Eq. 13.
where Df is the result of defuzzification, f i is the result of i th fuzzy rules, and w i is the weight for f i . Weights have strong effects on defuzzification result. Defuzzification result has the same attribution as KDJ (Ni et al. 2015;Yuan 2019), meaning that the result value is between 20 and 80. In this case, the strategy boundaries of fuzzy logic are also 20 and 80 for oversell and overbuy, respectively, after defuzzification.

Trading strategy
Following Chaotic HLCO Predictor and the QPLs-based Fuzzy Logic system implementation, a trading strategy is to be devised. Since trading hours are from 0700 to 2100, at 2100 daily, EA program will compute the latest QPLs (Lee 2022), QPLs membership function, collect the latest 20 days financial data and feed into Chaotic HLCO Predictor to generate the next day's High and Low values, then the predicted High and Low values will be used to compute the High-Low membership function. During trading hours, both buy and sell orders can only be triggered once when the defuzzification value is lower than 20 or higher than 80, sell order cannot be triggered when there is no completed buy order.

Experiments
There are mainly two different experiments containing in the proposed system 1) Chaotic HLCO Predictor and 2) backtest of QPLs-based Fuzzy Logic Trading Strategy.
Past market information is required to predict the future HLCO. Thus, the past HLCO of each day and the calculated 42 QPLs are selected as input data. HLCO is an intuitive representation of past market volatility with 42 QPLs to reflect the potential volatility of past market. These data contain market information to feed the predictor to forecast future data. It simulates the wave function in quantum mechanics through the probability density function of past return information and analogizes financial market to quantum world. That is, it required financial information to simulate a complete probability density function. 2048 days of financial data in papers (Lee 2020;Lee 2022; what do in papers mean -delete?) are used to simulate acceptable QPLs; thus, 2048 trading days of HLCO and QPLs from December 31, 2020, onward are selected as input data for the predictor.  Each day the data consists of 46 financial data that are Open, High, Low, Close, 21 positive QPLs, and 21 negative QPLs (Lee 2022). The training data shape of 20 46 are fed into Chaotic HLCO Predictor meaning that Chaotic HLCO Predictor will receive the previous 20 days financial data to predict the 21 st day's High, Low, Close, and Open. Experiments tested 90% of total financial data on the training set and 10% of the total financial data, respectively.
There are two different models applied to train these data 1) Chaotic HLCO Predictor with 5 categories of Lee-Oscillators (Wong et al. 2010), and 2) HLCO Predictor without using Lee-Oscillator called Non-Chaotic Predictor. Non-Chaotic Predictor is used as the control group to test Lee-Oscillator (Wong et al. 2010) performance. Recurrent Neural Network (RNN) unit (Elman 1990 The entire predictor training experiments are separated into two stages. First stage consists of 16 models where 8 models for Chaotic HLCO Predictor with Type-E Lee-Oscillator (Wong et al. 2010) and 8 models are for Non-Chaotic Predictor.
Second stage consists of 6 models in total. Results with the best performance using Chaotic HLCO Predictor in stage one are selected to continuous training with 5 categories of Lee-Oscillators (Wong et al. 2010) and one without any Lee-Oscillator. Details of these two training stages are shown in Tables 3 and 4.
Predictors are trained with 100 epochs, 32 batch-size, and the random seed for all parameters initialization is 1. Optimizer is Adam gradient descent with weight decay equals 5e-5. Meanwhile, the cosine anneal learning rate decay is applied to tune the learning rate from 5e-4 to 1e-10 on 100 epochs. Also, loss function is the mean squared error loss (MSE Loss) with the maximum iterations number of each Lee-Oscillator is 100. Final loss and accuracy with an acceptable error smaller than 5e-2 are recorded as training results.
There are 7 control group sets which include 1) QPLsbased Fuzzy Logic Trading Strategy with high and low predicted by chaotic model (Chaotic Fuzzy Logic, CFL); 2) QPLs-based Fuzzy Logic Trading Strategy with high and low predicted by non-chaotic model (Non-Chaotic Fuzzy Logic, NCFL); 3) Pure QPLs strategy (QPL; Lee 2022) that only used the first positive and negative QPLs for ordertriggering boundaries; 4) RSI (Hari and Dewi, 2018;Gumparthi 2017) with 14 h periods; 5).
KDJ (Ni et al. 2015;Yuan 2019) with default setting in MetaTrader4; 6) SMA (Ramadoss and Muthuvel 2013; M'ng, J.C.P. 2018) with short period equal 5 h and long period equal 14 h; and 7) MACD (Chong and Ng 2008;Chong et al. 2014) with default setting in MetaTrader4.   Chaotic Bi-LSTM and attention HLCO predictor-based quantum price… 13413 Total net profits, gross profits, gross loss, numbers of profit and loss trade results are recorded as shown in Table 5.

Training analysis
Stage-1 training experiment results are shown at Table 3. It showed that both chaotic and non-chaotic predictor achieved satisfactory performance. Chaotic HLCO Predictor with bidirectional LSTM (Gers et al. 2000) and simple Attention Mechanism (Bahdanau et al. 1409;Luong et al. 1508) achieved the best performance amongst all chaotic predictors, whose MSE loss is 0.00051; and accuracy with an acceptable error smaller than 0.05 is 96.244%. It also noted that Chaotic HLCO Predictor with GRU (Cho et al.1409) and simple Attention Mechanism achieved outstanding performance, whose MSE loss is 0.00055 and 96.210%. Non-Chaotic HLCO Predictor achieved satisfactory performance than Chaotic HLCO Predictor to predict next day's high, low, close, and open due to highly stochastic and chaotic attributes of Lee-Oscillator (Wong et al. 2010). Non-Chaotic HLCO Predictor with bidirectional LSTM and simple Attention Mechanism achieved the lowest MSE loss in stage-1 training experiments which is 0.00007, and 99.9% almost equal 100% accuracy. Although Non-Chaotic Predictor has satisfactory performance than Chaotic Predictor to predict next day's high and low values, Lee-Oscillator (Wong et al. 2010) has ability to learn chaos in financial market for the predictor in contrast to Non-Chaotic Predictor that cannot function individually.
Further, the best chaotic model is selected to continue experiments to check whether chaotic attributes in market remain significant in prediction to make decisions, the results in decision parts show that the chaotic attributes are significant in market as shown in Table 5. It also demonstrated that the performance of all Chaotic Predictor (CFL) is better than Non-Chaotic Predictor (NCFL) meaning that chaotic attributes in market are significant to effect trading performance and the Non-Chaotic Predictor cannot simulate chaotic attributes well without Lee-Oscillator assistance.
Meanwhile, the difference between Chaotic Predictor and Non-Chaotic Predictor accuracy is smaller than 4%, which is acceptable. Thus, both Chaotic Bi-LSTM Attention Predictor and Non-Chaotic Bi-LSTM Attention Predictor are selected to test for other Lee-Oscillators (Type-A, B, C, and D;Wong et al. 2010) categories at stage-2 training experiments with results shown in Table 4. They showed that all five categories of Lee-Oscillators achieved similar performance in predicting high and low values. Maximum accuracy difference amongst all Chaotic Predictors approximately equal 1%. Although Type-B chaotic predictor achieved the best performance amongst all Chaotic Predictors, whose MSE loss is 0.00052 and 96.495% accuracy, it is lower than Non-Chaotic Predictor.

Backtest analysis
There are 10 different foreign exchanges selected for backtests. It is possible that they may have different chaotic intrinsic attributes (Hsieh 1991;Klioutchnikov et al. 2017;Lee 2019a). Thus, all stage-2 well-trained predictors are used to provide the predicted high and low values for QPLs-based Fuzzy Logic Trading Strategy and examine whether these chaotic attributes occurred in market are indicative to trigger orders (Mammadli 2017). Results are shown in Table 5.
It showed that QPL represents pure QPLs-based trading strategy (Lee 2022), CFL-X represents Chaotic Predictorbased Fuzzy Logic trading strategy and X represents the type of Lee-Oscillator (Wong et al. 2010), and NCFL represents Non-Chaotic Predictor-based Fuzzy Logic trading strategy (overall results of CFL listed in A). According to total net profits, the overall performance of the proposed Chaotic Predictor-based Fuzzy Logic trading strategy has outperformed all other strategies.
It also noted that CFL trading strategy has two ways to improve total net profits performance 1) increase the numbers of profit trade and 2) decrease the numbers of loss trade as compared with traditional financial indicators (Gumparthi 2017;Chong and Ng 2008;Ramadoss and Muthuvel 2013;Ni et al. 2015), but these two conditions may not occur simultaneously. For example, the total net profits of CFL trading strategy for EURAUD are 3554.79, but KDJ (Ni et al. 2015) trading strategy only achieved 262.43. By studying the gross profits and loss of these two strategies, it is obvious that CFL trading strategy maintains gross profits and disregards gross loss simultaneously to maximize total net profits. On the contrary, the way to maximize the total net profits in RSI (Gumparthi 2017) trading strategy with CFL is to maintain the gross loss but magnify substantial amounts of gross profits. Meanwhile, these two improvements can be found in SMA (Ramadoss and Muthuvel 2013) trading strategy simultaneously showing that, gross profits have increased from 2643.86 to 5625.06 and gross losses have decreased from 6419.00 to 2070.27. It also noted that this phenomenon in EURAUD occurred in all remaining backtests.
CFL trading strategy considers financial conditions from three aspects: past, current, and future for improvements. Chaotic HLCO Predictor contains past and future financial conditions of past 20 days financial data to complete future's high and low values prediction. For backtest, since the value of each membership of all fuzzy variables are computed using product's current price in each hour, thus, CFL can oversee product's price current vibration and other variation, while almost all traditional financial indicators (Gumparthi 2017;Chong and Ng 2008;Ramadoss and Muthuvel 2013;Ni et al. 2015) only consider past financial conditions without current price variation. CFL trading strategy is possible to provide a more appropriate order-trigger boundary and time in this case.
Overall, our systems and trading strategies outperform traditional technical indicators in the cast majority of cases. In addition, we also compare with the CRNN (Wang and Lee 2021) which also used Lee-Oscillator. It shows that our model is superior in terms of accuracy in fitting the price change trend. Not only that, our model exhibits more accurate prediction values in comparison with high frequency forex trading systems that also used LSTM (Rundo 2019), shown in Table 6.
Further, pure QPLs-based (QPL; Lee 2022) and Non-Chaotic Fuzzy Logic (NCFL) trading strategies are applied to examine whether fuzzy logic (Tanaka 1996) is efficient. It is obvious that NCFL has minimized both profit and loss trade as compared with QPL because fuzzy logic can fuzzy the fixed boundaries in QPL leading trigger order boundaries become an interval rather than fixed boundaries. When a fixed boundary condition has arrived in this case, an order may not trigger and remain in an ambiguous interval state. Although NCFL can use an ambiguous interval state to reduce the numbers of orders trigger, it is unable to provide appropriate decisions in ordering as CADCHF, EURAUD, and GBPUSD results are shown in Table 5. Their backtest performances with NCFL are lower than QPL because this ambiguous interval state maybe rigid to reduce the numbers of orders trigger.
Nevertheless, NCFL drawback is fixed by chaotic attributes (Hsieh 1991;Klioutchnikov et al. 2017;Mammadli 2017) at financial market in some ways. It found that almost all CFLs' profit and loss trade quantities are between NCFL and QPL as compared with both NCFL and QPL. This showed that chaotic attributes in financial market can mitigate fuzzy logic's (Tanaka 1996) ambiguous interval state of order-trigger reduction and retain fuzzy logic competence such as optimal CFL's backtest results are achieved in 9 out of 10 backtests (except CADCFH).

Conclusion
In this paper, the trading system proposed is aimed to manage fixed boundaries and order-trigger delay problems occurred in traditional financial indicators (Chong and Ng 2008;Ramadoss and Muthuvel 2013;Ni et al. 2015). Chaotic HLCO Predictor (Kwong et al. 2009; Wang and Lee 2021; Lee 2019a) provides predicted future financial data for QPLs-based (Lee 2022) fuzzy logic (Tanaka 1996;Kosko 1993;Novak, Perfilieva, Mockor 2012) and combine predictor with fuzzy logic. It has the ability to 1) consider three-dimensional past, current, and future financial data, and 2) solve order-triggering problems satisfactory. It showed that QPLs-based Fuzzy Logic with a Chaotic HLCO Predictor achieved the best performance amongst all backtests. However, Chaotic HLCO Predictor accuracy is marginally lower than Non-Chaotic, and rigid ambiguous interval state to reduce orders-trigger requires further studies. However, Lee-Oscillator would reduce Chaotic HLCO Predictor accuracy because of the stochastic effect that would require further research I.

Future works
Although the proposed system achieved satisfactory training and backtest results, improvements are required for below areas: (1) Chaotic HLCO Predictor's accuracy performance is marginally smaller than Non-Chaotic Predictor and since it consumes long training time, time reduction study at Lee-Oscillator (Wong et al. 2010) is required.
(2) There are only five categories of Lee-Oscillators (Wong et al. 2010) used in the proposed system at present which is insufficient to solve chaotic attributes (Lee 2019a) of all products. Genetic algorithm (Kim and Ahn 2012) studies can be applied to fine-tune Lee-Oscillator's hyper-parameters to fit specific product. (3) Fuzzy logic is rigid to reduce trigger orders.
Although chaotic attribute can mitigate this phenomenon, fuzzy variables, rules, and defuzzification require modification to solve this problem. (4) It was noticed that an extra order-triggering condition occurred at back-test without selling orders triggered. Since all buying orders will only be settled when the price arrived at stop loss or expected profits lines. Further study on how system to trigger efficient sell order is required. (5) Some orders can be reduced by the proposed system without target order numbers at present. Both profit and loss trades are reduced in backtest as compared with QPL trading strategy. Thus, target-oriented functions to maximize profits trade and minimize loss trade are required. (6) The proposed system can be regarded as a novel indicator like RSI (Gumparthi 2017), KDJ (Ni et al. 2015), etc. It can also be used to collaborate with other traditional financial indicators to further improve trading strategies efficiency. (7) Many traditional financial indicators such as RSI (Gumparthi 2017), KDJ (Ni et al. 2015), MACD are used commonly in hour-period, whereas the predicted high and low value of the proposed system is based on day-period. It is possible for further experiments to change from day to hour-period prediction or even shorter to, i.e., 30 min for performance evaluation.
A backtests results of 5 categories Leeoscillators.