5 stars based on
To receive news and publication updates for Mathematical Problems in Engineering, enter your email address in the box below.
This is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. The crude oil futures market plays a critical role in energy finance. To gain greater investment return, scholars and traders use technical trading in oil futures and options pdf merge when selecting trading strategies in oil futures market.
In this paper, the authors used moving average prices of oil futures with genetic algorithms to generate profitable trading rules. We defined individuals with different combinations of period lengths and calculation methods as moving average trading rules trading in oil futures and options pdf merge used genetic algorithms to search for the suitable lengths of moving average periods and the appropriate calculation methods.
The authors used daily crude oil prices of NYMEX futures from to to evaluate and select moving average rules. We compared the generated trading rules with the buy-and-hold BH strategy to determine whether generated moving average trading rules can obtain excess returns in the crude oil futures market.
Through experiments, we determine that the generated trading rules help traders make profits when there are obvious price fluctuations. Generated trading rules can realize excess returns when price falls and experiences significant fluctuations, trading in oil futures and options pdf merge BH strategy is better when price increases or is smooth with few fluctuations.
The results can help traders choose better strategies in different circumstances. Energy is vital for economic development. Household activities, industrial production, and infrastructure investments all consume energy directly or indirectly, no matter in developing or developed countries [ 1 ]. Issues pertaining to energy trade [ 2 ], energy efficiency [ 3 ], energy policy [ 4 — 6 ], energy consumption [ 7 ], and energy finance [ 8 ] have received more importance in recent years.
Crude oil futures market is a crucial part of energy finance within the scope of the global energy market. Traders and researchers employ technical analysis tools to identify gainful trading rules in financial markets. Accordingly, moving average indicators are commonly used in technical analysis to actualize greater returns.
This paper attempts to answer whether in real life an investor can use moving average technical trading rules to obtain excess returns through searching for profitable moving trading in oil futures and options pdf merge trading rules with genetic algorithms in the crude oil futures market.
Genetic algorithms are widely used in social sciences [ 910 ], especially in certain complex issues where it is difficult to conduct precise calculations. It is a trend to apply physical or mathematical methods in energy and resource economics [ 11 — 16 ].
Researchers have applied genetic algorithms to the prediction of coal production-environmental pollution [ 17 ], the internal selection and market selection behavior in the market [ 18 ], the crude oil demand forecast [ 19 ], the minimization of fuel costs and gaseous emissions of electric power generation [ 20 ], and the Forex trading system [ 21 ].
With respect to the financial technical analysis issues, scholars use genetic algorithms to search best trading rules and profitable technical indicators when making investment decisions [ 22 — 25 ].
Genetic algorithms are combined with other tools such as the agent-based model [ 26 ], fuzzy math theory [ 27 ], and neural networks [ 28 ]. There are also some studies that have used genetic algorithms to forecast the price trends in the financial market [ 2930 ] or the exchange rate of the foreign exchange market [ 31 ].
As there are a vast number of technical trading rules and technical indicators available in the crude oil futures market, it is impractical to use ergodic calculations or certain other accurate calculation methods. Therefore, using genetic algorithms is a feasible way to resolve this issue. Moving average indicators have been widely used in studies of stocks and futures markets [ 32 — 37 ].
Two moving averages of different lengths are compared to forecast the price trends in different markets. Short moving averages are more sensitive to price changes than long ones. If a short moving average price is higher than a long period moving average price, traders will believe the price will rise and take long positions. When the short moving average price falls and crosses with the long one, opposite trading activities will be taken [ 38 ].
The moving average price was used as one of the many indicators of the technical rules. Other indicators, such as the mean value and maximum value, are also used when making investment decisions. William, comparing different technical rules and artificial neural network ANN rules regarding oil futures market, determined that the ANN is a good tool, thus casting doubt on the efficiency of the oil market [ 38 ].
All of these studies combine moving average indicators with other indicators to generate trading rules. However, in this paper, we utilize moving averages to generate trading rules, which may be a simple and efficient approach. The performance of a moving average trading rule is affected significantly by the period lengths [ 42 ].
Therefore, finding optimal lengths of the two periods above is a central issue in technical analysis literature. A variety of lengths have been tried in existing research projects [ 43 — 48 ]. In the existing research, most of moving average rules use fixed moving average period lengths and single moving average calculation method.
However, it is better to use variable lengths for different investment periods [ 4950 ] and trading in oil futures and options pdf merge are different types of moving average calculation method that can be used in technical analysis. In this paper, considering that the optimal length of the moving average trading in oil futures and options pdf merge and the best calculation method may vary from one occasion to another we use genetic algorithms to determine the suitable length of the moving average period and the appropriate method.
Six moving average calculation methods are considered in this paper and genetic algorithms can help us find out the best method and appropriate period trading in oil futures and options pdf merge for different circumstances. Accordingly, we are able to present the most suitable moving average trading rules for traders in the crude oil futures market. We use the daily prices of the crude oil future contract 1 for the period to from the New York Mercantile Exchange Data Source: We select 20 groups of sample data, each containing daily prices.
In the daily prices, a day price series is used to train trading rules in every generation. The following prices are used to select the best generated trading rule from all generations, and the last daily prices are used to determine whether the generated rule can acquire excess returns. The first group begins inthe last group ends inand each day price series with a step of is selected.
We must also include more daily prices before each sample series to calculate the moving prices for the sample period. Thus, every independent experiment requires a day price series. The data we use are presented in Figure 1. Moving average trading rules facilitate decision-making for traders by comparing two moving averages of different periods. In this way, traders can predict the price trend by analyzing the volatility of the moving average prices.
There are six moving average indictors usually used in technical analysis: The calculation methods of moving average indicators are presented in Table 1. To use a moving average trading rule in the oil futures market, at least three parameters must be set to establish a trading strategy.
These parameters include the lengths of two moving average periods and the choice of the moving average method from the above six types. Other researchers have used different lengths of sample periods in their studies. In this paper, we use genetic algorithms to determine appropriate lengths of the moving average period. According to existing literature, the long period is generally between 20 and days very few studies use periods longer than days [ 3839 ], and the short period is generally no longer than trading in oil futures and options pdf merge days.
If the long average price is lower than the short average price, a trader will take a long position. It follows that in opposite situations, opposite strategies will be adopted. Noting the price volatility in the futures market, taking a long position when the short average price exceeds the long average price by at least one standard deviation in the short period may be a good rule.
Conversely, taking a short position may also be a good rule. Therefore, we designed the two rules in our initial trading rules. The detailed calculation methods of the six moving averages are presented in Figure 2. In this paper, the range of to is 5 to The last binary determines whether to change trading strategies only when there is more than one standard deviation difference between two moving average prices.
The structure of trading rules is presented in Figure 2. The fitness of a trading rule is calculated according to the profit it can make in the crude oil futures market.
To compare generated trading rules with the BH buy-and-hold, taking the long position throughout the period strategy, the profit of a generated rule is the excess return rate that exceeds the BH strategy.
The difference is that we allow a trader to hold a position for a long time, and we do not calculate the return every day. Rf is the risk free return when out of market, and Rbh is the return rate of the BH strategy in the sample period. Rm is the margin ratio of the futures market. The parameter denotes the one-way transaction cost rate. As we ignore the amount of change in the everyday margin and the deadline of the contract, a trader can maintain his strategy by taking new positions when a contract nears its closing date.
The fitness value is a number between 0 and 2 calculated through nonlinear conversion according to Ra. The fitness value calculation, selection, crossover, and mutation of individuals are implemented using the GA toolbox of Sheffield in the Matlab platform. In every generation, to avoid the overfitting of training data, the best trading rule in every generation will be tested in a selection sample period the day price series.
In every generation, 90 percent of the population will be selected to form a new generation, while the other 10 percent will be randomly generated. Accordingly, the evolution of individuals using genetic algorithms in a single independent experiment can be summarized as follows.
Step 1 initialize population. Randomly create an initial population of 20 moving average trading rules. Step 2 evaluate individuals. The fitness of every individual is calculated in the evaluation step. The program calculates the moving average prices in two different scales during the training period using the auxiliary data and determines the positions on each trading day.
The excess return rate of every individual is then calculated. Finally, the fitness value of each individual is calculated according to the excess return rate. Step 3 remember the best trading rule. Select the rule with the highest fitness value and evaluate it for the selection period to obtain trading in oil futures and options pdf merge return rate. If it is better than or not inferior to the current best rule, it will be marked as the best trading rule.
If its return rate is lower than or less than 0. Step 4 generate new population. Selecting 18 individuals according to trading in oil futures and options pdf merge fitness values, the same individual could be selected more than once. Therefore, randomly create 2 additional trading rules. With a probability of 0. Accordingly, all the recombination rules trading in oil futures and options pdf merge be mutated with a probability of 0.
Return to Step 2 and repeat 50 times.