Next Article in Journal
Alteration Mechanism of Variscan Granite in a Project Area at the Northern Foot of the Tianshan Mountains, China
Next Article in Special Issue
Applying Learning and Self-Adaptation to Dynamic Scheduling
Previous Article in Journal
Resource Scheduling Method for Equipment Maintenance Based on Dynamic Pricing Model in Cloud Manufacturing
Previous Article in Special Issue
Online Machine Learning and Surrogate-Model-Based Optimization for Improved Production Processes Using a Cognitive Architecture
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Collaborative Multiobjective Evolutionary Algorithms in the Search of Better Pareto Fronts: An Application to Trading Systems

by
Francisco J. Soltero
1,
Pablo Fernández-Blanco
2 and
J. Ignacio Hidalgo
3,*
1
Facultad de Ciencias de la Economía y de la Empresa, Universidad Rey Juan Carlos, 28032 Madrid, Spain
2
Escuela Politécnica Superior, Universidad Francisco de Vitoria, 28223 Pozuelo de Alarcón, Spain
3
Department of Computer Architecture and Automatics, Faculty of Computer Science, Universidad Complutense de Madrid, 28040 Madrid, Spain
*
Author to whom correspondence should be addressed.
Submission received: 6 October 2023 / Revised: 31 October 2023 / Accepted: 6 November 2023 / Published: 19 November 2023
(This article belongs to the Special Issue Evolutionary Algorithms and Their Real-World Applications)

Abstract

:
Technical indicators use graphic representations of datasets by applying various mathematical formulas to financial time series of prices. These formulas comprise a set of rules and parameters whose values are not necessarily known and depend on many factors, such as the market in which they operate, the size of the time window, and so on. This paper focuses on the real-time optimization of the parameters applied for analyzing time series of data. In particular, we optimize the parameters of some technical financial indicators. We propose the combination of several Multiobjective Evolutionary Algorithms. Unlike other approaches, this paper applies a set of different Multiobjective Evolutionary Algorithms, collaborating to construct a global Pareto Set of solutions. Solutions for financial problems seek high returns with minimal risk. The optimization process is continuous and occurs at the same frequency as the investment time interval. This technique permits the application of the non-dominated solutions obtained with different MOEAs at the same time. Experimental results show that Collaborative Multiobjective Evolutionary Algorithms obtain up to 22% of profit and increase the returns of the commonly used Buy and Hold strategy and other multi-objective strategies, even for daily operations.

1. Introduction

Time series currently have multiple applications in fields such as medicine and the financial market. One of the most important financial markets is the Foreign Exchange (FOREX). International trade sharing and exchange are conducted at FOREX. In other words, FOREX is a financial market in which the values of currencies are traded. Initially, this exchange was due to the sale of goods and services. However, today, these operations represent a tiny percentage of its activity, and most transactions are due to operations related to the trading of financial products. Consequently, this market is independent of the variations in trade flows. It is more influenced by other macroeconomic variables, such as the growth of GDP, inflation, the mass of interest, and trade balance, among others. The main activity of the FOREX market is currency exchange, and the value of data in the time series (price) is the exchange rate between them. This relationship is called the nominal exchange rate and it indicates the amount of currency the market provides for one monetary unit in exchange for the other. The expression more commonly used to signify the exchange rate between two currencies is the Currency A/Currency B ratio. For instance, USD/EUR represents the exchange value of one US dollar per Euro.
The behavior of any type of financial asset, including currencies, has been observed since the creation of this type of market [1,2,3,4]. The way of conducting this study can be classified as fundamental or technical analysis. Fundamental analysis (FA) studies the price of an asset from the point of view of the future evolution of its performance [5]. Technical analysis (TA) [6] is based mainly on a market action study through graphics. For both, it is essential to identify the tendency in the early stages so that the following operations are conducted in the right direction. The final objective of the analysis is to construct trading rules and follow them to operate in the market, enabling exchange operations to obtain economic returns with the minimum risk.
TA is based on technical stock market indicators (TIs) configured according to a set of parameters, which work on discrete time series of prices of the target value. There is a wide range of TIs—some simple, others more elaborate. All TA tools intend to obtain relevant information to help investors make sound investment decisions, defining buying and selling operations, even under conditions of uncertainty.
There are different ways to evaluate the results obtained by these techniques. One of the most common is to compare the results obtained with the strategy of “Buy and Hold” (B&H).This is based on the view that long-term financial markets receive a reasonable rate of return despite periods of volatility or loss. Despite its simplicity, B&H is one of the strategies most used by investors, not only for comparison but also for investing. Several studies have applied Evolutionary Computation techniques to obtain trading rules to maximize the benefits of investments [4,7,8,9,10]. Lohpetch and Corne conduct a good review of these techniques in [2,3,11], where the use of Multi-objective Genetic Programming is suggested to discover effective trading rules. More recently, Bodas et al. [12,13] show that parameter optimization of TIs with Multi-objective Evolutionary algorithms (MOEAs) could generate investment strategies that improve the performance of B&H.
In this paper, we expand the above proposals with a new approach that uses different evolutionary algorithms to obtain the best values of the parameters of technical indicators and generate investment rules. The novelty is that we construct the Pareto set of solutions by combining those obtained with different MOEAs. In particular, we apply NGSA-II [14], SPEA-II [15], PAES [16], PESAII [17] and MoCell [18]. These MOEAs are important references in the literature designed to cover several parts of the search space. We propose to make them collaborate in the exploration of the search space. For this aim, this paper compares two different approaches. The first approach (Approach A) is based on a classical approach, where only one MOEA is used to obtain all non-dominated solutions. In the second one (Approach B), the best non-dominated solutions of all algorithms are selected.Furthermore, results are good for different time windows. The main contributions of this work are as follows:
  • We propose a new evolutionary algorithm approach where different well-known MOEA algorithms collaborate to solve multi-objective problems. This is the main contribution of this work, since, to the best of our knowledge, it is the first time that several MOEAs operate together to construct the Pareto front.
  • We apply this approach to the real-world problem of generating trading rules for calculating technical indicators parameters for the FOREX exchange market.
  • We conduct a comparison with approaches that use only one MOEA algorithm and show that our proposal of combining different algorithms covers a more extended part of the Pareto front and obtains non-dominated solutions.
The rest of the paper is structured as follows. Section 2 briefly reviews related work on Evolutionary Computation and finance. Section 3 explains the method proposed in this paper. Section 4.1 presents the real-time investment framework. Section 4.2 shows the performed experiments. Section 4.3 presents results and discussion. Finally, conclusions are presented in Section 5.

2. Related Work

Evolutionary computing has been widely applied to problems of prediction and optimization related to economics, finance, and, more specifically, the currency market. Both mono-objective and MOEAs have been used on a wide variety of problems. Evolutionary algorithms are applied in financial economics in different areas. Optimizing client portfolios is one of them. In [19,20,21], the investment model, portfolio optimization and stock selection are successfully obtained using multi-objective genetic algorithms. Other contributions where MOEAs are applied is in the Management of Financial Risk, looking for efficient strategies for asset allocation in relation to risk and profitability. In works [22,23], different market risks and credit risk are considered, as well as restriction on the volume of positions. This approach allows the integration of different objectives related to the risk management function. Using real data, a portfolio analysis is carried out and possible solutions are extracted for a banking risk manager. These latest studies provide optimization in the selection of the investment portfolio to minimize risks and diversify capital. In our proposal, risk is minimized by reducing the time operations remaining active in the market. On the other hand, diversification is found in the number of different operations performed, operating in different time windows. In ref. [24,25], a multi-objective evolutionary algorithm is proposed to reduce the number of parameters used in creating financial models. The experimental results show that the proposed approach significantly reduces their quantity, without losing prediction capacity. A systematic review of recent advances in machine and deep learning in financial markets can be found in study [4]. This work considers several financial domains that provide an overview of the techniques proposed in this area. Key contributions include an analysis of the characteristics of the data used for model training, evaluation of validation approaches, and model performance addressing each financial problem. Specifically, study [26] combines deep reinforcement learning, transformative layers, and a U-Net architecture to determine volatility trends from the historical prices of 10 stocks from a real financial market. The results show a higher profitability than the rest of the approaches and allows for detection of market volatility and hedging its risk. Studies on decision making can also be found [27,28]. This complex problem involves many different aspects and approaches to address it. As an example of complexity in this area, work in [23] analyzes elements of quantum information, neuroscience, and artificial intelligence to resolve these issues. In the economic literature, different methods have been proposed for creating new indices, some of them supported by macroeconomic or fundamental data. Our contribution is based on technical analysis and price-based indices, although it could be extended to others, whether existing or newly created. Decision-making has been studied to minimize risks and maximize benefits.
In this paper, we focus on applying MOEAs to optimize the parameters of technical indicators within the FOREX Market. A wide variety of researchers seek to profit in different markets using different techniques. Some approaches use Genetic Algorithms or other Evolutionary Algorithms to optimize a Neural Network [4,29,30], other Algorithms are based on Genetic Programming [9,31], and still others employ EAs to evolve trading rules [8,20,32]. In [12,13], a version of a technique for optimizing the parameters of TIs such as the Moving Average Convergence-Divergence indicator (MACD) and the Relative Strength Index (RSI) [13] was proposed. The technique is based on using a MOEA with a Super Individuals (MOEASI) algorithm [25].
The training dataset, constraints, and objective function are static in dynamic optimization problems. Usually, the optimization starts from a fixed interval of data, called training sets, from which it obtains a group of solutions. These solutions undergo a validation period, passing various filters based on restrictions and new datasets. The set of resultant individuals is used in the evaluation periods. The individuals can be refreshed every certain time period. The use of this static dataset to obtain individuals generates two main problems: The dataset does not consider the evolution of the system, its current status, and the constant changes, and solutions may be sensitive to the training dataset, producing the undesired effect of overfitting [13]. Validation periods are included to avoid overfitting. Thus, the sensitivity to the dataset decreases but is not eliminated. Different authors have studied the characteristics of changes in dynamical systems [11,17,33]. This paper uses the “tick-by-tick” series of the EUR/USD pair. The characterization of this series could be modeled on a system of small movements and moderate changes [34]. The time series dynamic is vital because excessively sharp dynamics can limit the provision of information to the next generation of solutions.

3. Materials and Methods

This paper investigates two approaches for optimizing TIs based on MOEAs. Solutions to the optimization problem represent the parameters of the technical indicators selected for obtaining trading signals. With its parameters, this TI decides what to do (buy–sell–nothing) at the beginning of the following day (or the subsequent time step; it could even be tick by tick). Unlike other approaches, in our proposal, non-dominated solutions are obtained continuously and applied during a limited period. This makes them highly adaptable to market conditions. Moreover, these solutions provide information about the system’s current state for future iterations, as they are part of the initial population for the next time intervals. The approach tackles the dynamism of the problem since it considers the current state and the changes in the system. The active individuals are the best for the current data = set. When new data enter the system, they activate the computation of new solutions. The number of new solutions is controlled and is around 30 percent of the total population.

3.1. Two Different Combinations of MOEAS

As we mentioned, two different approaches are compared. They differ in the way the solutions are obtained:
  • Approach A: Apply a single MOEA for obtaining non-dominated solutions.
  • Approach B: Combine a set of MOEAs to obtain a global group of non-dominated solutions.
Figure 1 shows the functional diagram of both approaches. Under Approach A, a single MOEA is used, whereas under Approach B, a set of them is used, but in both cases, the result of the optimization process is a set of non-dominated solutions. These are applied in the market to obtain daily results. In both approaches, the solutions are selected according to a group of objectives under a non-dominating selection process. The fitness values are calculated by simulating the market with the selected dataset. Approach A allows us investigation of various implementations of different MOEAs, while Approach B constitutes the main contribution of this work. We selected a set of the most popular MOEAs found in the literature:
  • Non-dominated Sorting Genetic Algorithm-II (NSGA-II) [14].
  • Strength Pareto Evolutionary Algorithm (SPEA2) [15].
  • Pareto Archived Evolution Strategy (PAES) [16].
  • Niched Pareto Genetic Algorithm (PESA-II) [17].
  • Cellular Genetic Algorithm (MOCell) [18].

3.2. Genetic Encoding

As in other evolutionary computation algorithms, solutions are represented by a set of integer chromosomes or a group of values. To obtain a trading rule, i.e., a solution, we need the parameters of two technical indicators, their corresponding time windows, the operational parameters, and the triggering signals. According to that, four chromosomes that offer us the values of the different parameters compose the evolutionary individual code.

3.2.1. Chromosome for the Two Technical Indicators

We selected two of the most widely used technical indicators: the Moving Average of the Convergence-Divergence indicator (MACD) and the Stochastic Oscillator indicator (SOI). Given a time series Y ( t ) = { P ( t 0 ) , P ( t 1 ) , , P ( t l 1 ) } of prices P ( t i ) , MACD is obtained in a plot with two lines given by Equations (1) and (2):
M A C D ( t ) = E M A ( a , Y ( t ) ) E M A ( b , Y ( t ) ) ,
S I G N ( t ) = E M A ( c , M A C D ( t ) ) ,
where E M A ( a , Y ( t ) ) indicates the exponential moving average over time series Y ( t ) with period a. Therefore, three parameters are necessary to define the MACD indicator: a, b, and c.
On the other hand, the SOI is a momentum indicator that uses support and resistance levels. The term stochastic refers to the point of a current price about its price range over a previous period. It attempts to predict value turning points by comparing the closing price to its price range. Two levels based on the history of the closing values delimit the price range. Traditionally, the content is fixed between 20% (overbuy) and 80% (oversell) of the maximum value over a period. In this paper, dynamic bands adapt their position to the recent price behavior, replacing those levels with S O I a and S O I b . In addition, we need another parameter to calculate the indicator, S O I c . This indicates the period to apply Equations (3) and (4). K generates an anticipatory signal, and D is a signal confirming the trend in the change.
K = 100 · P r i c e L o w e s t P r i c e ( S O I c ) H i g h e s t t P r i c e ( S O I c ) L o w e s t P r i c e ( S O I c )
D = S M A 3 ( K ) ,
where S M A 3 is the 3-period simple moving average of K, and Price is the last closing price. In summary, the first chromosome represents six parameters to be optimized: a , b , c , S O I a , S O I b , and S O I c .

3.2.2. Chromosomes for the Time Windows

This is one of the most innovative aspects of the work because investors usually work with standard-size windows in a traditional trading system. In this paper, we let the algorithm select the optimal size of the window to operate with MACD and SOI. The solution strategy chooses the time window for a higher yield. The parameters are E C T S 1 and E C T S 2 for the timescales of MACD and SOI, respectively. The value is measured in the number of intervals that can take a value bellowing to [ 1 , 1440 ] :

3.2.3. Chromosome Related to the Operation of the Market

The three operational parameters that are commonly used in trading and measured in pips (a pip is the minimum variation that can occur in the price of a currency) with a numeric integer value in [ 5 , 300 ] are the following:
  • A stop-loss order is designed to limit an investor’s loss on a position.
  • A take-profit order specifies the number of pips from the current price point to close out their current position for a profit.
  • The trailing stop is a stop order that can be set at a defined percentage away from a security’s current market price. A trailing stop for a long position would be set below the security’s current market price; for a short position, it would be set above the current price.
Hence, the third chromosome encodes three parameters: S L for the “stop-loss”, T P for the “take-profit”, and T S for the “trailing-stop”:

3.2.4. Chromosome Related to Triggering Signal Generation

For the MACD, the turnaround between the current and previous bar generates a buy signal. To achieve this, we include two additional parameters: M A C D p a and M A C D p b , which try to locate the point where the signal is more reliable (see Figure 2). The value is given in pips [ 0.100 , 0.100 ] . The Stochastic indicator in Figure 3 has two reference values, from which the overbought and oversold are generated. The parameters used are E S T p a , the higher reference level with values belonging to [ 50 , 100 ] , and E S T p b for the lower reference level, which is between [ 0.50 ] .

3.3. Evaluation of the Individuals

The objective of the investment tool is to produce strategies to generate buy and sell signals for an asset in the market. The difference between the input and output prices establishes the operation’s result. The operation can be positive or negative and may include the costs generated during the transactions. In this work, we propose tackling the problem from a multi-objective perspective. We apply a set of fitness functions explained in this section. The fitness functions are based on a set of values of closed forms. Let us define them first.
Definition 1. 
The Holding Period Return (HPR) is the return obtained during the period in which the strategy was applied. For example, 1.01 and 0.99 refer to a profit and loss of 1%, respectively.
Definition 2. 
The Terminal Wealth Relative (TWR) is the value obtained from multiplying all the HPRs.
Definition 3. 
Mathematical expectation (ME) is the amount expected to earn or lose on average in each operation. The increase in ME is a necessary but not sufficient condition for a profitable system since it does not consider the number of operations. If a system has positive expectations and TWR is greater than one, then we have a profitable strategy, provided the same amount of capital is invested. ME can be obtained with Equation (5):
M E = ( 1 + B ) · S O P 1 ,
where B is the Average of the Profit/Loss Ratio, and SOP is the percentage of successful operations.

3.3.1. Objective Function 1: Maximize the Average of Returns

Given investment strategy x i consisting of a set of input and output signals, a fixed set of parameters, and a given time interval [ j , k ] to be applied over stock or index, s is the return of this strategy, r x i ( s [ j , k ] ) is the difference between the price of s at time t = b , P ( s ( k ) ) and the price at time t = a , P ( s ( j ) ) . These prices include the effect of commissions of each operation.
r x i ( s [ j , k ] ) = P ( s ( j ) ) P ( s ( k ) ) .
In this case, Equation (6) coincides with the concept of HPR defined above. The only difference is that the HPRx is defined as a percentage and is calculated differently depending on whether a buy or a sell occurs.
H P R x b u y = 1 + C f C o C o ,
H P R x s e l l = 1 C f C o C o .
C o is the price at the beginning of the operation plus commissions, and C f is the price at the end of the operation. In a time interval, a set of positions can be opened.
Given a set X of N investment strategies x i , i [ 1 , N ] , which operates on an index between the time instants a and b, we define Objective 1 as maximization of the average return, R X ¯ [ j , k ] obtained by the set X in [ j , k ] , which is the sum of individual returns, r x i :
R X ¯ [ j , k ] = i = 1 N r x i ( s [ j , k ] ) N .

3.3.2. Objective Function 2: Minimize the Risk of the Strategy

Risk management is a combination of multiple interrelated parameters, among which are the following:
  • Presence of the maximum number of consecutive losses (“drawdown”).
  • Controlling the dispersion of operations over the average (Standard Deviation).
  • Limit of the amount of invested capital.
  • Determination of the limits on losses (“stop-loss”) and profits (“take-profit”).
A sound system should work with operations possessing a small dispersion from the mean. That is, it should check that standard deviation σ of returns r x i is as small as possible. Thus, it is unnecessary to have a “stop-loss” and “take-profit” too large. Also, if we return to the initial concept, we see that when the arithmetic means are minimized, the geometric mean is maximized, thus the ROI. Another risk factor is the permanence of market operations and the interest it generates. It is, therefore, essential to set a “take-profit” that allows collection profits and does not have an open position in a neutral trading. The only thing it does is consume resources and generate losses. Concerning ROI, it is referred to as a percentage of the initial investment. In short, minimal deviation on average makes the operations work in a small range, limiting the operational time and the “drawdown”. This maximizes the available capital for operations and minimizes risk. Objective 2: Minimize the standard deviation as expressed in Equation (10):
σ = i = 1 N ( r x i ( s [ j , k ] ) R X ¯ [ j , k ] ) 2 N .

3.3.3. Objective Function 3: Maximize the Number of Operations

The investor always tries to reduce the overall investment risk by diversifying their portfolio. This action allows finding synergies that accelerate capital growth. When operating with a positive expectation system, further operations for the same period help to maximize this increase and, therefore, its diversification. A diversified portfolio is a set of values that operate in conjunction to obtain a positive expectation. Correlation management is complex since all values are correlated when the market has a steep trend, and gains or losses are widespread. In our system, the securities portfolio consists of all possible solutions of the Pareto front together. Each solution maximizes the number of operations the system can obtain. The system works with the same assets and currencies but can find different solutions. This means that in the same period, the solutions found by the system execute orders for buying and selling simultaneously. This produces the diversification of the complete portfolio. Another factor to consider is the ROI. One strategy with a very optimistic expectation that only operates once offers worse performance than a strategy with a positive expectation that operates several times. An investor always seeks the best possible return on their investment, which requires increasing the number of operations N.

3.4. Formulation of the Problem

The final formulation of the problem is as follows: Find the value of parameters  a , b , c , S O I a , S O I b , S O I c , E C T S 1 , E C T S 2 , SL, TP, TS, E S T p a and E S T p b as defined above that maximize R X ¯ [ j , k ] , minimize σ and maximize the number of operations N.

4. Results

4.1. Experimental Framework

We implemented a real-time software tool for testing the ideas presented in previous sections. It was developed under the object-oriented paradigm with two programming languages: C++ and Java. The heuristic algorithms were implemented using the jMetal 4.0© [19] library. jMetal is an object-oriented framework for developing, experimenting, and studying metaheuristics for solving multi-objective optimization problems. Metatrader 4© software is utilized for data acquisition and real-time operation. MetaTrader is an online trading platform that provides brokerage services for real-time market investment. In addition, MetaTrader can be used to perform technical analysis on specific temporary intervals. It also allows the use of different time windows for investment, ranging from minutes to months. Our Software architecture permits the application of the heuristic algorithms of jMetal on the whole set of assets available at Metatrader. Our System architecture, which is represented in Figure 4, consists mainly of six modules (two of them are database structures):
  • The data collector obtains values of assets in real time and stores the information. This module is always running.
  • The Information Manager is responsible for managing the system’s responses from data provided by the experiment manager and the active experts. It determines the experts who should be engaged in real time.
  • The manager of experiments: the Experiments Manager handles the parameters, such as the number of evaluations, the temporary period to analyze, the Evolutionary algorithm used, its probability values of mutation and crossover, etc. This can be used for conducting experiments or for operation in real time. The only thing that changes is the dataset used.
  • The expert: the Expert (business solution) is responsible for buying and selling and works directly on the trading platform. The data needed for operation are generated in real time and stored in the operational database. It can operate concurrently with all solutions along the Pareto frontier.
  • A database storing historical data.
  • A database updated in real time containing the most recent data and the non-dominated solutions.

4.2. Experiments

This study aims to compare the optimization from both multiobjective approaches. According to several authors [23], the best strategies for “trading” are generated by combining two indicators: a follower of trends and an oscillator. The method used in this work is based on this recommendation. The selected indicators are MACD and stochastic [29]. The first one indicates the so-called surge, the system’s tendency, while the second detects the best operating options following the previous trend, also called the wave. Both indicators are explained in the section on technical indicators in Section 3.2. This paper selects a basic trading strategy for conducting experiments. This is optimized using evolutionary algorithms to improve the results obtained by other classical approaches. Finding the best trading strategy for this market is beyond the scope of this work. The set of experiments is as follows:
  • Experiments A1, A2, and A3: Considering Approach A, with datasets 1, 2, and 3, respectively.
  • Experiments B1, B2, and B3: Considering Approach B, with datasets 1, 2, and 3, respectively.
For this study, we use the EUR/USD currency market dataset. The datasets are selected because they represent a sufficiently long period and constitute different market trends. Table 1 shows a summary. Data are obtained from the website https://gainfutures.com/ (accessed on 2 September 2023). These have a format of bid/ask and are tick by tick.

4.3. Results and Discussion

First, we want to study the benefits of each proposed approach. In both cases, the algorithms used are PESA-II, PAES, NSGA-II, SPEA-II, and MoCell. Approach A comprises non-dominated solutions of the Pareto front of the set of all selected evolutionary algorithms, while Approach B is formed by those non-dominated solutions belonging to the Pareto front of any of the above algorithms. In both cases, all solutions are used to operate. Figure 5, Figure 6 and Figure 7 show the performance obtained for the compared methods and datasets.
Figure 5 shows the earnings results in Dataset 1, which includes 800,000 data points taken from 4 January to 30 March 2021. These data correspond to a neutral market environment, i.e., without much variation. The figure compares the profits obtained with the different algorithms separately with those obtained with a collaborative approach, which is the one proposed in this article. This option is identified in the figures as SET MOEAS for clearer figure reading. SPEA-II, NSGA-II, and PESA-II obtain very similar results, around a 19% benefit, while SET MOEAS obtains a 16% higher benefit, i.e., around 23%. MoCELL performs the worst, but is close to PESA-II, while PAES is clearly lower.
Dataset 2 includes data from 23 September to 29 December 2022 and corresponds to a bullish environment, including 660 thousand data. Figure 6 shows the results for the dataset. Here, it can be seen that, again, SET MOEAS obtains the highest profit, which is even slightly higher than in Dataset 1. This may be because, in the bullish environment, it is favored by maximizing the number of trade opeartions. SPEA-II is now the only one of the individual algorithms that comes close to the result of SET MOEAS, with PAES again being the worst performer, at around 5.6%.
Finally, Figure 7 shows the results for Dataset 3, which corresponds to 675,000 data from 22 March to 5 May 2023. This dataset includes data from a mixed environment, in which there are periods of greater dynamism or high variability (bullish) and periods of greater tranquillity (neutral). In this case, the results are very similar to those of Dataset 2, probably due to the influence of the periods of lower stability that affect the algorithms that do not collaborate in the search for the Pareto front. In all cases, we can appreciate the superiority of the approach proposed in this paper. The results show that the best values are obtained by Method B (the collaborative SET MOEAS) compared to any of the isolated evolutionary algorithms in Approach A. Although a comprehensive analysis of the importance of the different algorithms in the SET MOEAS collaboration is needed, the results clearly indicate that this inter-algorithm collaboration obtains a larger Pareto front and thus provides a more robust set of solutions in terms of its applicability. Therefore, it is concluded that the proposed scheme represents a good model that can be applied to use different investment strategies in the stock market.
Figure 8, Figure 9 and Figure 10 show the number of solutions obtained in a complete experiment. The graphs show a comparison between the number of solutions obtained and those that actually represent market transactions, i.e., an entry or an exit. The bar marks the mean value line for 30 runs and the segment indicates the standard deviation. Figure 8 shows these values for Dataset 1. We can see that there is no direct relationship between the number of solutions obtained and the number of solutions that perform operations, beyond the fact that, obviously, the number of operations is lower than the number of solutions. There is also no clear trend between the number of solutions generated and the profit obtained, nor between the number of solutions causing operations and the profit. We can see that the number of non-dominated solutions generated by SET MOEAS is slightly higher than that of those generated by the other algorithms alone. However, it should be noted that this figure does not indicate the width of the final Pareto front, but the number of non-dominated solutions that were generated during the evolutionary process. Similar conclusions can be obtained from Figure 9 and Figure 10. Also, we see that for Approach B, the number of business operations is higher than that of the other approaches. This is a feature that makes the proposed method better than others.
Figure 11 shows this fact in more detail. Moreover, the influence of different datasets in terms of variation of the solutions obtained is irrelevant. Figure 12 shows the average profit a solution has for each buy/sell operation made while it is active. There are variations in the results obtained by different evolutionary algorithms, although not statistically significant. However, the results obtained by the two proposed methods are similar.
Let us compare the benefits obtained by Approach B with those of other techniques. Most of the works in the area only operate with a single solution. This solution is sometimes maintained for the entire period after a previous optimization. In other cases, it changes with the arrival of new data, but finally, only one solution operates, even if different objectives are used to obtain the final solutions [12]. This selection can depend on various factors but typically is determined by the gain. This line is covered by what we call Approach A. Moreover, the selected strategy is compared with the “Buy and Hold” strategy. This strategy is widely used to evaluate investment strategies [7].
It consists of buying a security and holding it for a long time. The benefit of the Buy and Hold strategy is obtained by subtracting the initial value from the final value. There are two possible operations since the investor can bet that the value will increase or decrease. In this study, 100 experiments are used to simulate each type of strategy. The following figure shows the results obtained (Figure 13). Approach B improves the other results. Consequently, we conclude that the proposed approach is a valid strategy.

4.4. Limitations of the Work

Although the study presented in this paper brings valuable insights into the real-time optimization of parameters for technical financial indicators, there are also some limitations. First, the proposed method has been exclusively tested in the EUR/USD market. While these findings are promising, it is important to note that the dynamics and behaviors of different currency pairs can vary significantly. Therefore, the generalization of the results to other currency pairs remains unverified. The design of the algorithm is well-suited for markets characterized by high levels of volatility and price dynamism. Its effectiveness in less dynamic markets is yet to be explored. Consequently, its applicability in varying market conditions needs further examination. Although the experimental results indicate enhanced returns, exploring diverse experimental scenarios and financial markets can offer a more holistic perspective on the performance of our methodology. In conclusion, while the Collaborative Multiobjective Evolutionary Algorithms presented in this study offer a promising approach for optimizing technical financial indicators, these limitations necessitate further research and consideration. Addressing these limitations through extensive testing, comparative analysis, and exploration of practical implications will strengthen the practical robustness of this methodology. This will be the subject of future works.

5. Conclusions and Future Work

In this paper, a tool for real-time operations in the foreign exchange market is developed. It is based on optimizing a set of parameters via a multi-objective evolutionary algorithm. The parameters are related mainly to three areas: the stock technical indicators, other specific market indicators, such as stop-loss, take-profit, and trailing-stop, and, finally, the corresponding time windows in which the operation takes place. The system offers high scalability to other potential financial markets. It is also entirely customizable for any type of indicator or the inclusion of new parameters. The system generates a set of expert signals that operates autonomously in the market. The signals are continually evaluated to see whether others can obtain better performance for the current dataset, and if it occurs, they are replaced automatically. This set consists of the entire Pareto front of solutions of a group of MOEAs, which generate between 80 and 120 different solutions. They could be possibly used as filters to reduce the number of experts and to limit the number of operations.
The evaluation of different Evolutionary Algorithms has permitted observing how, in general, the optimization process works best. For the selected market in this work, the set of MOEAs has reached the best yield. Further adjustment of this one has resulted in a considerable increase in its ultimate performance. The tool generates different operational conditions for each expert (solution) depending on the degree of success obtained in the above range. This is very interesting; as an expert who generates a very poor profit or even losses, it is not eliminated, but the amount of operational risk can be reduced, even to zero. The decision to replace an expert is solely attributable to it being dominated by another. This behavior can limit the risk, locally and globally, for all transactions. This is one of the main objectives of any system of trading.
It is shown that the maximization of the number of transactions improves profits. The total cost of transactions increases, but the gain far outweighs this cost. Also, when performing many short operations, the costs associated with interests are reduced to almost zero. It is also noted that the system tends to obtain the benefits quickly. The evolutionary approach is very robust since all non-dominated solutions obtained from Pareto fronts are similar in quality. The experience acquired with fine-tuning the algorithm will be helpful with other indicators.
Future versions will include more indicators allowing the user the choice of the indicators they want to operate. The system should also incorporate more complex models of trading costs. It would be helpful to research new methods for estimating the profitability reached by the strategy and applying it to other indexes and markets. Finally, a complex risk management system could fit the profile of investors, providing estimations of potential profit increases assuming these risks.
We propose the use of a Pareto front that is fed by a set of MOEAs which provides a more extended Pareto set: This approach has a high potential of being succesfull in other optimization problems. However, there is a Need for Granular Insights into Collaborative Mechanisms**: It is worth noting that the paper could benefit from providing more granular insights into the mechanistic and algorithmic synergies at play during the collaborative application of MOEAs. Specifically, a more detailed exploration of how these algorithms collaborate to formulate the global Pareto Set, including the convergence processes and potential complexities or challenges that may arise from this collaborative interaction, would enhance the paper’s comprehensiveness. This would provide a deeper understanding of the inner workings of the proposed approach and shed light on potential areas for improvement or optimization.

Author Contributions

Conceptualization, F.J.S. and P.F.-B.; methodology, F.J.S., P.F.-B. and J.I.H.; software, F.J.S.; validation, F.J.S.; investigation, F.J.S.; writing—original draft preparation, F.J.S.; writing—review and editing, F.J.S., P.F.-B. and J.I.H.; visualization, F.J.S.; supervision, P.F.-B. and J.I.H. All authors have read and agreed to the published version of the manuscript.

Funding

J.I.H. acknowledges Spanish Government AEI grants PID2021-125549OB-I00 and PDC2022-133429-I00.

Data Availability Statement

Data available in https://gainfutures.com/ (accessed on 2 September 2023).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Bahcivan, H.; Dam, L.; Gonenc, H. New Avenues in Expected Returns: Investor Overreaction and Overnight Price Jumps in US Stock Markets. Available at SSRN 4335622. 2023. Available online: http://hulusibahcivan.com/wp-content/uploads/2022/12/Job_Market_Paper_Dec_2022-Hulusi-Bahcivan.pdf (accessed on 5 October 2023).
  2. Lohpetch, D.; Corne, D. Multiobjective algorithms for financial trading: Multiobjective out-trades single-objective. In Proceedings of the 2011 IEEE Congress of Evolutionary Computation (CEC), New Orleans, LA, USA, 5–8 June 2011; IEEE: Piscataway, NJ, USA, 2011; pp. 192–199. [Google Scholar]
  3. Lohpetch, D.; Corne, D. Discovering effective technical trading rules with genetic programming: Towards robustly outperforming buy-and-hold. In Proceedings of the 2009 World Congress on Nature & Biologically Inspired Computing (NaBIC), Coimbatore, India, 9–11 December 2009; IEEE: Piscataway, NJ, USA, 2009; pp. 439–444. [Google Scholar]
  4. Yang, B.; Liang, T.; Xiong, J.; Zhong, C. Deep reinforcement learning based on transformer and U-Net framework for stock trading. Knowl.-Based Syst. 2023, 262, 110211. [Google Scholar] [CrossRef]
  5. Yang, L.; Gao, T.; Lu, Y.; Duan, J.; Liu, T. Neural network stochastic differential equation models with applications to financial data forecasting. Appl. Math. Model. 2023, 115, 279–299. [Google Scholar] [CrossRef]
  6. Delcea, C.; Bradea, I.A. Millennial generation: Enthusiastic versus stressed consumers. How different is their behaviour and their opinion on companies’ image in online social networks? In Emerging Studies and Applications of Grey Systems; Springer: Berlin/Heidelberg, Germany, 2023; pp. 221–244. [Google Scholar]
  7. Tirumala, A.; Bhatnager, R.; Mudireddy, S.; Manjunath, P.; Zutty, J. Designing a novel and high performance algorithmic trading model using evolutionary AutoML and technical analysis. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, Boston, MA, USA, 9–13 July 2022; pp. 312–315. [Google Scholar]
  8. Chen, S.H. Genetic algorithms and genetic programming in computational finance: An overview of the book. In Genetic Algorithms and Genetic Programming in Computational Finance; Springer: Berlin/Heidelberg, Germany, 2002; pp. 1–26. [Google Scholar]
  9. Long, X.; Kampouridis, M.; Kanellopoulos, P. Genetic programming for combining directional changes indicators in international stock markets. In Proceedings of the International Conference on Parallel Problem Solving from Nature, Dortmund, Germany, 10–14 September 2022; Springer: Berlin/Heidelberg, Germany, 2022; pp. 33–47. [Google Scholar]
  10. Wahid, A.; Gao, X.; Andreae, P. Multi-objective clustering ensemble for high-dimensional data based on Strength Pareto Evolutionary Algorithm (SPEA-II). In Proceedings of the 2015 IEEE International Conference on Data Science and Advanced Analytics (DSAA), Paris, France, 19–21 October 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 1–9. [Google Scholar]
  11. Lohpetch, D.; Corne, D. Outperforming buy-and-hold with evolved technical trading rules: Daily, weekly and monthly trading. In Applications of Evolutionary Computation: EvoApplications 2010: EvoCOMNET, EvoENVIRONMENT, EvoFIN, EvoMUSART, and EvoTRANSLOG, Istanbul, Turkey, 7–9 April 2010, Proceedings, Part II; Springer: Berlin/Heidelberg, Germany, 2010; pp. 171–181. [Google Scholar]
  12. Bodas-Sagi, D.J.; Fernández, P.; Hidalgo, J.I.; Soltero, F.J.; Risco-Martín, J.L. Multiobjective optimization of technical market indicators. In Proceedings of the 11th Annual Conference Companion on Genetic and Evolutionary Computation Conference: Late Breaking Papers, New York, NY, USA, 8–12 July 2009; pp. 1999–2004. [Google Scholar]
  13. Fernández-Blanco, P.; Bodas-Sagi, D.J.; Soltero, F.J.; Hidalgo, J.I. Technical market indicators optimization using evolutionary algorithms. In Proceedings of the 10th Annual Conference Companion on Genetic and Evolutionary Computation, Atlanta, GA, USA, 12–16 July 2008; pp. 1851–1858. [Google Scholar]
  14. Deb, K.; Pratap, A.; Agarwal, S.; Meyarivan, T. A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Trans. Evol. Comput. 2002, 6, 182–197. [Google Scholar] [CrossRef]
  15. Zitzler, E.; Laumanns, M.; Thiele, L. SPEA2: Improving the strength Pareto evolutionary algorithm. TIK Rep. 2001, 103. [Google Scholar] [CrossRef]
  16. Knowles, J.; Corne, D. The pareto archived evolution strategy: A new baseline algorithm for pareto multiobjective optimisation. In Proceedings of the 1999 Congress on Evolutionary Computation-CEC99 (Cat. No. 99TH8406), Washington, DC, USA, 6–9 July 1999; IEEE: Piscataway, NJ, USA, 1999; Volume 1, pp. 98–105. [Google Scholar]
  17. Corne, D.W.; Knowles, J.D.; Oates, M.J. The Pareto envelope-based selection algorithm for multiobjective optimization. In Proceedings of the International Conference on Parallel Problem Solving from Nature, Paris, Prance, 18–20 September 2000; Springer: Berlin/Heidelberg, Germany, 2000; pp. 839–848. [Google Scholar]
  18. Nebro, A.J.; Durillo, J.J.; Luna, F.; Dorronsoro, B.; Alba, E. Mocell: A cellular genetic algorithm for multiobjective optimization. Int. J. Intell. Syst. 2009, 24, 726–746. [Google Scholar] [CrossRef]
  19. Corberán-Vallet, A.; Vercher, E.; Segura, J.V.; Bermúdez, J.D. A new approach to portfolio selection based on forecasting. Expert Syst. Appl. 2023, 215, 119370. [Google Scholar] [CrossRef]
  20. Jalota, H.; Mandal, P.K.; Thakur, M.; Mittal, G. A novel approach to incorporate investor’s preference in fuzzy multi-objective portfolio selection problem using credibility measure. Expert Syst. Appl. 2023, 212, 118583. [Google Scholar] [CrossRef]
  21. Zhou, Y.; Chen, W.; Lin, D. Design of optimum portfolio scheme based on improved NSGA-II algorithm. Comput. Intell. Neurosci. 2022, 2022, 7419500. [Google Scholar] [CrossRef] [PubMed]
  22. Schlottmann, F.; Mitschele, A.; Seese, D. A multiobjective model framework for the integrated management of financial risks. In Proceedings of the Quantitative Methods in Finance Conference, Sydney, Australia, 14–17 December 2005. [Google Scholar]
  23. Njegovanovic, A. The Importance of Quantum Information in the Stock Market and Financial Decision Making in Conditions of Radical Uncertainty. Int. J. Soc. Sci. Stud. 2023, 11, 54. [Google Scholar] [CrossRef]
  24. Zolfaghari, M.; Fadishei, H.; Tajgardan, M.; Khoshkangini, R. Stock Market Prediction Using Multi-Objective Optimization. In Proceedings of the 2022 12th International Conference on Computer and Knowledge Engineering (ICCKE), Mashhad, Iran, 17–18 November 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 253–262. [Google Scholar]
  25. Bitetto, A.; Cerchiello, P.; Mertzanis, C. On the efficient synthesis of short financial time series: A Dynamic Factor Model approach. Financ. Res. Lett. 2023, 53, 103678. [Google Scholar] [CrossRef]
  26. Nazareth, N.; Reddy, Y.Y.R. Financial applications of machine learning: A literature review. Expert Syst. Appl. 2023, 219, 119640. [Google Scholar] [CrossRef]
  27. Hilary, G.; McLean, D. Financial Decision Making: An Overview. In The Handbook of Financial Decision Making; Edward Elgar Publishing: Cheltenham, UK, 2023. [Google Scholar]
  28. Tsang, E.P.; Li, J.; Markose, S.; Er, H.; Salhi, A.; Iori, G. EDDIE in financial decision making. J. Manag. Econ. 2000, 4, 1–13. [Google Scholar]
  29. Trigkas, S.J. Assessing the Volume of Changes to Banking Assets and Liabilities Using Genetic Algorithms in Additional Funds Needed Model. KnE Soc. Sci. 2023, 8, 233–255. [Google Scholar] [CrossRef]
  30. Hassan, G.N.A. Multiobjective Genetic Programming for Financial Portfolio Management in Dynamic Environments. Ph.D. Thesis, University College London, London, UK, 2010. [Google Scholar]
  31. Salman, O.; Kampouridis, M.; Jarchi, D. Trading strategies optimization by genetic algorithm under the directional changes paradigm. In Proceedings of the 2022 IEEE Congress on Evolutionary Computation (CEC), Padua, Italy, 18–23 July 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 1–8. [Google Scholar]
  32. Chang, J.F.; Huang, Y.M. PSO based time series models applied in exchange rate forecasting for business performance management. Electron. Commer. Res. 2014, 14, 417–434. [Google Scholar] [CrossRef]
  33. He, C.; Zhang, Y.; Gong, D.; Ji, X. A review of surrogate-assisted evolutionary algorithms for expensive optimization problems. Expert Syst. Appl. 2023, 217, 119495. [Google Scholar] [CrossRef]
  34. Dhopavkar, G.M.; Takalikar, M. Stock Price Prediction Using Deep Learning Model. Math. Stat. Eng. Appl. 2022, 71, 7729–7738. [Google Scholar]
Figure 1. Overview of the investment process under both approaches, A and B. The Pareto front found on Day 1 is the initial population for optimization on the next day, and so on.
Figure 1. Overview of the investment process under both approaches, A and B. The Pareto front found on Day 1 is the initial population for optimization on the next day, and so on.
Applsci 13 12485 g001
Figure 2. MACD indicator parameters. Two lines (red and blue) are constructed by applying MACD to the original time series using the parameters, and when the lines cross each other, a signal for selling or buying is generated.
Figure 2. MACD indicator parameters. Two lines (red and blue) are constructed by applying MACD to the original time series using the parameters, and when the lines cross each other, a signal for selling or buying is generated.
Applsci 13 12485 g002
Figure 3. The Stochastic indicator also uses two parameters for generating signal lines (red and blue in the picture).
Figure 3. The Stochastic indicator also uses two parameters for generating signal lines (red and blue in the picture).
Applsci 13 12485 g003
Figure 4. System Architecture diagram.
Figure 4. System Architecture diagram.
Applsci 13 12485 g004
Figure 5. Total yield of the different approaches, in percentage, for Dataset 1.
Figure 5. Total yield of the different approaches, in percentage, for Dataset 1.
Applsci 13 12485 g005
Figure 6. Total yield of the different approaches, in percentage, for Dataset 2.
Figure 6. Total yield of the different approaches, in percentage, for Dataset 2.
Applsci 13 12485 g006
Figure 7. Total yield of the different approaches, in percentage, for Dataset 3.
Figure 7. Total yield of the different approaches, in percentage, for Dataset 3.
Applsci 13 12485 g007
Figure 8. The activity of the solutions found compared with those that perform some operation (Business Solutions) for Dataset 1.
Figure 8. The activity of the solutions found compared with those that perform some operation (Business Solutions) for Dataset 1.
Applsci 13 12485 g008
Figure 9. The activity of the solutions found compared with the solutions that perform some operation (Business Solutions) for the dataset 2.
Figure 9. The activity of the solutions found compared with the solutions that perform some operation (Business Solutions) for the dataset 2.
Applsci 13 12485 g009
Figure 10. The activity of the solutions found compared with the solutions that perform some operation (Business Solutions) for Dataset 3.
Figure 10. The activity of the solutions found compared with the solutions that perform some operation (Business Solutions) for Dataset 3.
Applsci 13 12485 g010
Figure 11. Summary of “Business Solutions” activity for the entire data set.
Figure 11. Summary of “Business Solutions” activity for the entire data set.
Applsci 13 12485 g011
Figure 12. Profit in pips for each operation performed for all data sets.
Figure 12. Profit in pips for each operation performed for all data sets.
Applsci 13 12485 g012
Figure 13. Performance of our method (Approach B) in comparison with the “Buy and Hold” strategy and individual approach (Approach A).
Figure 13. Performance of our method (Approach B) in comparison with the “Buy and Hold” strategy and individual approach (Approach A).
Applsci 13 12485 g013
Table 1. Datasets selected for experiments.
Table 1. Datasets selected for experiments.
SetIntervalAmount of DataTrends
14 January 2021–30 March 2021800,000Neutral
223 September 2022–29 December 2022660,000Bullish
322 March 2023–5 July 2023675,000Hybrid
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Soltero, F.J.; Fernández-Blanco, P.; Hidalgo, J.I. Collaborative Multiobjective Evolutionary Algorithms in the Search of Better Pareto Fronts: An Application to Trading Systems. Appl. Sci. 2023, 13, 12485. https://0-doi-org.brum.beds.ac.uk/10.3390/app132212485

AMA Style

Soltero FJ, Fernández-Blanco P, Hidalgo JI. Collaborative Multiobjective Evolutionary Algorithms in the Search of Better Pareto Fronts: An Application to Trading Systems. Applied Sciences. 2023; 13(22):12485. https://0-doi-org.brum.beds.ac.uk/10.3390/app132212485

Chicago/Turabian Style

Soltero, Francisco J., Pablo Fernández-Blanco, and J. Ignacio Hidalgo. 2023. "Collaborative Multiobjective Evolutionary Algorithms in the Search of Better Pareto Fronts: An Application to Trading Systems" Applied Sciences 13, no. 22: 12485. https://0-doi-org.brum.beds.ac.uk/10.3390/app132212485

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop