ENMX: An elastic network model to predict the FOREX market evolution

Article (PDF Available)inSimulation Modelling Practice and Theory 86 · May 2018with 286 Reads
DOI: 10.1016/j.simpat.2018.04.008
The foreign exchange (FOREX) market is a financial market in which participants, such as international banks, companies or private investors, can both invest in and speculate on exchange rates. This market is considered one of the largest financial markets in the world in terms of trading volume. Indeed, the just-in-time price prediction for a currency pair exchange rate (e.g. EUR/USD) provides valuable information for companies and investors as they can take different actions to improve their business. This paper introduces a new algorithm, inspired by the behaviour of macromolecules in dissolution, to model the evolution of the FOREX market, called the ENMX (elastic network model for FOREX market) algorithm. This algorithm allows the system to escape from a potential local minimum, so it can reproduce the unstable nature of the FOREX market, allowing the simulation to get away from equilibrium. ENMX introduces several novelties in the simulation of the FOREX market. First, ENMX enables the user to simulate the market evolution of up to 21 currency pairs, connected, and thus emulating behaviour of the real-world FOREX market. Second, the interaction between investors and each particular quotation, which may introduce slight deviations from the quotation prices, is represented by a random movement. We analyse different probability distributions like Gaussian and Pseudo-Voigt, the latter showing better behaviour distributions, to model the variations in quotation prices. Finally, the ENMX algorithm is also compared to traditional econometric approaches such as the VAR model and a driftless random walk, using a classical statistical and a profitability measure. The results show that the ENMX outperforms both models in terms of quality by a wide margin.
Contents lists available at ScienceDirect
Simulation Modelling Practice and Theory
journal homepage: www.elsevier.com/locate/simpat
ENMX: An elastic network model to predict the FOREX market
Antonio V. Contreras
, Antonio Llanes
, Alberto Pérez-Bernabeu
, Sergio Navarro
Horacio Pérez-Sánchez
, Jose J. López-Espín
, José M. Cecilia
Universidad Católica de Murcia (UCAM), Murcia 30107, Spain
Bioinformatics and High Performance Computing (BIO-HPC) Research Group, Universidad Católica de Murcia (UCAM), Murcia 30107, Spain
Center of Operations Research, Miguel Hernández University, Elche Campus, Spain
Articial Intelligence Talentum, S.L., Campus Universitario de Espinardo, Edicio CEEIM, Murcia 30100, Spain
FOREX prediction
Market prediction
Elastic network model
Pseudo-Voigt prole
Bio-inspired methods
The foreign exchange (FOREX) market is a nancial market in which participants, such as in-
ternational banks, companies or private investors, can both invest in and speculate on exchange
rates. This market is considered one of the largest nancial markets in the world in terms of
trading volume. Indeed, the just-in-time price prediction for a currency pair exchange rate (e.g.
EUR/USD) provides valuable information for companies and investors as they can take dierent
actions to improve their business. This paper introduces a new algorithm, inspired by the be-
haviour of macromolecules in dissolution, to model the evolution of the FOREX market, called
the ENMX (elastic network model for FOREX market) algorithm. This algorithm allows the
system to escape from a potential local minimum, so it can reproduce the unstable nature of the
FOREX market, allowing the simulation to get away from equilibrium. ENMX introduces several
novelties in the simulation of the FOREX market. First, ENMX enables the user to simulate the
market evolution of up to 21 currency pairs, connected, and thus emulating behaviour of the real-
world FOREX market. Second, the interaction between investors and each particular quotation,
which may introduce slight deviations from the quotation prices, is represented by a random
movement. We analyse dierent probability distributions like Gaussian and Pseudo-Voigt, the
latter showing better behaviour distributions, to model the variations in quotation prices. Finally,
the ENMX algorithm is also compared to traditional econometric approaches such as the VAR
model and a driftless random walk, using a classical statistical and a protability measure. The
results show that the ENMX outperforms both models in terms of quality by a wide margin.
1. Introduction
The foreign exchange (FOREX) market is one of the major nancial markets in the world. It is a global marketplace for investing in
exchange rates, which moves up to 5.1 trillion US dollars (USD) per day according to the Bank for International Settlements (BIS)
[45]. Traditionally, this market has been reserved for the institutional investor but the emergence of new technologies has demo-
cratized the FOREX market and opened it to the general public. Indeed, both the high liquidity and the exibility of the schedule (the
market trades continuously 24 hours per day, ve days a week) make the FOREX market very attractive for the private investor. The
Received 2 November 2017; Received in revised form 27 April 2018; Accepted 30 April 2018
Corresponding author.
E-mail addresses: avicente2@alu.ucam.edu (A.V. Contreras), allanes@ucam.edu (A. Llanes), alberto.perezb@umh.es (A. Pérez-Bernabeu),
snavarro@aitalentum.com (S. Navarro), hperez@ucam.edu (H. Pérez-Sánchez), jlopez@umh.es (J.J. López-Espín), jmcecilia@ucam.edu (J.M. Cecilia).
Simulation Modelling Practice and Theory 86 (2018) 1–10
Available online 02 May 2018
1569-190X/ © 2018 Elsevier B.V. All rights reserved.
diculty involved in manipulating the price makes it even more attractive because it is very complicated for banks or large funds to
take control of the price. In addition, the high volume of the contracts and the availability of datasets comprising historical time series
provide an interesting framework for scientic and nancial research [1].
Regarding the theoretical frameworks that have been applied to this market, we may highlight the ecient market hypothesis
(EMH) introduced by Fama [2,3] and Samuelson [4] in an environment of acceptance of the eciency of capital markets [5]. Since
there are several eciency market denitions, it is sensible to use the Fama denition, which postulates that a market is ecient if it
fully reects all available information. Under this assumption, all investors have the same information being rational, they rapidly
assimilate any new information to determine asset prices or returns and hence adjust prices accordingly. Thus, excess prots com-
pared to the riskiness of a stock would be zero. Due to the fact that whether individuals optimize past and currently available
information, the new information, which is unpredictable, causes changes in the price of assets in the market [6].
Furthermore, Fama introduced a classication of EMH based on three forms of eciency: weak, semi-strong and strong [2]. The
weak form of EMH posits that the current prices of nancial assets include all the historical nancial information. Due to this fact,
only unpredictable new information would cause changes meaning that random walk is the best predictor of both asset prices and
returns. The semi-strong form defends that the prices of nancial assets incorporate the weak form of EMH plus all the information
that is publicly available on the market at any moment. The strong form of EMH embraces the weak and semi-strong forms of EMH, as
well as private information available and which is incorporated into current prices immediately. Both the weak and semi-strong form
of market eciency have been tested by several authors. However the results concerning the validity of these eciency forms were
split depending on the assumptions made. On the other hand, testing the strong form has received less attention. Few studies of the
strong form found evidence rejecting the eciency of the markets analysed. All this is studied in-depth in [7,8].
In this paper, and based on previous dissertations [9,10], we propose the elastic network model algorithm for the FOREX market
(i.e., ENMX) within the framework of the weak form of the EMH. This model is inspired by the biomolecule movements widely used
to study large-scale dynamics in several structural biological scenarios [11]. In particular, it is based on an elastic network model
(ENM) and normal mode analysis [12] to simulate the currencies trading in the FOREX market as biomolecule motions, which, in
light of the random character of the FOREX market, is a reasonable assumption. Dierent probability distributions, such as Gaussian
and Pseudo-Voigt, are analysed to model the interaction between investors and each particular quotation, the latter being particularly
suitable for modelling variations in quotation prices. To test the validity of ENMX, its out-of-sample forecasting accuracy was
compared with two dierent econometric models; i.e. vector autoregression (VAR) and the random walk (RW). The root mean square
error (RMSE) metric was used to compare them in terms of quality as it is one of the most representative accuracy forecasting metrics
in the econometric sphere. Moreover, the prot factor (PF) [13] was compared between these competing models in order to assess the
protability of each model.
The rest of the paper is structured as follows. Section 2 shows the main studies related with forecasting exchange rates. Section 3
introduces the elastic network model, probability distribution and the ENMX algorithm. Finally, Section 4 provides a detailed ex-
perimental evaluation of ENMX before we end the paper with some conclusions and suggestions for future work.
2. Related work
The literature on forecasting exchange rates shows two dierent trends in FOREX market simulation: time series and machine
learning techniques. The time series techniques, in particular, have been widely studied. The work by Meese and Rogo[14] com-
pares the forecasting accuracy between various macroeconomic structural models that establish the long run relationship between
exchange rates and fundamentals. In their empirical analysis, they conclude that a driftless random walk that does not use any type of
information of fundamental economic variables performed as eciently as these structural models. Nevertheless, other researchers
that have tackled this issue have found empirical evidence that fundamentals beat random walk [1517]. Due to the fact that
depending on data, methodology and the economic theories assumed that is used in the previous studies, the discussion about
fundamentals is not clarifying. We refer the reader to [18] for a recent survey of the relationship between exchange rates and
fundamentals. Among the main econometric models used to deal with time series information, we may highlight vector auto-
regression (VAR) models [19], which linearly model the interactions between a set of endogenous variables trough their own past.
Specically, for the FOREX market, we may highlight the contribution of Meese and Rogo[14], Sarantis and Stewart [17], Liu et al.
[20] and Redl [21] that used the VAR approach. Moreover, additional econometric techniques have been applied in order to forecast
exchange rates. Other time series models that have also addressed this issue are mainly error correction models [22,23], GARCH
models [24] and Markov switching models [25,26].
As regards articial intelligence techniques, the goal of machine learning is to teachthe computer to recognize patterns that
always make prices move up or down. Applying machine learning in nancial markets means it is necessary not only to solve a
problem in data bases, but also deal with articial intelligence in order to learn how to decide at each moment. Several authors have
attempted to model nancial markets through a variety of techniques, such as Neural Networks [27,28], Support Vector Machines
[29], and Fuzzy Neural Networks [30]. Also genetic algorithms have been implemented to forecast the behaviour of markets [31,32].
The use of elastic network models together with normal model analysis has demonstrated their ability to accurately predict bio-
molecule motions and has become a methodology widely used to study large-scale dynamics in several structural biology scenarios.
Motivated by the characteristics of these models, which include simplicity and a high degree of accuracy, and thus we can nd use
cases recently developed with experimental data in dierent scenarios with success, being one of them nancial markets [33].
A.V. Contreras et al. Simulation Modelling Practice and Theory 86 (2018) 1–10
3. Methods
This section introduces the elastic network model for simulating the FOREX market (ENMX). First, the structure of the ENMX
model is described. Then, we discuss the distribution probability required to perform the stochastic simulation. The section ends with
a full description of the algorithm.
3.1. The elastic network model for FOREX market simulation
Our main aim was to develop a model that could explain nancial markets. The market is seen to be dynamic, due to the random
behaviour of the quotation prices of exchange rates, which results from interactions between investors and the market itself. We
propose that this random behaviour can be modelled in the same fashion as the molecular movements described by Brownian
motions in [34,35]. Therefore, an Elastic Network Model (ENMX) was proposed, based on the ideas used for the description of the
behaviour of macromolecules in dissolution [3638]. Traditionally, under this framework Brownian motions are assumed to follow a
Gaussian distribution. Nevertheless, the validity of this distribution was tested comparing with a Pseudo-Voigt prole. Results on
Section 4 conrmed that Pseudo-Voigt prole better tted to the data analyzed. Hence, ENMX model is based on a Pseudo-Voigt
distribution that captures the typical currency deviations present in the FOREX market.
The decision to choose the FOREX market as the target nancial market object is mainly due to the nature of data. Since it is a
continuous market, it is the one that best supports modelling from random motion and also it generated large data sets that grow
continuously. The way of proceeding has been, rst, to characterize the system through functions that reproduce its behaviour
appropriately. This process can be separated into two parts, characterization of the market into price and characterization, dier-
entiating the behaviour and particular volatility of each price and the potential which is assigned to each state. The characterization
of the exchange rate is based on nding a function that adequately reproduces the movements of each of them. For this, the histogram
of each quote was rst analyzed using the complete history of the data. It is tested by comparing the distribution that best ts the
histogram of the series analyzed. Furthermore, a JarqueBera test is used to test whether data follow a Gaussian distribution and the
results in terms of both accuracy and protability are compared with the Pseudo-Voigt and Gaussian distribution function. This is
explained in detail in Section 4.
A description of the ENMX model follows. Each network element (node) represents a currency. Edges connecting elements are
related with their interactions, and distance between nodes (currencies) corresponds to the price quotation of each currency pair. This
elastic network implies that a shock or uctuation in one of the currencies causes an eect on the other. Indeed, this can be justied
by the decisions that monetary authorities took in order to adjust the economy aected by these shocks. Such decisions aect the
whole nancial system and thus the FOREX market could be seen as a fully connected graph. Fig. 1 represents the description of the
ENMX model.
In an analogy with the Brownian motion of macromolecules and their internal uctuations, it is accepted that the molecule
evolves towards an equilibrium state (steady state). But such steady state changes over time due to the random movements exerted to
Fig. 1. Depiction of the elastic network model used for the FOREX market.
A.V. Contreras et al. Simulation Modelling Practice and Theory 86 (2018) 1–10
the elements in the macromolecular model (we can refer to them as atoms or beads). Springs connecting either atoms or beads model
the eect that the uctuation in an element directly causes in a neighbouring atom/bead, and therefore this is transmitted along the
whole macromolecular chain. This is translated in our ENMX model in the way that a change in, for instance, the Euro (EUR) or
American dollar (USD) aects immediately the other currencies. Therefore these uctuations inuence the market. This is the
reasoning why we focus on the potential energy of the system for representing the evolution of the molecule/market towards the
steady state.
The ENMX model uses the Hookean potential [39] to regulate the interaction between the quotation prices. They are the elements
of an elastic network model that characterize the potential of a spring. Thus, the system could be seen as spring-bound particles
whose elongation represents the quotation price of the spring. The particles represent each coin, and therefore the spring that connect
two of these represents the relative price between them, and the elastic spring constant represents the volatility of the quotation.
Due to the fact that Hookean potential requires for an equilibrium quotation, we used a dynamic method that best represented the
uctuating behaviour of the stock market. An equilibrium quotation was found through a trend method consisting of dividing the
historical data into intervals (both hourly, daily, monthly and yearly frequency), making a linear adjustment of them and then
inferring what point would be the next in the evolution of the system. Each of the trends obtained for the dierent time intervals was
used with dierent weight distributions in a linear combination to obtain the equilibrium quotation, x
3.2. Characterization of Pseudo-Voigt distribution
Since the representations of exchange rates dier, it was decided to work with quotation moments in 5 min intervals in order to
reduce the market volatility associated with small periods of time. Although Gaussian and Lorentzian distributions have been widely
used in similar problems in the experiments using these distributions to adjust the histograms of quotation moments; they had
problems adjusting the tails of the generated histograms. In the search for a better adapted function, our interest was aroused by the
Voigt [40] prole, which is widely used in spectroscopy and diraction. Using a Voigt distribution; in this case can be considered a
natural approach as it is dened as the convolution of both distributions mentioned above.
Indeed, a Voigt function can be dened as the convolution of a Gaussian prole and a Lorentzian prole:
xLxGxxdx() ( ) ( ) (1)
where G(x) is the Gaussian prole.
() exp
and L(x) is the Lorentzian prole centred in zero:
Lx γ
πx γ
() ()
22 (3)
The Lorentzian function, also called Cauchy distribution, is a continuous probability distribution which is very common in physics
discipline. In its expression, γis the scale parameter which species the half-width at half-maximum and is also equal to half the
interquartile range. When
the centred Lorentzian function coincides with the Studentst-distribution with one degree of
Regarding the form of Lorenztian density function, it is worth noting the similarities that it maintains with the density function of
the standard normal distribution: ared shape, symmetric and centred at the origin. The only dierence between both distributions
lies in that the density function of the Lorentzian prole has heavier tails (greater dispersion) than the normal one.
However, because of the high computational cost of the convolution operation, it is often not possible to use the Voigt prole. In
this work, a Pseudo-Voigt [41] function is proposed to adjust this process since, substituting the convolution operation by a linear
combination, involves a lower computational cost. Thus, a Pseudo-Voigt prole is a linear combination of Gaussian and Lorentzian
function, which provides better results that both distributions individually.
=⋅ + − ⋅
Vx ηLx ηGx() () (1 ) (
There are dierent options available for calculating the ηparameter. A simple formula with a precision of 99% is described by Ida
et al. in [41]:
=− +
ff ff ff1.36603( / ) 0.47719( / ) 0.11116( / )
where f
and f
are the total amplitude at half the maximum, FWHM (full wide half maximum) of the corresponding distributions,
with ==
γf σ ln2, 2 2 (2)
LG and =+ + + + +
54 3223 45
1/5 being ===ABC2.69269, 2.42843, 4.4716
and =D0.0784
Following these results, we studied the equilibrium quotations by making sample averages from the previous month or linear
combinations between the sample mean and the last months, days, hours, etc. Better results were obtained in those cases than using
the overall data, but the problem was that, in the end, the equilibrium quotation was a constant value, which, after a nite number of
evolutionary steps, reached a steady state.
All trajectories simulated tended to the static equilibrium quotation after a while. To avoid this, a dynamic method was proposed
A.V. Contreras et al. Simulation Modelling Practice and Theory 86 (2018) 1–10
since it better represented the uctuating nature of the stock market. This new method was similar to the previous one described but
adding the current value, and also updating each iteration of the method. Thus, although the system tended to an equilibrium
quotation as before, this quote was dierent every time, which ensured that the system did not reach a static situation.
3.3. The algorithm
The ENMX algorithm is an optimization algorithm based on the Monte Carlo method, specically on the annealing algorithm
[42]. The annealing algorithm assigns a non-null probability to movement away from a local minimum of potential, in order to attain
at an absolute minimum [43]. This method is better suited to simulating the behaviour of the changing stock market than the
traditional Monte Carlo approach, as the latter assumes that the evolution of the model would tend to evolve to a static situation, so it
would not represent well the dynamic nature of the FOREX market. Moreover, the repeated use of this method generates a Markov
chain which actually ts better with the FOREX market as the time series generated by currencies exchanges always meets the
Markov property.
In short, the algorithm provides a new quote, following the distribution functions of each quote. Then, it assigns a potential
depending on the distance to the equilibrium quotation and the ENM algorithm accepts the new potential if the potential of the new
state is less than that of the previous step; or if this is not the case, it assigns a certain probability of acceptance instead of rejecting it.
This procedure generates times series or trajectories through chained simulations.
With that in mind, the ENMX baselines are the following:
1. Starting from the initial quotation, q
, the ENM algorithm calculates the overall market potential (V
). This is done by adding the
square dierence between q
and the equilibrium quotation potential of the 21 currencies (α).
kq q()
αα equilibrium α
0, ,
2. A new state of the system, q
, is proposed in which each currency varies according to a pseudo-random number, r, which is
obtained according to the optimal Pseudo-Voigt distribution for each one. Since the Pseudo-Voigt indicates the probability of
obtaining each moment by simply adding the pseudo-random number obtained at the current price:
1, 0,
3. The potential of the new state obtained, q
, is calculated in the same way as in the state q
kq q()
αα equilibrium α
1, ,
4. Now, the ENM algorithm evaluates whether the new state is acceptable by applying the annealing algorithm, so that three cases
are distinguished:
(a) V
: the new state (q
) is better than the previous one (q
). Thus, the algorithm would retain the state q
with a prob-
ability of 100%, overwriting q
, for the new iteration of the method, (q
(b) V
: the probability of acceptance (P
is not 100%, but the annealing algorithm assigns a probability of se-
In this way, a random number, uis launched between 0 and 1 with a uniform probability distribution, and if the condition
ccept is satised, the ENM algorithm accepts q
by overwriting q
as in the previous case.
(c) V
and also u>P
ccept: The state q
is discarded, remaining with q
for the next iteration.
5. Using the q
obtained in the previous section, the process is repeated.
In this way, repeating the algorithm creates a time series or trajectory similar to that which the exchange rate would present. Even
so, the trajectory is obtained by a stochastic method, which cannot be expected to reproduce the behaviour of the real exchange
rate step by step, although it is possible to expect both values to be similar.
4. Results and discussion
4.1. Data sets and historical data representation
The dataset was obtained from OANDA [44],anancial services company specializing in the FOREX market, which it provides
access to the FOREX market to small and medium investors. The experiments were carried out with up to 7 currencies as shown in
Table 1, with up to 21 currency pairs in total that are obtained by the combining these 7 currencies. These data sets were recorded
A.V. Contreras et al. Simulation Modelling Practice and Theory 86 (2018) 1–10
every 5 min uninterruptedly for 24 h a day, except on weekends because the market is closed.
The procedure to characterize the probability distribution of each currency pair begins with the creation of histograms of mo-
ments using the historical data. As regards the use of Pseudo-Voigt distribution instead of Gaussian distribution, the histogram of the
series studied was helpful to test for the distribution that best ts them. Then, Gaussian, Lorentzian and Pseudo-Voigt distributions
were tested and compared.
Dierent tests were used to contrast how Voigt and Pseudo-Voigt distribution t to the dataset. Graphs
than both functions have satisfactory properties for simulating the process (in most cases, better than the Gaussian and Lorentzian
functions individually). Fig. 2 shows the histogram which compares the three proles and the dataset. Concerning the three prob-
ability distributions, it was veried that a Gaussian function was not the best option because the tails of the generated histogram were
fatter, while Lorentzian distribution underestimated the probability near the central peak, and in addition, the tails were too wide.
The histogram developed conrm, then, that Pseudo-Voigt prole provided a better t than the other distributions.
4.2. Experimental results
From this point onwards, dierent experiments were carried out to analyze the ENMX model for developing FOREX market
predictions. Firstly, JarqueBera (JB) test [46] was applied in order to assess whether the historical data follows a Gaussian dis-
tribution. JB test null hypothesis assumes that the data have a coecient of skewness equal to 0 and kurtosis equal to 3. These values
correspond to both, skewness and kurtosis, for the Gaussian distribution respectively. Table 2 shows the JB test for the 21 historical
quotation prices. In all cases, the null hypothesis was strongly rejected at 1%, which means that the distribution of the series does not
have the typical skewness and kurtosis for the Gaussian distribution, based on the third and fourth central moments respectively.
Therefore, the JB test brought evidence against the Gaussian distribution as the best density function for the data we are dealing with.
Secondly, the overall quality impact were analyzed using the Gaussian and Pseudo-Voigt probability distributions on the ENMX
model. The dataset available ran from 01.01.2015 (23:00 h) to 07.28.2017 (18:00 h), so that the frequency of the data analyzed have
a spread of 5 min. The forecasting strategy adopted was the followed by many researchers; e.g. [14], who were among the pioneers
whose works used this methodology. Firstly, a subsample within the dataset was selected for the purpose of model identication and
parameter optimization. This period was from 01.01.2015 (23:00 h) to 07.28.2017 (17:00 h). Secondly, the forecasting strategy of
sequential estimations was used to generate the remaining observations. In other words, we predict from 1 to 12 out-of-sample
horizons. In addition, both the average and the median for the out-of-sample horizons were computed.
As previously explained, the most representative currency pairs in the FOREX market are selected to perform the comparative
evaluation. Table 1 shows these selected currencies, reaching up to twenty-one currency pairs that stem from all possible combi-
nations between them. Table 3 shows the predicted horizons and the corresponding out-of sample period. Lastly, Table 4 summarizes
the results obtained on the competing models. The forecasting accuracy was evaluated by the mean square error (MSE) computed
Table 1
Currencies and abbreviations.
Currency Abbreviation
Euro EUR
American dollar USD
Canadian dollar CAD
New Zealand dollar NZD
Australian dollar AUD
British pound GBP
Japanese yen JPY
Fig. 2. Adjusting curves to the EURUSD histogram.
A.V. Contreras et al. Simulation Modelling Practice and Theory 86 (2018) 1–10
Table 2
Results on JB test.
Variable JB statistic P-value
AUDCAD 7350.03 0.00
AUDJPY 6327.19 0.00
AUDNZD 5748.19 0.00
AUDUSD 196.61 0.00
CADJPY 10,585.99 0.00
EURAUD 6183.51 0.00
EURCAD 65.67 0.00
EURGBP 18,494.97 0.00
EURJPY 9003.26 0.00
EURNZD 4181.47 0.00
EURUSD 626.51 0.00
GBPAUD 14,848.74 0.00
GBPCAD 14,629.16 0.00
GBPJPY 18,710.78 0.00
GBPNZD 14,341.81 0.00
GBPUSD 19,755.24 0.00
NZDCAD 16,713.00 0.00
NZDJPY 15,946.59 0.00
NZDUSD 3300.06 0.00
USDCAD 1563.60 0.00
USDJPY 10,685.82 0.00
Table 3
Horizons predicted.
Forecast horizons Out of sample period
07.28.2017 17:05
07.28.2017 17:10
07.28.2017 17:15
07.28.2017 17:20
07.28.2017 17:25
07.28.2017 17:30
07.28.2017 17:35
07.28.2017 17:40
07.28.2017 17:45
07.28.2017 17:50
=H11 07.28.2017 17:55
07.28.2017 18:00
to =H1
to =H1
Table 4
Forecasting accuracy and protability results on Gaussian and Pseudo Voigt probability distributions.
Forecast horizons Gaussian Pseudo-Voigt
0.00142 3.183 0.00138 3.791
0.00247 4.871 0.00243 4.871
0.00384 3.644 0.00376 3.680
0.00532 4.396 0.00519 4.396
0.00591 4.478 0.00577 4.478
0.00643 5.225 0.00626 5.225
0.00734 4.909 0.00711 4.909
0.00741 4.504 0.00720 4.504
0.00696 3.946 0.00675 3.946
0.00514 7.017 0.00502 7.017
=H11 0.00510 7.423 0.00496 7.423
0.00522 6.097 0.00512 6.097
Average 0.00521 4.974 0.00508 5.028
Median 0.00527 4.688 0.00515 4.688
A.V. Contreras et al. Simulation Modelling Practice and Theory 86 (2018) 1–10
across the twenty-one currency pair combinations and protability was measured by the prot factor (PF) [13], which are dened as
MSE nyy
it H it H
where nis the number of currency pairs analysed and Hthe forecast horizon predicted.
it H it H,,
are the actual and forecast
values respectively.
Fgross profits
gross losses
where a value greater than one implies that total prots exceed total losses.
The Pseudo-Voigt prole outperforms Gaussian distribution by a wide margin. As regards of forecasting accuracy, Pseudo-Voigt
distribution performs better in all of the horizons predicted (from one to twelve steps). In addition, the mean and the median of RMSE
for Gaussian distribution is slightly greater supporting the evidence in favour of Pseudo-Voigt prole. Protability results show that
Pseudo-Voigt distribution is, at least, as well as Gaussian distribution and strictly better, working with shorter horizons (one and three
step). The average of PF is slightly higher by roughly 1%. The median for all horizons analyzed is equal to both probability dis-
In conclusion, results for both testing normality of data by JarqueBera test and quality results in terms of accuracy and prof-
itability, shown that Pseudo-Voigt is the distribution that better tted historical data. Thus, Pseudo-Voigt prole is proposed as an
alternative distribution for the ENMX model.
4.2.1. Comparison with econometric models
With previous results in mind, we compare both the forecasting accuracy and the protability results between our proposal ENMX
and two dierent econometric models, the simple random walk (RW) and vector autoregressive (VAR) model. First of all, the
structure of the VAR model was dened by the methodology proposed by Luetkepohl [47]. It is focused on Schwarz lag length
criterion with the purpose of minimizing collinearity. The optimal lag length obtained by this criterion was 7 so a stationary un-
restricted VAR(7) model was estimated. The procedure for comparing these models was in the same way as in the previous section.
Results are summarizing in Table 5.
Concerning forecasting accuracy, results showed that ENMX outperformed both VAR model and the driftless random walk on all
the forecast horizons studied. The average RMSE over steps one to twelve for the ENMX model is reduced by practically 15% with
respect to VAR and RW model. Moreover, the median for ENMX model is roughly reduced by 18%. On the other hand, the prot-
ability for ENMX was clearly larger than the competing models over the shorter horizons of one to ve steps (except three step).
Furthermore, ENMX model strongly outperformed both VAR model and random walk showing a higher prot factor (15% and 70%
respectively) on average. The median over steps one to twelve was outperformed for ENMX model by roughly 10% with respect to
VAR model and 70% to RW model. Hence, it is summarized that the ENMX model is the best model in terms of both accuracy and
protability on average and median.
5. Conclusions and future work
The FOREX market is one of the main nancial market over the world. This market operates continuously, so that the high volume
of contracts and the availability of datasets comprising historical time series provide an interesting framework for scientic and
nancial research. This paper presents a bioinspired algorithm for predicting the FOREX market, entitled the ENMX (elastic network
Table 5
Forecast accuracy and protability results from the competing models.
Forecast horizons ENMX VAR RW
0.00138 3.791 0.00144 2.374 0.00151 2.374
0.00243 4.871 0.00267 3.911 0.00278 1.841
0.00376 3.680 0.00410 4.275 0.00416 1.604
0.00519 4.396 0.00586 3.596 0.00589 1.679
0.00577 4.478 0.00653 4.105 0.00659 1.385
0.00626 5.225 0.00726 6.281 0.00734 6.281
0.00711 4.909 0.00825 5.581 0.00831 1.271
0.00720 4.504 0.00825 4.877 0.00831 1.068
0.00675 3.946 0.00761 4.283 0.00765 1.059
0.00502 7.017 0.00632 4.656 0.00636 1.043
=H11 0.00496 7.423 0.00618 3.804 0.00620 1.092
0.00512 6.097 0.00585 3.212 0.00586 3.212
Average 0.00508 5.028 0.00586 4.246 0.00592 1.992
Median 0.00515 4.688 0.00625 4.190 0.00628 1.495
A.V. Contreras et al. Simulation Modelling Practice and Theory 86 (2018) 1–10
model for FOREX market) algorithm. It is inspired by the behaviour of macromolecules in dissolution and enables accurately re-
produces the unstable nature of the FOREX market by allowing the simulation to go beyond the equilibrium. Moreover, ENMX is
capable of simulating up to 21 currency pairs at once, all of them connected, as really happens in the FOREX market arena. For the
dierent probability distributions analysed, the Pseudo-Voigt best represented the variations in quotation prices. The experimental
results showed that the ENMX algorithm predicted values on the FOREX market more accurately than traditional econometric
approaches such as VAR and the driftless random walk.
The ENMX model is still in a relatively early stage of development, and we acknowledge that a relatively simple variant of the
algorithm was tested. But, with many other types of improvements still to be explored, this eld seems to oer a promising and
potentially fruitful area of research. On the algorithm side, the Pseudo-Voigt function provided very good results so it might also be
interesting to evaluate other distribution function. On the hardware side, a computational bottleneck is to be expected whenever real-
time response is required. The use of Graphics Processing Units (GPUs) may oer a good environment to enhance our simulations to
improve performance with unprecedented gains possible where parallelism is called to play a decisive role. Furthermore, the EMH
could be tested by assuming an asset/pricing model based on theories of exchange rate determination such as portfolio balance model
or uncovered interest parity model. Moreover, both another metrics as median absolute deviation (MAD) and econometric models as
Markov Switching and GARCH models may provide a more robust analysis on the forecasting accuracy of the ENMX model. Finally,
we have focused only on returns as most commercial rankings do. However, we see very interesting to implement risk measures to the
model in future works. Under this framework, the analysis of the risk-adjusted model proposed will be carried out with the purpose of
exploring strategies that lead to abnormal returns in a real world setting.
This work is supported by the Spanish MINECO under grants TIN2016-78799-P, TIN2016-80565-R and CTQ2017-87974-R (AEI/
FEDER, UE), and the Industrial Ph.D. program of the International Doctorate School at the Catholic University of San Antonio of
Murcia (UCAM). This research was partially supported by the supercomputing infrastructure of Poznan Supercomputing Center, by
the e-infrastructure program of the Research Council of Norway, and the supercomputer center of UiT - the Arctic University of
Norway. The authors also thankfully acknowledge the computer resources and the technical support provided by the Plataforma
Andaluza de Bioinformática of the University of Málaga. Powered@NLHPC: This research was partially supported by the super-
computing infrastructure of the NLHPC (ECM-02). Finally, we want to thank the anonymous reviewers for their valuable comments.
[1] A.K. Nassirtoussi, S. Aghabozorgi, T.Y. Wah, D.C.L. Ngo, Text mining of news-headlines for FOREX market prediction: a multi-layer dimension reduction
algorithm with semantics and sentiment, Expert Syst. Appl. 42 (2015) 306324.
[2] E.F. Fama, Ecient capital markets: a review of theory and empirical work, J. Finance 25 (1970) 383417.
[3] E.F. Fama, The behavior of stock-market prices, J. Bus. 38 (1965) 34105.
[4] P.A. Samuelson, et al., Proof that Properly Anticipated Prices Fluctuate Randomly, (1965).
[5] P. Makovsk, Modern approaches to ecient market hypothesis of forexthe central european case, Procedia Econ. Finance 14 (2014) 397406.
[6] K. Cuthbertson, D. Nitzsche, Quantitative Financial Economics: Stocks, Bonds and Foreign Exchange, John Wiley & Sons, 2005.
[7] A.G. Ţiţan, The ecient market hypothesis: review of specialized literature and empirical research, Procedia Econ. Finance 32 (2015) 442449.
[8] A. Degutis, L. Novickyte, The ecient market hypothesis: a critical review of literature and methodology, Ekonomika 93 (2014) 7.
[9] A.J.S. García, Simulación del Mercado Forex: Aplicación de Modelado Macromolecular, (2015) Dissertation.
[10] J.F. García, Desarrollo de métodos de prediccin para el mercado Forex basados en la aplicación de tcnicas de Montecarlo, (2015) Dissertation.
[11] M. Karplus, J.A. McCammon, Molecular dynamics simulations of biomolecules, Nat. Struct. Mol. Biol. 9 (2002) 646652.
[12] E. Fuglebakk, N. Reuter, K. Hinsen, Evaluation of protein elastic network models based on an analysis of collective motions, J. Chem. Theory Comput. 9 (2013)
[13] G.M. Caporale, L. Gil-Alana, A. Plastun, Searching for ineciencies in exchange rate dynamics, Comput. Econ. 49 (2017) 405432.
[14] R.A. Meese, K. Rogo, Empirical exchange rate models of the seventies: do they t out of sample? J. Int. Econ. 14 (1983) 324.
[15] W.T. Woo, The monetary approach to exchange rate determination under rational expectations: the dollar-deutschmark rate, J. Int. Econ. 18 (1985) 116.
[16] G.J. Schinasi, P.A.V.B. Swamy, The out-of-sample forecasting performance of exchange rate models when coecients are allowed to change, J. Int. Money
Finance 8 (1989) 375390.
[17] N. Sarantis, C. Stewart, Structural, var and bvar models of exchange rate determination: a comparison of their forecasting performance, J Forecast 14 (1995)
[18] M. Manzur, Exchange rate economics is always and everywhere controversial, Appl. Econ. 50 (2018) 216232.
[19] C.A. Sims, Macroeconomics and reality, Econometrica (1980) 148.
[20] T.R. Liu, M.E. Gerlow, S.H. Irwin, The performance of alternative var models in forecasting exchange rates, Int. J. Forecast. 10 (1994) 419433.
[21] C. Redl, Noisy news and exchange rates: a svar approach, J. Int. Money Finance 58 (2015) 150171.
[22] N.L. Joseph, Cointegration, error-correction models, and forecasting using realigned foreign exchange rates, J. Forecast. 14 (1995) 499522.
[23] A. Trapletti, A. Geyer, F. Leisch, Forecasting exchange rates using cointegration models and intra-day data, J. Forecast. 21 (2002) 151166.
[24] N. Meade, A comparison of the accuracy of short term foreign exchange forecasting methods, Int. J. Forecast. 18 (2002) 6783.
[25] C. Engel, J.D. Hamilton, Long swings in the dollar: are they in the data and do markets know it? Am. Econ. Rev. (1990) 689713.
[26] N.P. Bollen, S.F. Gray, R.E. Whaley, Regime switching in foreign exchange rates:: evidence from currency option prices, J. Econom. 94 (2000) 239276.
[27] J. Yao, C.L. Tan, A case study on using neural networks to perform technical forecasting of forex, Neurocomputing 34 (2000) 7998.
[28] J. Kamruzzaman, R.A. Sarker, Forecasting of currency exchange rates using ann: a case study, Neural Networks and Signal Processing, 2003. Proceedings of the
2003 International Conference on, 1 IEEE, 2003, pp. 793797.
[29] J. Kamruzzaman, R.A. Sarker, I. Ahmad, Svm based models for predicting foreign currency exchange rates, Data Mining, 2003, ICDM 2003. Third IEEE
International Conference on, IEEE, 2003, pp. 557560.
[30] R.J. Kuo, C. Chen, Y. Hwang, An intelligent stock trading decision support system through integration of genetic algorithm based fuzzy neural network and
articial neural network, Fuzzy Sets Syst. 118 (2001) 2145.
[31] C. Neely, P. Weller, R. Dittmar, Is technical analysis in the foreign exchange market protable? a genetic programming approach, J. Financ. Quant. Anal. 32
(1997) 405426.
A.V. Contreras et al. Simulation Modelling Practice and Theory 86 (2018) 1–10
[32] S. Bhattacharyya, O.V. Pictet, G. Zumbach, Knowledge-intensive genetic discovery in foreign exchange markets, IEEE Trans. Evol. Comput. 6 (2002) 169181.
[33] J.R. López-Blanco, P. Chacón, New generation of elastic network models, Curr. Opin. Struct. Biol. 37 (2016) 4653.
[34] D.L. Ermak, J. McCammon, Brownian dynamics with hydrodynamic interactions, J. Chem. Phys. 69 (1978) 13521360.
[35] A.A. Benítez, J.G.H. Cifre, F.G.D. Baños, J.G. de la Torre, Prediction of solution properties and dynamics of rnas by means of Brownian dynamics simulation of
coarse-grained models: Ribosomal 5s rna and phenylalanine transfer rna, BMC Biophys. 8 (2015) 11.
[36] J.L. Cascales, S. Navarro, J.G. de La Torre, Deformation, orientation, and scattering from polymer chains in shear ow. A Brownian dynamics simulation study,
Macromolecules 25 (1992) 35743580.
[37] H.P. Sánchez, J.G. de la Torre, F.D. Baños, Transient electric birefringence of wormlike macromolecules in electric elds of arbitrary strength: a computer
simulation study, J. Chem. Phys. 122 (2005) 124902.
[38] J.G. de la Torre, J.G.H. Cifre, A. Ortega, R.R. Schmidt, M.X. Fernandes, H.E.P. Sánchez, R. Pamies, Simuex: algorithms and tools for simulation of the
conformation and dynamics of exible molecules and nanoparticles in dilute solution, J. Chem. Theory Comput. 5 (2009) 26062618.
[39] I. Bahar, A.R. Atilgan, B. Erman, Direct evaluation of thermal uctuations in proteins using a single-parameter harmonic potential, Fold Des. 2 (1997) 173181.
[40] H.D. Rocco, A. Cruzado, The voigt prole as a sum of a gaussian and a lorentzian functions, when the weight coecient depends only on the widths ratio, Acta
Phys. Pol. A 122 (2012).
[41] T. Ida, M. Ando, H. Toraya, Extended pseudo-voigt function for approximating the voigt prole, J. Appl. Crystallogr. 33 (2000) 13111316.
[42] P.J.V. Laarhoven, E.H. Aarts, Simulated Annealing, Simulated Annealing: Theory and Applications, Springer, 1987, pp. 715.
[43] V. Čern, Thermodynamical approach to the traveling salesman problem: an ecient simulation algorithm, J. Optim. Theory Appl. 45 (1985) 4151.
[44] OANDA Corp, https://www.oanda.com/lang/en/solutions-for-business/historical-rates/main.html, 2017.
[45] Bank for International Settlements, https://www.bis.org/, 2018.
[46] C.M. Jarque, A.K. Bera, A test for normality of observations and regression residuals, Int. Stat. Rev./Rev. Int. Stat. (1987) 163172.
[47] H. Luetkepohl, Econometric Analysis with Vector Autoregressive Models, Handbook of Computational Econometrics, (2009), pp. 281319.
A.V. Contreras et al. Simulation Modelling Practice and Theory 86 (2018) 1–10
This research hasn't been cited in any other publications.
  • Article
    Full-text available
    The development of the capital markets is changing the relevance and empirical validity of the efficient market hypothesis. The dynamism of capital markets determines the need for efficiency research. The authors analyse the development and the current status of the efficient market hypothesis with an emphasis on the Baltic stock market. Investors often fail to earn an excess profit, but yet stock market anomalies are observed and market prices often deviate from their intrinsic value. The article presents an analysis of the concept of efficient market. Also, the market efficiency evolution is reviewed and its current status is analysed. This paper presents also an examination of stock market efficiency in the Baltic countries. Finally, the research methods are reviewed and the methodology of testing the weak-form efficiency in a developing market is suggested.
  • Article
    This article reviews the major developments in the recent literature on exchange rate economics. It is argued that the link between the exchange rate and economic fundamentals is breaking new ground. Evidence indicates that alternative analytical frameworks (such as the new open-economy macroeconomics) and exchange rate arrangements (such as the euro) have their theoretical and analytical elegance, but are proving empirically very difficult to implement. The role of methodological advances and alternative fundamental instruments (such as world commodity prices) is also highlighted.
  • Article
    Full-text available
    This paper develops a new pair trading method to detect inefficiencies in exchange rates movements and arbitrage opportunities using a convergence/divergence indicator (CDI) belonging to the oscillatory class. The proposed technique is applied to 11 exchange rates over the period 2010–2015, and trading rules based on CDI signals are obtained. The CDI indicator is shown to outperform others of the oscillatory class and in some cases (for EURAUD and AUDJPY) to generate profits. The suggested approach is of general interest and can be applied to different financial markets and assets.
  • Article
    Full-text available
    The concept of efficiency is central to finance. For many years, academics and economics have studied the concept of efficiency applied to capital markets, efficient market hypothesis (EMH) being a major research area in the specialized literature. There are many opposite views regarding the EMH, some of them rejecting it, other supporting it. But how it all started and the way studies evolved during the last decade is very important. This survey examines the growing body of empirical research on efficient market hypothesis. The conclusion of this article is that testing for market efficiency is difficult and there is a high possibility that, because of changes in market / economic conditions, new theoretical model should be developed to take into consideration all changes. As a reasons, it is important to continue the empirical studies to decide if capital markets are or are not informational efficient.
  • Article
    Assuming that V (x) ≈ (1 - μ) G 1(x) + μL 1(x) is a very good approximation of the Voigt function, in this work we analytically find μ from mathematical properties of V (x). G 1(x) and L 1(x) represent a Gaussian and a Lorentzian function, respectively, with the same height and HWHM as V (x), the Voigt function, x being the distance from the function center. μ is obtained as a function of a, a being the ratio of the Lorentz width to the Gaussian width. We find that, the Voigt function calculated with the expression we have obtained for μ, deviates from the exact value less than 0.5% with respect to the peak value.
  • Article
    Full-text available
    The possibility of validating biological macromolecules with locally disordered domains like RNA against solution properties is helpful to understand their function. In this work, we present a computational scheme for predicting global properties and mimicking the internal dynamics of RNA molecules in solution. A simple coarse-grained model with one bead per nucleotide and two types of intra-molecular interactions (elastic interactions and excluded volume interactions) is used to represent the RNA chain. The elastic interactions are modeled by a set of Hooke springs that form a minimalist elastic network. The Brownian dynamics technique is employed to simulate the time evolution of the RNA conformations. That scheme is applied to the 5S ribosomal RNA of E. Coli and the yeast phenylalanine transfer RNA. From the Brownian trajectory, several solution properties (radius of gyration, translational diffusion coefficient, and a rotational relaxation time) are calculated. For the case of yeast phenylalanine transfer RNA, the time evolution and the probability distribution of the inter-arm angle is also computed. The general good agreement between our results and some experimental data indicates that the model is able to capture the tertiary structure of RNA in solution. Our simulation results also compare quite well with other numerical data. An advantage of the scheme described here is the possibility of visualizing the real time macromolecular dynamics.
  • Article
    This paper introduces noisy news shocks into a model of exchange rate determination to measure the impact of these shocks using a SVAR. Agents in the foreign exchange market make decisions with imperfect information about economic fundamentals driving interest rate differentials between countries in that they must rely on a noisy signal of future interest rates. I apply the framework to the USD/GBP nominal exchange rate for the period 1986-2013. Results show that noisy-news explains approximately one fifth of the forecast error variance in the nominal exchange rate, with noise accounting for double (12%) that of news (6%). A historical decomposition of the exchange rate indicates that noise shocks are especially important during periods of changing monetary policy, e.g. the 1990 easing and 2001 tightening of U.S. monetary policy and the unconventional monetary policies surrounding the financial crisis of 2008.
  • Article
    Full-text available
    In this article the main goal is to verify the efficiency hypothesis of FOREX market in the sample of panel dataset of the Central European countries. Traditionally there are many approaches for testing the market efficiency hypothesis. We should briefly mention the regression analysis, time series analysis, vector autoregression or linear co-integration. For recent years there are modern approaches that change the technical way of testing. Pedroni's panel co-integration method is a modern method for verification conclusions of pure economic theory. It's innovation is in analyzing short time series but on a great range of panel data. The other way is to include non-linear co-integration into non-stationary time series.The FOREX market is market with the greater trading volumes of financial traded assets. Either the rejection or the confirmation of the market efficiency hypothesis highly influence the regulation or liberalization of financial services.More we have discussed the influence of the risk premium, the influence of transaction costs and its response to equilibrium readjustment. We have shown the empirical evidence, which results in the strong tendency of nominal convergence in EU countries.