Abstract
The proposed paper presents the analysis, design, implementation and evaluation of an ultra-short-term frequency trading system for the foreign exchange market (FOREX), which features all stages of the trading process (Pre-Trade Analysis, Trend Forecasting, Trade Execution). The system uses artificial intelligence techniques in an environment that is constantly changing according to the decisions of the participating trading simulators. Our goal is to simulate the judgment and decision-making of the human expert (technical analyst or broker) in a closed world trading system that constantly adjusts exchange rates. We examine the system in terms of its contribution to how exchange rates are affected in an environment which solely consists of traders, without any exogenous factors, and show that our system can outperform all conventional technical indicators, thereby indicating that it could also play the role of facilitating the stabilization of a market by squeezing out non-intelligent traders. We designed and implemented a self-adjusting trading environment whose exchange rate price is only affected by trading within the environment (closed world assumption). We based our work on a modified series of technical indicator simulators, which are fed to an artificial neural network architecture, to eventually generate the trend forecasting signal and a series of customizable ultra-short term automated trading machines, which perform real-time virtual transactions based on the generated forecasting signals. A comparative analysis of the results is carried out to confirm that the proposed architecture outperforms traders based only on the conventional technical indicators while we also document the behavior of the system towards facilitating the attainment of an equilibrium.
Keywords
Introduction
The largest share of foreign exchange market profits, especially foreign exchange (FOREX) market profits [1], derives from extended margin-based leveraging [2]. Leverages as high as 1–200 (i.e. someone with an initial capital of 1000 € is allowed to risk a capital of 200.000 €) are a source of high risk for trading (even within a few minutes). Therefore, it has been argued that forecasting models as well as the accompanying systems of algorithmic trading [3] should be based on short time periods.
Economists have been trying for several decades to build models for successfully forecasting trends. These efforts gave birth to the field termed as technical analysis. Despite a large number of long and arduous attempts no indicator or model of a sufficiently generic nature has been developed so far that can forecast with great success the trend of the financial markets. The main reason for this is that technical analysis does not take into account the most recent changes of fundamentals, which have not been yet recorded, nor the effect of breaking news on the psychology of investors. Moreover, examining technical analysis indicators and their usage in trading [4] requires so much time that the appreciation of short term (sometimes, within seconds) changes in exchange rates is rendered practically impossible. In markets of considerable depth and volume, such as the FOREX one, exploiting micro-changes within a minimum time frame is of paramount importance and can be achieved with ultra-short term trading [5].
In our previews work [6] we have designed and built a tick-to-tick ultra-short term trading system, which includes all stages of the trading process, namely, pre-trade analysis, production of the transaction mark (trend prediction) and execution of transactions, for ultra-short term transactions in the FOREX market. The system is fully customizable and has been built using a lean object-oriented approach. This has allowed us to simultaneously test a large number of automated trading machines, which, in turn, drew predictive data from a series of technical indicator simulators, as well as from a neural network system attempting to online learn how to correctly forecast a new technical indicator. The dataset consisted of over 10 million data points and we have fed it through a set of 32 automated trading machines, each one featuring a different combination of forecasting signal source and trading parameters. Based on the results of our extensive experimentation, we have concluded that, for a large collection of appropriately set parameters, the implemented ultra-short term trading system performs fully autonomously at a (simulated) profit when tested with real data [6].
The aim of this paper is to examine whether our system can perform satisfactorily in a self-adjusting trading environment whose exchange rate is only affected by transactions within the environment, thus allowing us to investigate whether this environment can be driven to equilibrium (The exchange rate changes little or not at all).
The rest of this paper is structured in four subsequent sections. We first briefly review related work on predicting exchange rates using computational intelligence and on data generation. Then, we describe the system architecture and we proceed with presenting and analyzing the experimental results on the two main questions, that of relative performance and that of the attainment of an equilibrium. We conclude in the last section, where we also set out a couple of future work.
A brief background on predicting exchange rates using computational intelligence
As earlier mentioned, FOREX traders do use technical analysis tools [7] to predict exchange rates but higher profits are normally achieved only by automated systems [3], which trade huge sums of money based on forecasting models. However, automated systems also tend to follow the “avalanche” model [5] by training each other, and thus to re-enforce ascending or descending trends. In shallow markets, such models may lead to significant distortions. A typical example is the stock market crash of Monday October 19, 1987 (Black Monday), with the resulting sell-off in the S&P 500 and the Dow Jones generating a price fall in excess of 20%, where a particular automated trading system exacerbated the sell-off by attempting to hedge a portfolio of stocks against market risk by short-selling stock index futures. As it automatically began to sell stocks, as stop-loss targets were hit, it triggered a domino effect of other programs following suit and, with falling prices triggering further stop-loss orders, a vicious cycle ensued.
Conventional wisdom in trading is being captured by technical analysis, with methods having resulted both in successes and failures. Failures are usually due to undetected changes in fundamental values and market psychology and forecasting inaccuracies tend to increase with shorter-term forecasting [9].
Forecasting methods are broadly divided into two categories, traditional and non-traditional. Traditional ones are usually based on static algorithms, which are not altered and are not influenced by input data [11]. Basically, these are econometric models which help us interpret the results. Furthermore, they allow hypothesis control, which is a standard quality assurance procedure in technical analysis [11].
Non-traditional methods include all methods which are based on data and auto-correct themselves [11]. Such methods are based on fuzzy logic [12], on Artificial Neural Networks (ANN) [8], neuro-fuzzy architecture (hybrid systems) [13] and genetic algorithms [14]. Non-traditional methods can be quite competitive to econometric methods, due to the generalized operations they perform [15]. While they can function as general models, they do not guarantee satisfactory results; nevertheless, they are usually better than conventional models where data is associated with linear relationships [15] especially when modelling the market response.
Machine-learning based methods have been extensively used for predicting trading patterns and are now considered strong enough to deal with FOREX forecasting based on past trading data [8].
Still, the hidden layers of ANN systems represent an internal representation of relations between variables and, as a result, they do not satisfy certain pre-requisites required by palindromic models, such as variability between epochs, smoothness of background noise etc. Neural networks can also perform quite well in cases of sparse data, as opposed to regression models where serious problems arise [16]. Moreover, neural networks are suited to complex phenomena for which satisfactory performance measures do exist but there is limited knowledge of the relationships between these phenomena. They are also relatively successful for forecasting and prognosis [16]. Additionally, genetic algorithms have been also used to learn trading rules and, then, combined with an echo-state network to predict the market trend [14], with results demonstrating better results both on bull and bear markets compared to the usual buying and holding strategy of retail traders.
We now briefly review some key contributions to the field of predicting exchange rates, using ML techniques.
Yong et al. [17] examined the closing price as well as the various closing price technical indicators to determine their impact on the FOREX trend provided by n ANN model.
Abraham et al. [18] attempted to compare the performance of a Takagi Sugeno Type neuro-fuzzy system to that of a neural network to predict the average monthly exchange rate values. The Australian dollar was used as the basis and its exchange rates with the US dollar, the Singapore dollar, the New Zealand dollar, the yen and the pound sterling. It was reported that the proposed models were able to predict average exchange rates but only when dealing with a time horizon of at least one month.
Wang et al. [19] have shown that a neural network with three layers combined with an Auto regressive integrated moving average mode outperforms the global modeling techniques in terms of profit returns.
Vanstone and Finnie [20] presented a methodology for the design of robotic trading systems using artificial neural networks. They outlined the key steps (selecting inputs and outputs, partitioning available data, determine architecture, setting threshold and stop trading signals, real world constraints and benchmarking) for building a neural network to be used in stock trading.
A hybrid model was developed by Ni and Yin [21], consisting of a mix of different neural network models (mostly unsupervised learning) and simulators of technical indicators to predict exchange rates. The model uses some of the most popular technical indicators such as the moving average [7], convergence/deviation, and the relative resistance index (RSI) [7]. A genetic algorithm is used to “mix” the forecasting of the generators and the technical neural networks, producing the overall system forecasting.
The combination of neural networks with technical analysis, and, in particular, the relative resistance index (RSI), has been used to improve the trading systems [22] of the IBEX-35 stock index.
Further experiments with two other indicators, the weighted moving average and the momentum [7], have shown that, when fed into a technical neural network, they produce a better forecast compared to the original (i.e. the forecast produced by the indicator before being introduced into the artificial neural network) [23].
Khirbat et al. [24] studied the forecasting of stock market prices by feeding the time series of stock prices to a multi-layer back propagation neural network which also attempts to deal with other non-deterministic input, such as the Earning per Share value and a public confidence index.
Sermpins et al. [25] used a hybrid Neural Network Optimization and Adaptive Radial Basis Function (ARBF-PSO) to implement a leverage negotiation strategy based on the Glosten, Jagannathan and Runkle (GJR) variability forecasts. By comparing the results of the ARBF-PSO with those of three different architectural neural networks, a Neighbor Neighborhood (k-NN) algorithm, a Moving Average Model (MA) and a Moving Average Convergence/Deviation Median (MACD) for the EUR/JPY, EUR/GBP andEUR/JPY exchange rates, for the period January 1999 – March 2011 (daily closing prices from the ECB), the ARBF-PSO has been shown to be superior to other models in terms of statistical accuracy and transaction efficiency.
A demonstration of how to efficiently approach the problem of automated trading with a large portfolio strategy that continuously consumes streams of data across multiple diverse markets appears in [10], where a simple scalable trading model that learns to generate profit from multiple inter market price predictions and markets’ correlation structure is presented.
In our previous work, we designed and implemented an ANN, which tries to predict market signals in the money market [8] based on an input which consists of a series of econometric models (technical indicators). Essentially, the ANN “corrected” the econometric model, combining the advantages of technical analysis and ANN in causal modeling and case control. It is important to note that the ANN wasn’t trained with a set of data and then tested with another data set but, rather, it was trained in real time and produces its price forecast in real-time, being constantly trained throughout its life (at the resolution of one price per minute).
At the next stage we presented [26] the analysis, design, implementation and evaluation of a neural network based system for forecasting in the foreign exchange (FOREX) market. We aimed to simulate the judgment and decision making of the human expert (technical analyst or broker) with a system that responds in a timely manner to changes in market conditions, thus facilitating the optimization of ultra-short term transactions. We designed and implemented a series of technical indicator simulators, which are fed to a novel neural network architecture to generate the trend forecasting signal.
Although the aforementioned works do highlight the advantage of these novel architectures, compared to various previous models and to classic technical indices, they have not been applied to automatic trading systems. Thus, it is unclear whether their implementation can be translated to real market profits.
To solve the problem, we also designed and implemented a series of customizable ultra-short term automated trading machines [6], which receive as inputs the generated forecasting signals and perform real-time virtual transactions. A comparative analysis of the results of both automated trading machines and each machine is carried out for a comprehensive variety of trend forecasting sources.
In a self-adjusting trading environment, the field of data generation plays an important role, so we now briefly review some key contributions to this field.
The process of data generation plays a significant role in various areas of computer science. An appropriate data generator is suitable and necessary for almost every type of testing (including automated): the regression tests, null value tests, coverage, security and performance test. With the rise of data science, the data generation is as well used in machine learning, data mining, data visualization, financial industry etc. Important aspect of the generated data is that the data needs to be realistic but not real, which embrace the confidentiality and privacy. Popić et al. [27] they gave a short survey on the different types of generators from the architecture point of view and their intended usage, as well as they listed their pros and cons. Finally, they gave an overview of the used data generation algorithms and the best practices in different areas.
Liu et al. [28] they proposed a data generator to produce synthetic data set which can be as big as the experiments demand that the size of attributes, rules, and samples of the synthetic data sets can be easily changed to meet the demands of evaluation on different learning algorithms. In the generator, related attributes are created at first. And then, rules are created based on the attributes. Samples are produced following the rules. Three decision tree algorithms are evaluated used synthetic data sets produced by the proposed data generator.
Ramos and Rego [29] they propose a methodology which uses the original data, as a template, to generate candidate datasets, to finally accept only those datasets which resemble the template, based upon parameterized features.
Kondratyev and Schwarz [30] used a special type of generative neural networks – a Restricted Boltzmann Machine (RBM) – to build a powerful generator of synthetic market data that could replicate the probability distribution of the original market data.
Raberto and Cincotti [31] presented an artificial dual auction financial market populated by heterogeneous agents who exchange a risky asset for cash. Agents issued random orders subject to financial constraints. It appeared that the waiting times of orders are exponentially distributed, and even the waiting times of trades are also exponentially distributed.
Chen et al. [32] proposed an artificial financial market, under the market matching hypothesis, using artificial intelligence algorithms. This market included three types of agents with different investments and risk preferences, representing the heterogeneity of traders. Genetic network programming was combined with a SARSA(
Yagi et al. [33] used agent-based simulations to compare the major liquidity indicators in an artificial market where a high-frequency trader participated was compared to one where no high-frequency traders participated. The results showed that all liquidity indicators in the market where a high-frequency trader participated improved more than those in the market where no high-frequency traders participated.
All research, as summarized above, investigated the behavior of an artificial financial market. It is notable that a comparison of the behavior of autonomous agents participating in the artificial financial market with the behavior of the same autonomous agents when participating in a closer-to-the-real-world scenario (where, for example, market prices are drawn from real, global financial market sources) has been lacking.
In this paper we design and implement an exchange rate price generator, whose prices will be derived based on the buy or sell orders given by the various participating traders in our closed trading system (this is why we refer to our system as “closed”: its transactions are modify a simulated exchange rate which, in turn, generates or applies to new transactions). Our goal is to investigate the behavior of our architecture [6] in such a closed trading system (self-adjusting trading environment). To do that, we compare the performance of simulated autonomous traders, which use technical indicators as prediction signals, to traders which rely on our architecture to receive prediction signals.
A detailed system description
In this section we describe how we analyzed, designed and implemented an algorithmic ultra-short term trading system, comprising all stages of the (price) negotiation process and Transaction Execution as described in [6] which exists and operates into a closed auto-adjusting trading world. This system includes the data generator which feed the auto-adjusting closed trading world and the fundamental stages of Pretrade Analysis, Transaction Signal Production (Trend Forecasting), Transaction Execution. An overview of the system architecture is shown in Fig. 1, which we will also use as a reference for describing various system components.
First, we designed and implemented the closed trading world where all traders live and operate. The orders (buy and sell) from these traders determine the price of the exchange rate.
At the analysis stage the data used in the subsequent steps are selected.
Then, at the trend forecasting stage, a series of technical indicator simulators [6] were designed and implemented to generate the trend forecasting signal. These signals are fed as inputs to the artificial neural network system (Fig.1), which also yields a trend forecasting signal [6] with appropriate design changes in parameterization to be consistent with the attempted ultra-short term trading.
At the transaction stage [6], a series of customizable high-frequency automated trading machines were designed and implemented, which receive as inputs the forecasting signals generated in the previous stage and perform real-time virtual transactions. Next, a comparative analysis of the results of both automated trading machines and each machine is made for the different sources of trend forecasting (the different technical indices and the ANN).
“Closed” trading world and experimental data source
We chose to experiment with the EUR/USD rate so as to render our results comparable to previous work.
An overview of the system – architecture.
A snapshot of the simulation.
The first stage of our work is the designing and implementation of the closed trading world in which the traders participating in it will live. In this world, the exchange rate price generator will generate prices based on the buy and sell orders that the closed world will receive from the traders participating in it.
The “closed” world of eur/usd consists of$10,000,000,000 in value. Our basic assumption is that every dollar trading order in the world affects the world proportionally: (trading order amountin dollars)/10,000,000,000,000. In the “closed” world there are 32 traders with $5,600,000 in total capital. The remaining capital of $9,994,400,000 consists of the value of the world’s fundamentals. The fundamentals during the experiment are considered stable. The above simplified hypothesis serves the purpose of this paper which does not aim to simulate the real world currency market.
In our previews work [6] we have experimented with the tick-to-tick EUR/USD exchange rate of July, August and September 2020. The data initially consists of over 10 million values, which decrease after pre-processing in order to squeeze out flat areas (where the exchange rate does not change at all). In order to make the experiments comparable (with our previews work [6]) we used the same time data (day, time) for which our “closed” world algorithm generates its own price data every time. Each dollar sell order increases the eur/usd exchange rate by 0.1 billionths. Similarly, each buy order to buy a dollar decreases the eur/usd exchange rate by 0,1 billionths.
We chose some technical indicators for our experiments [7], which are consistent with the short-term forecast (Fig. 1), namely the arithmetic moving averages (MA) of 600, 900 and 1800, the RSI-600 oscillator, the CCI-600 oscillator, the Williams-600 oscillator and the price oscillator (MA-600, MA-900, MA-1800) based on our previous work [6].
These technical indicators are computed and produce a forecast as described in Annex 1.
The system accepts exchange rate, time and date as inputs (Fig. 1) and, based on the predicted trend signal and the configurations of its auto-trading agents, simulates ultra-short term trading and produces performance logs for simulating profit or loss. We are using the purchase price and the selling price as input, to the accuracy of five decimal places, and we also use a tick-to-tick frequency [35].
For the first 20,000 values the system works exactly as in our previous work [6] with real eur/usd exchange rate data, as extracted after processing by truefx. This is done in order to train both the technical indicators and the neural network system with real data before they themselves start to influence the course of the “closed” world. That is, we examine what would happen if suddenly the eur/usd exchange rate world suddenly started to be influenced solely by the traders participating in our system.
Transaction stage
This part includes a series of high frequency automated trading mechanisms which perform virtual transactions with real data. It uses as input the forecasting from the previous level, the price of the exchange rate and it manages a number of simulated transaction machines, each with a different configuration (to be presented below), producing for each of them a detailed log with all (simulated) performed transactions and obtained financial results.
All input data (date, time, purchase price and sales price, as well as the trend forecasting of the technical indicators simulators and the technical neural network system) are fed to a series of high frequency automated trading machines.
Automated trading machines only take into account the trend forecasting signals (
Automated trading machines display in real time the following data for each transaction.
The opening time of the transaction position with the accuracy of a second. The opening price of the transaction position. The intensity of the trend forecasting signal ( The time of closing the position with the accuracy of a second. The closing price of the transaction position. The profit or loss of the transaction.
It is worth noting that the opening of a long position [35, 36] takes place at the buying price and its closing at the selling price. Correspondingly, the opening of a short position [35, 36] takes place in the sale price and its closing at the buying price. In other words, the result of the ultra-short term simulated algorithmic transactions include the spreads [1] between the buying and selling prices of the exchange rate.
ANN parameterization
Parameterization of back-propagation ANN’s
Parameterization of technical indicators simulators
The system has been developed in Java using the Apache NetBeans IDE 11.2. The application is fully parameterizable by means of an appropriately labeled Type parameter file (.fxipf standing for FX Intelligence Parameter File), whose contents are shown in Annex 1.
Figure 2 shows a desktop snapshot when executing the application. We view the central simulation screen {1}, the activated automated trading machines {2}, and the summary of aggregated results of automated trading machines {3}.
On the displays of automated trading machines, we see in real time the transactions and all their data and elements.
At the end of the simulation, all transaction records are exported and stored in the data folder.
Experimentation and results
The values of the parameters chosen for all neural networks (back-propagation and feed-forward series) are the same as in our previous work, so that the results are comparable (Table 1).
As in our previous work, the series of back-propagation and feed-forward ANNs consist of three ANNs each. We have also six parameters of each back-propagation ANN as shown in Table 2.
The parameter values for the technical analysis simulators are also similar (Table 3).
There are thirty-two (32) parameterized automated trading machines in the experimentation, evenly allocated to the ‘0’ class (opposite signals close each other’s position) and ‘1’ class (opposite signals do not close each other’s position).
In class “1” machines, the maximum waiting time should be limited, otherwise we are at risk of staying with several positions open at the end of the session. Half of the machines of each class (0 or 1) are of a higher sensitivity (value 1) and the other half of a lower sensitivity (value 10), giving rise to four combinations, overall, which are codified as machines of type I through IV (numbering in 1atin).
Based on the above, we group the machines into four general configurations (general machines or machine types) that we will now call general machines (or just machine Types). Each technical indicator simulator (there are seven altogether) and the forecasting machine of the ANN feeds a separate forecasting signal to a machine of each Type. Therefore, we activate 4
All values of the parameters of the thirty-two automated trading machines to be used in the context of experimentation are shown in Table 4.
Parameterization of automated transaction machines
Parameterization of automated transaction machines
Performance benchmarks in current “closed world” vs our previous work with real data [6]
Total experimental results per machine and forecasting trend source.
Total monthly experimental results per transaction per machine and forecasting trend source.
Days with profit per machine.
Total profit per forecasting source in all machines (Total pips vs Average profit per transaction).
Total profit per machine type (total pips vs average profit per transaction).
Percentage gain in investment capital.
The comparator sequences for each general machine type in relation to the source of the forecasting trend signal.
In our experimentation we have no leverage.
As we describe in Section 3.1, the change in exchange rate prices depends entirely on the movements of the 32 traders participating in our “closed world”. Each trader has a certain amount of initial capital that he can allocate to his trades (Table 4). When a trader’s remaining capital is not sufficient for one trade (
The tipping point occurred on the simulated 11th day of transactions on 13 July 2020, when 13 of the 28 traders (excluding the ANN traders) had withdrawn. The smaller the fluctuations in the exchange rate, the more difficult it is for the remaining traders to place buy or sell orders, with the result that even smaller fluctuations feedback on themselves. In other words, even traders who had retained capital to trade, eventually did not do so because they were not receiving a forecast) from the technical indicators that guided them) which would trigger the placement of an order.
We notice that ANN machines were the only ones with a profit at the end of 13 July 2020. All machines fed with the technical indicators forecast had losses. Thirteen of them lost almost all of their initial capital.
The best performance in absolute profit ($ 139,551) is achieved by the Type I machine which uses the ANN as a source of forecasting, followed by the Type II machine, again with the ANN as a forecasting source($ 139,086) (Fig. 3). Among the top four we observe the Type III and Type IV machines with the ANN as forecasting source. It is noteworthy that the first places in terms of performance are occupied by the ANN. All the others forecasting sources fare quite badly. It is worth recalling that ANNs accept as inputs the forecasts of the technical indicators that feed their machines. Although these predictions lead their machines to significant losses, when fed into the ANN they lead to significant gains. That is, the ANN architecture essentially corrects the erroneous predictions of the technical analysis.
In terms of average earnings per transaction, the best performance is achieved by the Type I machine with ANN ($ 2,926 per transaction), followed very closed by the Type II machine with ANN ($ 2,846 per transaction) (Fig. 4).
The last entries to the top four are the Type III machine with ANN, the Type IV machine with ANN. We notice that all machines with any other technical indicator have losses.
Type I, II, III and IV machine with ANN forecasting are profitable all days within the total period of experimentation (11/11) (Fig. 5).
Figure 6 shows the total profit per forecasting source for all machines, in total pips and at average profit per transaction. ANN turns out to be the most efficient with $ 310,594. All technical indicators underperform and lose the entire investment capital in most cases. In terms of average profits, the ANN (2,849 $/transaction) outperform the profit of all others in absolute figures.
Figure 7 shows the total profit per machine Type and the average profit per transaction for the ANN forecasting source.
Figure 8 shows the comparative monthly profit rates of the four general types of Automatic Trading Machines based on the ANN forecast.
Figure 9 shows the cumulative profit for each general machine type and the forecasting signal of ANN.
The ANN in the general type IV machine behaves identically to the type III machine. Similarly, the ANN in the general type I machine behaves identically to the type II machine.
We note that the slopes of the lines decrease after July 2. A further obvious decrease in the slope of the lines is observed on the 8th and the 10th of July. This is because, after July 2, the traders who have as trend forecast the various technical indicators begin withdrawing and as a result the volatility in the exchange rate is decreasing and therefore the trend forecast signals are weaker. After 10 July the exchange rate changes are small and the trades that take place are similar, while on 13 July the exchange rate seems to be hovering within such narrow limits that it is no longer possible to generate further buy or sell signals.
In our previous work [6] with the same architecture and ANN system configuration, the performance of ANN-based traders is inferior to the performance of ANN-based traders in our current work. Table 5 shows the performance benchmarks between them.
The above observation is very important. In a closed world where prices are only affected by the technical analysis we use as input to our ANN system, our architecture performs extremely well both relative to the original technical analysis and to our architecture itself when applied to the real market. This is a clear indication that if more sophisticated forecasting indicators are used as inputs to our architecture which are weighted towards the trend of the real currency market, the forecasting of our architecture will outperform.
By way of introduction, we remind you that MAs are trend indicators, i.e. they are indicators that follow the following general rule: “If the trend is bullish/bearish for the time period X0 to X, it will be bullish/ bearish for the time period X
Annex 2 features the detailed results of the experimentation per day, machine and source of forecasting.
Conclusions
We simulated the judgment and decision-making of the human expert (technical analyst or broker) in a closed trading system (trading world) that adjusts exchange rates and examined the strengths of the system in terms of the weight of its contribution to pricing of exchange rates in an environment that is not affected by other factors than the traders participating in it. Specifically, we examined whether the applied architecture [6] can outperform technical indicators in a closed trading system (unaffected by other exogenous factors) and whether this leads to an ability to adjust from towards a volatile exchange rate towards an equilibrium exchange rate.
The change in exchange rate prices depends entirely on the movements of the traders participating in our “closed world”. Each trader has a certain amount of initial capital that it can allocate to its transactions. When a trader’s remaining capital is not sufficient for one transaction, that trader withdraws. The more traders withdraw, the fewer transactions take place in our “closed world” market, and the smaller the exchange rate fluctuates. If a tipping point is passed (most traders have withdrawn), then so few transactions take place that the market in our “closed world” becomes essentially flat.
The best performance in absolute profit is achieved by automated traders which uses the ANN as a source of forecasting, All the others forecasting sources seem to be quite weak. It is worth recalling that ANNs accept as inputs the forecasts of the technical indicators, each of which feeds a corresponding trading machine as well. Although these predictions lead the corresponding machines to significant losses, when collectively fed into the ANN they lead to significant gains. That is, the ANN architecture essentially corrects the wrong predictions of the technical analysis.
ANN architecture based traders make profits both when MA-based machines make profits, when Oscillator-based machines make profits and when both lose. That is, our architecture picks the right winning side, every time, even when all other existing traders lose. This is an indication that if more sophisticated forecasting indicators are used as inputs to our architecture, which may manage to closely follow the trend of the real currency market, the performance of our architecture could further improve.
It is evident that by opening up our implementation and our research in such a way, one expects that we can pursue research at a variety of levels: we can investigate how one produces industrial-quality trend prediction, while also researching how one can utilize such trend predictions, either for profit-making enterprises or as a tool for tilting a market towards an equilibrium for hedging purposes.
Future work should focus on examining alternative ANN training techniques as well as investigating the exploitation of conventional fundamentals, break events and news which affect the FOREX market and might be announced at any time point during a 24-hours day. Such data can be harnessed from the internet in real time. Also, different neural networks models (such as ARIMA and LSTM [34]), with various input data set combinations (technical indicators predictions) will be considered and compared.
Footnotes
Annex 1. System parameters
Conditions
Trend Forecasting Signal
MA_M(t)
MA_10(t) && MA_M(t
1)
MA_10(t
1)
1
MA_M(t)
MA_10(t) && MA_M(t
1)
MA_10(t
1)
1
MA_M(t)
MA_10(t)
0,5
MA_M(t)
MA_10(t)
0,5
Other Cases
0
Simulators of Moving Averages
MA_M(t): Moiving Average of M values, MA_10: Moving Average of 10- values
Oscillators Simulators
Conditions of CCI
Trend Forecasting Signal
CCI(t)
CCI(t)
CCI(t)
CCI(t)
CCI(t)
CCI(t)
CCI(t)
CCI(t)
Other Cases
0
Conditions of Williams
Trend Forecasting Signal
WILL(t)
WILL(t)
WILL(t)
WILL(t)
WILL(t)
WILL(t)
WILL(t)
WILL(t)
Other Cases
0
Conditions of RSI
Trend Forecasting Signal
RSI(t)
RSI(t)
RSI(t)
RSI(t)
RSI(t)
RSI(t)
RSI(t)
RSI(t)
Other Cases
0
Conditions of Price Oscillator
Trend Forecasting Signal
PROSC(t)
PROSC(t)
PROSC(t)
PROSC(t)
PROSC(t)
PROSC(t)
PROSC(t)
PROSC(t)
Other Cases
0
Lines 16 through 21 are repeated as many times as the number of ANN pairs as set on the 15
Content of the system’s configuration file
Line
Parameter
Value
1
Number of ANN epochs
10
2
Number of ANN Hidden Neurons
14
3
Learning rates between synapses of Neurons of Hidden Layer with Input Neurons (LR-Inputs)
0.001
4
Learning rates between synapses of Neurons of Hidden Layer with Output Neurons (LR-Output)
0.001
5
Number of ANN Hidden layers
1
6
Number of Exit Neurons
1
7
Number of Import Neurons
7
8
Period (in a number of values) of Oscillator RSI
600
9
Period (in a number of values) of Oscillator Williams
600
10
Period (in a number of values) of Oscillator CCI
600
11
Period (in a number of values) of Short-Term MA
600
12
Period (in a number of values) of Mid-Term MA
900
13
Period (in a number of values) of Long-Term MA
1800
14
Period (in a number of values) of auxiliary MA (used instead of a pair of instantaneous values so that there is no possible momentary deviation of values due to tick to tick data)
10
15
Number of ANN pairs
3
16
M(x) (In a number of prices approx. 1price =1sec)
30
17
Trend Value
1.00090
18
Trend Value
1.00060
19
Trend Value
1.00030
20
Trend Value
1.00015
21
a(x)
0,5
22
Number of Automated Trading Machines.
32
23
Machine Sensitivity (1000 to 0). Paragraph 3.4.1.
1
24
Machine Class. Paragraph 3.4.1.
0
25
Take Profit Factor for trend signals of very high intensity
1.00090
26
Take Profit Factor for trend signals of high intensity
1.00060
27
Take Profit Factor for trend signals of normal intensity
1.00030
28
Stop Loss Factor. Paragraph. 3.4.1.
1.0012
29
Revision Time of take profit factors. Paragraph. 3.4.1.
60
30
Maximum Waiting Time. Paragraph. 3.4.1.
120
31
Revised Take Profit Factor. Paragraph. 3.4.1.
1
32
Source of Trend Forecasting Signals (0 – 7). Paragraph. 3.4.1.
0
33
Total Investment Capital
$10000
34
Capital per Transaction
$10000
Annex 2. Analytical results of experimentation per day,machine and source of forecast
Date
1–Jul
2–Jul
3–Jul
5–Jul
6–Jul
7–Jul
8–Jul
9–Jul
10–Jul
11–Jul
13–Jul
Total
Type III (ANN)
856
2232
600
29
726
716
629
173
147
5
9
6122
Count of Trades
2255
7916
906
42
1251
1393
1146
362
624
22
40
15957
Profit of Trades
Type I (ANN)
6720
18319
4438
204
5507
5468
4731
1185
1047
26
50
47695
Count of Trades
19390
67564
8457
422
11995
12995
10458
3430
4513
120
207
139551
Profit of Trades
Type IV (ANN)
893
2250
654
30
768
750
649
175
147
5
9
6330
Count of Trades
2220
7950
885
47
1277
1429
1143
363
624
22
40
16000
Profit of Trades
Type II (ANN)
6969
18459
4738
206
5678
5685
4827
1189
1047
26
50
48874
Count of Trades
18974
67804
8327
431
11980
12979
10320
3431
4513
120
207
139086
Profit of Trades
Type III (PROSC)
1265
2698
402
21
513
547
421
3082
0
0
0
8949
Count of Trades
1598
75
1884
1985
1475
0
0
0
Profit of Trades
Type I (PROSC)
12554
26946
3897
204
4964
5270
4080
30394
0
0
0
88309
Count of Trades
16795
781
19988
20790
15978
0
0
0
Profit of Trades
Type IV (PROSC)
1265
2698
402
21
513
547
421
3082
0
0
0
8949
Count of Trades
1598
75
1884
1985
1475
0
0
0
Profit of Trades
Type II (PROSC)
12554
26946
3897
204
4964
5270
4080
30394
0
0
0
88309
Count of Trades
16795
781
19988
20790
15978
0
0
0
Profit of Trades
Type III (CCI)
928
2846
913
32
1061
1104
1194
3350
1488
104
1603
14623
Count of Trades
3067
87
3532
3711
4158
6520
437
6316
Profit of Trades
Type I (CCI)
9187
28047
7971
301
9328
9625
9414
32131
6231
430
6617
119282
Count of Trades
28391
819
32485
33559
32594
27875
1800
19244
Profit of Trades
Type IV (CCI)
932
2888
1100
42
1302
1326
1406
3373
1522
105
2358
16354
Count of Trades
3315
101
3821
3937
4408
6502
436
5652
Profit of Trades
Type II (CCI)
9207
28307
9192
360
10836
11039
10570
32267
6329
431
8502
127040
Count of Trades
29550
915
33967
35192
34543
27961
1798
15846
Profit of Trades
Type III (WILL)
967
2702
453
18
516
511
456
3112
225
8
256
9224
Count of Trades
975
7
1039
881
887
987
40
641
Profit of Trades
Type I (WILL)
9534
25735
0
0
0
0
0
0
0
0
0
35269
Count of Trades
0
0
0
0
0
0
0
0
0
Profit of Trades
Type IV (WILL)
967
2711
488
22
566
540
495
3116
238
9
267
9419
Count of Trades
1024
4
1101
917
952
1012
45
652
Profit of Trades
Type II (WILL)
9535
25734
0
0
0
0
0
0
0
0
0
35269
Count of Trades
0
0
0
0
0
0
0
0
0
Profit of Trades
Type III (RSI)
934
2593
24
1
25
25
29
3034
226
265
297
7453
Count of Trades
34
2
34
50
45
515
560
634
Profit of Trades
Type I (RSI)
9219
25916
145
1
149
158
202
877
0
0
0
36667
Count of Trades
271
2
278
420
322
0
0
0
Profit of Trades
Type IV (RSI)
934
2593
24
1
25
25
29
3034
327
361
417
7770
Count of Trades
34
2
34
50
45
423
525
544
Profit of Trades
Date
1–Jul
2–Jul
3–Jul
5–Jul
6–Jul
7–Jul
8–Jul
9–Jul
10–Jul
11–Jul
13–Jul
Total
Type II (RSI)
9219
25916
145
1
149
158
202
877
36667
0
0
73334
Count of Trades
271
2
278
420
322
0
0
0
Profit of Trades
Type III (MA600)
1496
3223
2094
97
2612
2714
2630
3603
687
0
0
19156
Count of Trades
6468
0
0
Profit of Trades
Type I (MA600)
14762
31676
18993
880
23696
24658
18898
0
0
0
0
133563
Count of Trades
71171
0
0
0
0
Profit of Trades
Type IV (MA600)
1696
3611
3318
145
4079
4247
4249
4050
3815
244
4813
34267
Count of Trades
6994
Profit of Trades
Type II (MA600)
16603
34923
29457
1327
36275
37741
37377
39127
33159
2131
37593
305713
Count of Trades
75103
27406
10578
873
10349
Profit of Trades
Type III (MA900)
1481
3195
2006
94
2482
2592
2526
3617
450
0
0
18443
Count of Trades
6446
0
0
Profit of Trades
Type I (MA900)
14452
31268
17835
834
22188
23044
16463
0
0
0
0
126084
Count of Trades
71013
0
0
0
0
Profit of Trades
Type IV (MA900)
1691
3605
3308
147
4067
4236
4243
4055
3831
245
4824
34252
Count of Trades
7070
Profit of Trades
Type II (MA900)
16603
34923
29457
1327
36275
37741
37377
39127
33159
2131
37594
305714
Count of Trades
75159
27675
10824
852
10476
Profit of Trades
Type III (MA1800)
1567
3299
2344
110
2958
3053
2866
3597
1920
116
0
21830
Count of Trades
6901
0
Profit of Trades
Type I (MA1800)
15493
32388
21553
1027
27163
28005
26013
35241
16587
1069
4247
208786
Count of Trades
74356
17072
Profit of Trades
Type IV (MA1800)
1691
3605
3308
147
4067
4236
4243
4055
3831
245
4824
34252
Count of Trades
7244
Profit of Trades
Type II (MA1800)
16603
34923
29457
1327
36275
37741
37377
39127
33159
2131
37594
305714
Count of Trades
77006
25775
10967
872
10194
Profit of Trades
