Next Article in Journal
Temperature Variations in Deep Thermal Well LZT-1 in Lądek-Zdrój (Bohemian Massif; SW Poland)—Evidence of Geothermal Anomaly and Paleoclimatic Changes
Next Article in Special Issue
Future Sensemaking Beyond Own Business Self-Interests: Insights from Offshore Wind Energy Innovation Ecosystems
Previous Article in Journal
Powering the Future: Advanced Battery Management Systems (BMS) for Electric Vehicles
Previous Article in Special Issue
Digitalization and Energy in Attaining Sustainable Development: Impact on Energy Consumption, Energy Structure, and Energy Intensity
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Modelling and Forecasting Crude Oil Prices Using Trend Analysis in a Binary-Temporal Representation

by
Michał Dominik Stasiak
1,* and
Żaneta Staszak
2
1
Department of Investment and Real Estate, Poznan University of Economics and Business, al. Niepodleglosci 10, 61-875 Poznan, Poland
2
The Faculty of Civil and Transport Engineering, Poznan University of Technology, 5 M. Skłodowska-Curie Square, 60-965 Poznan, Poland
*
Author to whom correspondence should be addressed.
Energies 2024, 17(14), 3361; https://doi.org/10.3390/en17143361
Submission received: 29 May 2024 / Revised: 5 July 2024 / Accepted: 6 July 2024 / Published: 9 July 2024
(This article belongs to the Special Issue Public Policies and Development of Renewable Energy 2023)

Abstract

:
The oil market is one of the most important markets for the global economy. Often, oil prices influence the financial results of whole countries and sectors. Therefore, the modeling and prediction of crude oil prices are of high importance. Most up-to-date publications have used daily closing rates in crude oil price modeling, not considering the variability in prices during the day. The application of this kind of price representation leads to a loss of information about the range of price changes during the day, which influences the accuracy of the models and makes them useless in short-term course predictions. In this paper, we introduce the concept of a new state model in a binary-temporal representation, which uses trend analysis, which is one of the main methods used in the prediction of the direction of future changes in the course trajectory. The model described in this paper stands as the first tool that allows for predicting course changes in a given range. The presented work also summarizes the research results of modeling crude oil prices from the last six years, which prove the effectiveness of the mentioned modeling method.

1. Introduction

Crude oil has a strategic meaning in the global economy and politics. It is the most important resource for the chemical industry and transport. It is necessary for the production of synthetic materials [1]. Current oil prices influence all, land, sea, and air transport [2]. Changes in oil rates also have direct repercussions on whole sectors of global economies, such as machine and vehicle operating costs, from the very moment of their construction up to their final utilization.
The proper analysis of the range and direction of future changes in prices is crucial for managers, especially in the moment of making operational decisions, such as buying materials, setting the production loads, or choosing means of transport. Those decisions, backed by good analysis and justified conclusions, allow for lowering operational costs, maximizing revenues, and increasing competitive advantage. The prediction of crude oil prices has also a significant meaning for the financial market, which offers derivatives, used, among others, by private and public organizations in securing investments against adverse course fluctuations. The proper prediction of crude oil prices has, therefore, a crucial meaning for guaranteeing the stability and sustainable development of whole sectors of the economy [3,4].
The topic of the modeling and prediction of oil prices has repeatedly been analyzed [5,6,7,8,9,10,11,12,13,14]. The price of oil is dependent on many types of factors, both technical (e.g., the mining level) and political (e.g., political tensions in countries that extract and export oil, such as the attacks and destabilization of the political situation in Iraq, the Russian invasion of Ukraine [15,16], and so on). Due to these reasons, the effective prediction of course changes is a rather complicated problem.
Most of the analyses have focused on the modeling and prediction of long-term changes, using daily closing rates [5,6,7,12,13,14]. This kind of approach leads to a possible decrease in the quality of modeling, which comes from the disregard of the dynamics of changes during the day, which could influence the behavior of investors in the ensuing days. The presented methods, therefore, should not be applied to the prediction of future price trajectories for short-term, in-day changes. Another restriction found in most of the published models is the lack of range assessment for the analyzed price changes. Authors have often verified the described models by applying them to data with a long-term horizon, assessing the increase or decrease in the prices without a prior definition of fixed levels, for which the given prediction can be regarded as completely justified.
Modeling short-term changes has significant practical importance [10,11]. The price of crude oil is the basis for many popular financial instruments. Contracts for difference (CFDs) on oil are becoming exceptionally popular among investors. These are leveraged derivative instruments that allow for easily making numerous, often short-term transactions, where the duration is measured in hours or even minutes. Therefore, there is a high demand for tools that enable the modeling of these smaller price changes for this commodity.
This article presents a proposal for a new state model, in which, for the first time, trend identification methods in a binary-temporal representation are used to predict the direction of changes within a specified range. The change range can be set freely, so the modeled changes can be arbitrarily small, lasting only hours or even minutes. The modeling method presented in this article fills the gap between short-term and long-term price modeling research, presenting a practical tool that satisfies the prediction requirements of both.
This paper is organized as follows: After a short introduction, the second section describes the construction of a binary-temporal representation, its advantages, and its properties. The third section is dedicated to the very idea of state modeling. In the fourth section, we introduce the rules for identifying trends and their parameters in a binary-temporal representation. Also, the binary-trend state model is presented in detail. The fifth section shows the modeling results for crude oil rates from the last three years, using the proposed model. Section 6 presents an example of using the proposed model to build an algorithmic trading system and analyzes the obtained results. In Section 7, we summarize the research results.

2. Binary-Temporal Representation

The results of the analysis of a given resource depend both on the modeling method used and the chosen means of formatting the historical quotations. Many researchers and analysts use candlestick chart representation, in which the course for a given period (the so-called “timeframe”) is represented by four parameters: the maximal and minimal prices and the opening and closing prices [17]; alternatively, the candlestick representation can be further reduced to only taking into account the closing price [18,19]. In the case of crude oil, research is most often based on daily closing prices [5,6,7]. This kind of data formatting can lead to a loss of information about the price changes during the day. Due to the different frequencies and ranges of course changes, the level of the loss in the informative value of the candlestick representation (or its reduced version) is undefined and variable in time. Therefore, research performed on this kind of data cannot be applied in case of price changes in a small range. The mentioned consequences of using candlestick representation in research and practice can be found in [20].
To guarantee optimal results of modeling, one can consider using the so-called tick data, the most precise kind of data, where all changes in the course trajectory are registered, even the smallest ones. Yet, the problem lies in the noisy characteristic of the tick data, where many small changes in the random characteristic are registered [19,21,22]. This fact makes the direct application of tick data inadequate, disturbing the modeling process due to encompassing noise. Also, tick data are often heavy in size, exceeding dozens of GB and disqualifying many models. As a consequence, adequate research needs a data-formatting method that allows for retaining significant information for the modeling process, filtering the noise at the same time. One of the methods satisfying both of these requirements is a binary-temporal representation [20,22].
The idea of constructing a binary-temporal representation was inspired by the point-symbolic visual method of course modeling [23], which, despite its many advantages, was completely replaced by the candlestick representation method. A binary-temporal representation assumes that the course is represented by sequences of changes, given in the form of a series of pairs, where the first element is the binary value. The value assigns each i-th change in the course trajectory value ε i = 1 for an increase in the price and ε i = 0 for a decrease in a given range, i.e., the so-called discretization unit δ. The second element is the duration of the i-th change, t i , given in seconds. We assume that each ensuing change is registered regarding the end of the previous one. The course in the form of tick data in a binary-temporal representation is, therefore, transformed into a series E , consisting of N observed changes:
E B T = ε i , t i i = 1 N .
Figure 1 presents an example of the conversion of tick data into a binary-temporal representation for the crude oil course trajectory for the appointed discretization unit of 10 pips (the discretization unit is given in pips; in the case of crude oil prices given in USD, 1 pip equals the change in the barrel price by USD 0.01).
As we can see, the binary-temporal representation allows for noise filtration while retaining the precision provided by the appointed discretization unit. Each change bigger than the set discretization unit is registered.
The binary-temporal representation, due to its construction, can be effectively used to build prediction models [22,24,25]. In most works, the presented models and methods allow for the assessment of the direction of future changes in the price trajectory without mentioning the values for which the prediction can be considered justified. This kind of approach reduces the possibilities for the practical application of these kinds of models and their results. In the case of using a binary-temporal representation, the definition of the probability of the direction of the next change in course equals the probability of registering the change in course that is bigger than the given discretization unit, with a simultaneous lack of change in the opposite direction that also exceeds the discretization unit. The basic method for constructing predictive models, based on a binary-temporal representation, is the state modeling method, which will be described in the next section.

3. State Modeling of Binary-Temporal Representation

3.1. State Modeling

In state modeling, the price course is considered a process of transitions between defined market states. State modeling is based on the fundamental assumption of the technical analysis that says that the market participants make decisions according to a set of fixed, statistically repetitive, schematic behaviors. This assumption has been proven many times in market research, e.g., [26], as well as in psychological research about investors’ behavior, e.g., [27]. The behavioral schemas in state modeling represent statistically more often-occurring transitions between precisely defined states.
In the price trajectory modeling in a binary-temporal representation, the market states are defined as given m-element binary sequences, represented by previous course changes and additional information about the current course, such as the duration of changes, the type of current trend, etc. The general structure of the state can, therefore, be written as follows:
S = ε 1 , , ε m ; f n A     , , f k A A   ; ; f 1 Z     , , f k Z Z     ,
The first element is a sequence of m-binary changes (corresponding to the most recent binary changes in the binary-temporal representation). The state model can be supplemented with additional functions (upper index), which can be determined for a varying number of historical changes (lower index). The states in the model are defined in such a way that the market can be unambiguously assigned to a given state after each change in the binary-temporal representation. Therefore, the set of function values f must be finite. The exact definition of states depends on the adopted state model.
For each state model, a transition graph between states can be determined, which depicts the market in the considered model. This graph is constructed as follows: vertices are represented by given market states, while edges represent possible transitions between the states. Based on the analysis of historical data, the edges of the graphs can be weighted with frequency values. These values can be interpreted as estimators of the transition probabilities between states. Consequently, based on the analysis of the graph and historical data of the considered instrument, it is possible to approximate the probability distribution of future changes for each state in the binary-temporal representation.

3.2. State Model of Binary Representation

Let us consider the first and simplest state model, the so-called state model of a binary representation (SMBR) [22]. The state model is defined only by m historical changes in the price trajectory, given in a binary-temporal representation:
S S M B R m = ε 1 , , ε m .
The overall number of states in the SMBR model is, therefore, given by the following equation:
k S M B R m = 2 m .
The parametrized model can be written in the SMBR(δ, m) notation. Let us consider now the model SMBR(100, 3). This model, according to (4), consists of the following eight states: {0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0, 1, 1}, {1, 0, 0}, {1, 0, 1}, {1, 1, 0}, and {1, 1, 1}. If the last three registered changes in course rates were two increases and one drop in price in the range of one discretization unit (( ε i 2 = 1 ; ε i 1 = 1 ; ε i = 0 ), where i describes the next change in course in the binary-temporal representation, then the market is currently in state {1, 1, 0}. In the case where the next registered change will be a drop in price ( ε i + 1 = 0 )), then the market will transition into state {1, 0, 0}. A graph of the SMBR(100, 3) model is given in Figure 2.
Based on the analysis of the historical data of a given financial instrument, the graph edges of each state model can be assigned the frequencies of transitions between states:
P S i S j = n S i S j n S i ,
where n S i is the number of returns to the state S i , and n S i S j is the number of transitions from the state S i to the state S j in the time window of the historical data being analyzed. This way, we can construct a weighted graph that corresponds to the process of market transitions at the time of observation. The transition frequencies can be interpreted as the estimators of transition probabilities. Based on their analysis, we can appoint further estimators of the probability of an increase or decrease in price for a given market state.
The SMBR model is the simplest one and is treated as a reference model in the case of analyzing more complex systems since it encompasses only the analysis of the last m changes. This set of changes is a common element of all considered models. Therefore, the differences between the accuracy of SMBR and more complex models justify the construction of this kind of model.

4. State Modeling with Use of Trend Analysis

4.1. Trend Analysis in Binary-Temporal Representation

The term “trend” is not precisely defined in the field of economy. At the same time, one price trajectory can be classified as an increasing, decreasing, or horizontal trend, depending on the subjective visual assessment of the analyst or used tools, e.g., RSI indicators. Let us consider the detection of trends in a binary-temporal representation. For this kind of representation, the following trend definitions are proposed [28]:
  • An increasing trend is detected when in the ensuing T N changes in the binary-temporal representation, there occurs an increase of at least the T M (where the T M is the multiplicity of δ);
  • A decreasing trend is detected when in the ensuing T N changes in the binary-temporal representation, there occurs a decrease of at least the T M (where the T M is the multiplicity of δ);
  • A horizontal trend is detected when in the ensuing T N changes in the binary-temporal representation, the occurring increase or decrease is smaller than the T M .
The proposed definition allows for an unequivocal identification of the trend for each i-th change ( T i k ). We will use the notation where T i k = 1 for an increasing trend, T i k = 1 for a decreasing trend, and T i k = 0 for a horizontal one.
A trend in a binary-temporal representation, in the moment of the i-th change, can be described by two parameters: the duration T i t and the range T i r   of the trend. The duration of the trend is the time given in seconds, calculated from the moment of the identification of the given trend up to now. The range T i r expresses the maximal increase in the case of an increasing trend and the maximal decrease in the case of a decreasing trend, registered from the beginning of the trend. The range in the case of a horizontal trend is not taken into account; we assume it equals 0. The trend classification and its parameters are dependent only on the assumed values of parameters T N and T M .

4.2. State Model of Trend Analysis

Let us consider the construction of a state model that uses the information about the trend, so an SMBT model (state model of the binary trend). The very concept of this model assumes the influences of the type of the current trend and its parameters on the probability distribution of the direction of the next change in the price trajectory. The model implements the binary-temporal representation and the trend parameters appointed based on the definition given in 4.1. In further considerations, the model will be described as SMBT(δ, m, T N , T M , τ, ζ), where m is analogous to the one in the SMBR model [22] and describes the number of ensuing course changes in the binary-temporal representation, T N and T M are trend identification parameters, and τ and ζ are thresholds, used in the analysis of the trend duration and range.
The state in the SMBT model is defined as follows:
S S M B T m , T N , T M , τ , ζ , = ε 1 , .   , ε m ; f 1 k T N , T M ; f 1 p a r T N , T M , τ , ζ ,
where the function f i k T N , T M returns the current type of trend for the i-th change, according to the definitions given in Section 4.1:
f i k T N , T M = T i k ,
The threshold function f i p a r T N , T M , τ , ζ is defined for an increasing or decreasing trend, as follows:
f i p a r T N , T M , τ , ζ = 1     i f   T i t τ   a n d   T i r ζ , 0     i f   T i t > τ    o r     T i r > ζ .  
In the case of a horizontal trend ( f t t i = 0 ), the trend range is not analyzed:
f i p a r T N , T M , τ , ζ = 1     i f   T i t τ   , 0     i f   T i t > τ .  
The goal of the function f i p a r is to describe the relations between the state definition and the duration and range of the last change, while simultaneously limiting the number of possible model states. Introducing threshold analysis allows assigning a single binary value characterizing the trend parameters: the duration (longer/shorter than τ) and the trend range (longer/shorter than ζ).
The overall number of states in the SMBT( δ , m , T M , T N , τ , ζ ) model is described by the product of the number of all m-element permutations with repetitions from the 2-element set {0, 1}, 1-element permutations with repetitions from the 3-element set {−1, 0, 1}, and 1-element permutations from the 2-element set {0, 1}:
k S M B T m = 2 m 3 2 .
Let us now consider the performance of a model with parameters m = 1; T M = 10; T N = 6; τ = 600 ; and ζ = 4 . For example, let us say that in the i-th change, the course increased ( ε i = 1 ) and the market is now in an increasing trend ( f i k T N , T M = 1 ). Since T i r = 300 and the duration is T i t = 3 , f i p a r T N , T M , τ , ζ = 1 , and the market is currently in the state S i = {1; 1; 1}. If the next course change is an increase ( ε i + 1 = 1 in time t i + 1 = 500 ), then the trend will continue increasing f i + 1 k T N , T M = 1 , and its range is currently T i + 1 r = 4 (higher than a given threshold ζ ), and the duration of the trend is T i + 1 t = 800 (higher than the assumed threshold τ ), so f i + 1 p a r T N , T M , τ , ζ = 0 . This means that the market will transition into the state S i + 1 = {0; 1; 0}.
In Figure 3, we can see an example of the transition graph for the considered model SMBT( δ , m , T M , T N , τ , ζ ) (the transition frequencies are omitted for clarity).
Based on the frequency analysis we can—as in every state model [22,25]—indicate the probability distribution of the direction of the next change in the course for each of the model states.

5. Modeling of Crude Oil Rates with Use of SMBT Model

Let us consider a crude oil rates analysis in USD for the 3 years from 1 January 2018 to 31 December 2021. Tick data were taken from the Ducascopy broker. Because we consider modeling the changes in the price trajectory during the day, in this research, we appointed the discretization unit of 100 pips (the change in the barrel price of USD 1, which typically stands at 1.2% of the price). In the researched period, this kind of change occurred, on average, every 34,972 s, so every 9 h 42 min.
Before proceeding with the modeling, the effectiveness of the binary-temporal representation obtained was examined. According to the Fama hypothesis, efficient markets are characterized by the independence of changes; the consequence of assuming this hypothesis is a lack of prediction possibility for the future movements of prices based on historical data, which precludes the application of any predictive methods [29]. To investigate the effectiveness of crude oil quotations in a binary-temporal representation, statistical testing (the statistical test recommended by NIST) was used. The testing method was described in detail in [30]. This study rejected the hypothesis of independence of changes, which justifies the use of state modeling described in this article.
In the first part of this research, we used the SMBR(100, 3) model, i.e., we researched the influence of the three last changes on the probability distribution of the direction of the next change in the price trajectory, for the discretization unit of 100 pips. The results are shown in Table 1. One can note that this kind of basic analysis allows for indicating the direction of the future change in price with a probability of around 57% for selected states.
In the second part of this research, we used the previously described trend model SMBT(100, 3, 10, 2, 0, 0). So, a sequence of 3 ensuing changes was used in the modeling process (m = 3), and we assumed that the trend was identified based on the parameters of T N = 10 and T M = 2 . The modeling results are presented in Table 2. These results prove that the analysis of the trend type has a significant influence on the prediction of the direction of the future price change. This kind of analysis allows for selecting states that are characterized by a probability equal to even 0.75 (the probability of an increase for the state {(0,0,0);1}). For most states, one can assess a probability of around 0.55.
In the final part of this research, we applied the SMBT(100, 3, 10, 2, 72,000, 2) model, i.e., we appointed a threshold of 20 h for the duration of the trend and a range equal to 2 changes. The results of the modeling are shown in Table 3. One can note that the considered model allows for detecting states characterized by a probability of even higher than 0.8.
In the case of the SMBT(100, 3, 10, 2, 0, 0) model, only one of the states is characterized by the probability of a given direction that is higher than 0.7, and it occurs 12 times. After taking into consideration the trend parameters (model SMBT(100, 3, 10, 2, 72,000, 2)), 4 states are characterized by the probability of a given direction of a change higher than 0.7, and they occur 60 times during the analysis. The research results show that the threshold analysis of trend parameters is of significant meaning, and, in consequence, models encompassing this trend analysis are characterized by results that indicate the possibility of practical application. In the next section, the authors will verify the obtained results in the ensuing quotations (1 January 2021–1 January 2024). The model verification can be performed in several ways, e.g., [31,32]. The authors decided to present the practical application of the model in the form of an algorithmic trade system, along with an analysis of its effectiveness [30].

6. Practical Application and Verification of SMBT Model

The binary-trend state model can have various applications. Due to the use of a binary-temporal representation, the modeling results can be easily implemented in algorithmic trading systems using CFD contracts on oil. In such a system, each change in the binary-temporal representation can be equated with making a buy or sell transaction. If the probability distribution of future changes for a given state, obtained in the modeling process, indicates a more likely future increase (1), a BUY transaction is made; if a decrease occurs (0), a SELL transaction is made. To filter out states characterized by low predictive quality, it is possible to specify conditions under which a state is considered decisive (only upon its occurrence is a transaction made). A detailed description of algorithmic trading systems based on a binary-temporal representation can be found in the works [24,25].
Let us consider the use of the distributions obtained in Section 4 based on the analysis of oil prices from the period 1 January 2018 to 31 December 2020 (Table 3) for constructing a simple algorithmic trading system. We assumed that all states indicating the direction of changes with an accuracy above 60% are considered decisive. Figure 4 shows the backtest results obtained in the period of 1 January 2021–1 January 2024. The backtest was conducted assuming that the investor has a capital of USD 100,000, and all transactions made have a size of 1 Lot. Additionally, it was assumed that the broker offers a fixed spread of 2 pips.
As a result of the backtest, we obtained an average annual return rate of 12.6%. When analyzing the backtest results, one can conclude that the return rate increase is constant (trade lines). To assess the financial efficiency (the ratio of profits to risk), one of the most popular indicators used to evaluate algorithmic trading systems was used: the Calmar ratio (defined as the ratio of the annualized excess return and maximum drawdown) [33,34,35]. For the conducted backtest, the Calmar ratio is equal to 0.8. Let us now consider a comparison with a popular investing strategy on the crude oil market, i.e., “buy and hold” [14]. Figure 5 shows the backtest results obtained in the period of 1 January 2021–1 January 2024.
This strategy, in the analyzed period, is characterized by a Calmar coefficient of 0.12. This means that it has a lower financial effectiveness than the strategy presented in this paper. Based on the analysis of the performed backtest, we can conclude that the results obtained from the modeling method presented in this article can be used in constructing algorithmic trading systems on the crude oil market, which are characterized by positive returns in the long term. It should be noted that the presented example assumes the use of the parameter set adopted in Section 3. Depending on the investor’s preferences (risk tolerance, the required minimum number of transactions, etc. [33,36]), it is possible to select an optimal parameter set for financial efficiency for a given investor.
It should be noted that the method presented in this article can be successfully used both for building algorithmic trading systems (HFT systems using small discretization unit values) and for evaluating changes over a longer range, e.g., for business analysis purposes in a company using relatively large discretization unit values.

7. Conclusions

This paper was dedicated to modeling crude oil prices. To do so, the authors introduced the assumptions of a new state model, using one of the most popular methods of technical analysis: trend analysis. The model implements a binary-temporal representation, for which an unequivocal method of trend detection and parametrization was introduced, with the parameters being duration and range. The results of this kind of modeling are given as a probability distribution for the direction of the next change in the course trajectory.
The SMBT model, contrary to most prediction models, allows for predicting the direction of a future change in price quotations for a given range, with the most emphasis placed on modeling changes in a small range (i.e., a duration given in hours). To assess the effectiveness and present the practical possibilities of the model, this article presented an example of constructing an algorithmic trading system in the oil market, which achieved an average annual return of 12.6%.
This research proved that state modeling in a binary-temporal representation, based on trend analysis, allows for the effective prediction of the direction of the next change in the price trajectory of crude oil rates. The performed analysis showed that the accuracy of modeling depends on both the type of trend and its parameters: duration and range. The trend model in the binary-temporal representation can, therefore, be used for the crude oil market as a tool to analyze and predict changes in a given range.
The presented model is general and can be universally applied to the analysis of quotations of resources other than crude oil or different financial instruments. It can also be used in companies specializing in assessing the life of a product and in companies specializing in the production, exploitation, and utilization of machines and appliances to optimize the product price.

Author Contributions

Conceptualization: M.D.S.; methodology: M.D.S.; visualization: Ż.S.; software: M.D.S. and Ż.S.; formal analysis: M.D.S. and Ż.S.; writing—review and editing: Ż.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Perfumo, A.; Rancich, I.; Banat, I.M. Possibilities and challenges for biosurfactants use in the petroleum industry. In Biosurfactants; Springer: New York, NY, USA, 2010; pp. 135–145. [Google Scholar]
  2. Ederington, L.H.; Fernando, C.S.; Lee, T.K.; Linn, S.C.; Zhang, H. The relation between petroleum product prices and crude oil prices. Energy Econ. 2021, 94, 105079. [Google Scholar] [CrossRef]
  3. Hubbard, R.G. Capital-Market Imperfections and Investment. J. Econ. Lit. 1998, 36, 193–225. [Google Scholar]
  4. Ekmekcioglu, E. The macroeconomic effects of world crude oil price changes. Int. J. Bus. Soc. Sci. 2012, 3, 268–272. [Google Scholar]
  5. Moreno, P.; Figuerola-Ferretti, I.; Muñoz, A. Forecasting Oil Prices with Non-Linear Dynamic Regression Modeling. Energies 2024, 17, 2182. [Google Scholar] [CrossRef]
  6. Salamai, A.A. Deep learning framework for predictive modelling of crude oil price for sustainable management in oil markets. Expert Syst. Appl. 2023, 211, 118658. [Google Scholar] [CrossRef]
  7. Wang, J.; Niu, T.; Du, P.; Yang, W. Ensemble probabilistic prediction approach for modelling uncertainty in crude oil price. Appl. Soft Comput. 2020, 95, 106509. [Google Scholar] [CrossRef]
  8. Wen, Z.; Gong, X.; Ma, D.; Xu, Y. Intraday momentum and return predictability: Evidence from the crude oil market. Econ. Model. 2021, 95, 374–384. [Google Scholar] [CrossRef]
  9. Ji, Q.; Zhang, D.; Zhao, Y. Intra-day co-movements of crude oil futures: China and the international benchmarks. Ann. Oper. Res. 2022, 313, 77–103. [Google Scholar] [CrossRef]
  10. Degiannakis, S.; Filis, G. Forecasting oil prices: High-frequency financial data are indeed useful. Energy Econ. 2018, 76, 388–402. [Google Scholar] [CrossRef]
  11. Filippidis, M.; Filis, G.; Magkonis, G. Evaluating oil price forecasts: A meta-analysis. Energy J. 2024, 45, 49–67. [Google Scholar] [CrossRef]
  12. Li, T.; Qian, Z.; Deng, W.; Zhang, D.; Lu, H.; Wang, S. Forecasting crude oil prices based on variational mode decomposition and random sparse Bayesian learning. Appl. Soft Comput. 2021, 113, 108032. [Google Scholar] [CrossRef]
  13. Duan, H.; Liu, Y.; Wang, G. A novel dynamic time-delay grey model of energy prices and its application in crude oil price forecasting. Energy 2022, 251, 123968. [Google Scholar] [CrossRef]
  14. Dbouk, W.; Jamali, I. Predicting daily oil prices: Linear and non-linear models. Res. Int. Bus. Financ. 2018, 46, 149–165. [Google Scholar] [CrossRef]
  15. Ozili, P.K. Global economic consequences of Russian invasion of Ukraine. In Dealing with Regional Conflicts of Global Importance; IGI Global: Hershey, PA, USA, 2024; pp. 195–223. [Google Scholar]
  16. Liao, S.; Wang, F.; Wu, T.; Pan, W. Crude oil price decision under considering emergency and release of strategic petroleum reserves. Energy 2016, 102, 436–443. [Google Scholar] [CrossRef]
  17. Schlossberg, B. Technical Analysis of the Currency Market: Classic Techniques for Profiting from Market Swings and Trader Sentiment; John Wiley & Sons: Hoboken, NJ, USA, 2006. [Google Scholar]
  18. Kirkpatrick, C.D.; Dahlquist, J.R. Technical Analysis: The Complete Resource for Financial Market Technicians; FT Press: Upper Saddle River, NJ, USA, 2010. [Google Scholar]
  19. Lim, M.A. The Handbook of Technical Analysis+ Test Bank: The Practitioner’s Comprehensive Guide to Technical Analysis; John Wiley & Sons: Hoboken, NJ, USA, 2015. [Google Scholar]
  20. Stasiak, M.D. Candlestick—The main mistake of economy research in high-frequency markets. Int. J. Financ. Stud. 2020, 8, 59. [Google Scholar] [CrossRef]
  21. Sandubete, J.E.; Escot, L. Chaotic signals inside some tick-by-tick financial time series. Chaos. Solitons Fractals 2020, 137, 109852. [Google Scholar] [CrossRef]
  22. Stasiak, M.D. A study on the influence of the discretisation unit on the effectiveness of modelling currency exchange rates using the binary-temporal representation. Oper. Res. Decis. 2018, 28, 57–70. [Google Scholar]
  23. De Villiers, V. The Point and Figure Method of Anticipating Stock Price Movements Complete Theory & Practice; A Reprint of the 1933 Edition including a chart on the 1929 crash; Windsor Books: New York, NY, USA, 1933. [Google Scholar]
  24. Piasecki, K.; Stasiak, M.D. Optimization Parameters of Trading System with Constant Modulus of Unit Return. Mathematics 2020, 8, 1384. [Google Scholar] [CrossRef]
  25. Stasiak, M.D. Algoritmic Trading System Based on State Model for Moving Average in a Binary-Temporal Representation. Risks 2022, 10, 69. [Google Scholar] [CrossRef]
  26. Al Fawzan, F.A.A. Volatility and efficiency of the world crude oil market. J. Econ. Adm. Sci. 2015, 31, 20–29. [Google Scholar] [CrossRef]
  27. Oberlechner, T. The Psychology of the Foreign Exchange Market; John Wiley & Sons: New York, NY, USA, 2005. [Google Scholar]
  28. Stasiak, M.D. Trend analysis with use of binary representation. In Proceedings of the 37th International Conference Mathematical Methods in Economics MME 2019: Conference Proceedings, České Budějovice, Czech Republic, 11–13 September 2019; University of South Bohemia: České Budějovice, Czech Republic, 2019; pp. 529–535. [Google Scholar]
  29. Fama, E. Efficient capital markets: A review of theory and empirical work. J. Financ. 1970, 25, 383–417. [Google Scholar] [CrossRef]
  30. Piasecki, K.; Stasiak, M. Verification of the Precious Metals Market Effectiveness—Gold and Silver. In Proceedings of the International Scientific Conference Hradec Economic Days, Hradec Králové, Czech Republic, 2–3 April 2020. [Google Scholar]
  31. Pesaran, M.H.; Timmermann, A. A simple nonparametric test of predictive performance. J. Bus. Econ. Stat. 1992, 10, 461–465. [Google Scholar] [CrossRef]
  32. Anatolyev, S.; Gerko, A. A trading approach to testing for predictability. J. Bus. Econ. Stat. 2005, 23, 455–461. [Google Scholar] [CrossRef]
  33. Aldridge, I. High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems; John Wiley & Sons: Hoboken, NJ, USA, 2013. [Google Scholar]
  34. Young, T.W. Calmar ratio: A smoother tool. Futures 1991, 20, 40. [Google Scholar]
  35. Nystrup, P.; Boyd, S.; Lindström, E.; Madsen, H. Multi-period portfolio selection with drawdown control. Ann. Oper. Res. 2019, 282, 245–271. [Google Scholar] [CrossRef]
  36. Pardo, R. The Evaluation and Optimization of Trading Strategies; John Wiley & Sons: Hoboken, NJ, USA, 2011. [Google Scholar]
Figure 1. An example of tick data’s conversion into a binary-temporal representation for the crude oil course for δ = 10 pips. Source: authors.
Figure 1. An example of tick data’s conversion into a binary-temporal representation for the crude oil course for δ = 10 pips. Source: authors.
Energies 17 03361 g001
Figure 2. Graph of transition process for market states in SMBR(100, 3) model. Source: authors.
Figure 2. Graph of transition process for market states in SMBR(100, 3) model. Source: authors.
Energies 17 03361 g002
Figure 3. Graph of change process for model SMBT(100, 1, 10, 6, 600, 4). Source: authors.
Figure 3. Graph of change process for model SMBT(100, 1, 10, 6, 600, 4). Source: authors.
Energies 17 03361 g003
Figure 4. Backtest results (with trend line) of the algorithmic trading system using the trend model during the period 1 January 2021–1 January 2024. Source: authors.
Figure 4. Backtest results (with trend line) of the algorithmic trading system using the trend model during the period 1 January 2021–1 January 2024. Source: authors.
Energies 17 03361 g004
Figure 5. Backtest results (with trend line) of “buy and hold” during the period of 1 January 2021–1 January 2024. Source: authors.
Figure 5. Backtest results (with trend line) of “buy and hold” during the period of 1 January 2021–1 January 2024. Source: authors.
Energies 17 03361 g005
Table 1. Probability distribution of direction of future change in price trajectory for model SMBR (100, 3).
Table 1. Probability distribution of direction of future change in price trajectory for model SMBR (100, 3).
StateProb. of IncreaseProb. of DecreaseOccurrences
{0, 0, 0}0.512990.48701154
{0, 0, 1}0.490200.50980153
{0, 1, 0}0.510790.48921139
{0, 1, 1}0.421380.57862159
{1, 0, 0}0.496730.50327153
{1, 0, 1}0.565510.43448145
{1, 1, 0}0.465410.53459159
{1, 1, 1}0.492310.50769130
Table 2. Probability distributions of direction of next change in price for model SMBT(100, 3, 10, 2, 0, 0).
Table 2. Probability distributions of direction of next change in price for model SMBT(100, 3, 10, 2, 0, 0).
StateProb. of IncreaseProb. of DecreaseOccurrences
{(0, 0, 0); 0}0.526320.4736819
{(0, 0, 0); −1}0.480320.51969127
{(0, 0, 0); 1}0.750000.2500012
{(0, 0, 1); 0}0.589740.4102639
{(0, 0, 1); −1}0.432430.5675774
{(0, 0, 1); 1}0.500000.5000036
{(0, 1, 0); 0}0.488890.5111145
{(0, 1, 0); −1}0.469700.5303066
{(0, 1, 0); 1}0.642860.3571428
{(0, 1, 1); 0}0.425530.5744747
{(0, 1, 1); −1}0.379310.6206929
{(0, 1, 1); 1}0.433740.5662783
{(1, 0, 0); 0}0.510640.4893647
{(1, 0, 0); −1}0.459460.5405474
{(1, 0, 0); 1}0.562500.4375032
{(1, 0, 1); 0}0.611110.3888936
{(1, 0, 1); −1}0.600000.4000035
{(1, 0, 1); 1}0.554050.4459574
{(1, 1, 0); 0}0.479170.5208348
{(1, 1, 0); −1}0.527780.4722236
{(1, 1, 0); 1}0.426670.5733375
{(1, 1, 1); 0}0.333330.6666718
{(1, 1, 1); −1}0.600000.4000010
{(1, 1, 1); 1}0.519610.48039102
Table 3. Probability distributions of directions of next change in courses for model state SMBT (100, 3, 10, 2, 72,000, 2).
Table 3. Probability distributions of directions of next change in courses for model state SMBT (100, 3, 10, 2, 72,000, 2).
StateProb. of IncreaseProb. of DecreaseOccurrences
{(0, 0, 0); 0; 0}0.400000.6000010
{(0, 0, 0); 0; 1}0.666670.333339
{(0, 0, 0); −1; 0}0.500000.5000044
{(0, 0, 0); −1; 1}0.469880.5301283
{(0, 0, 0); 1; 0}0.666670.333333
{(0, 0, 0); 1; 1}0.800000.200005
{(0, 0, 1); 0; 0}0.545460.4545522
{(0, 0, 1); 0; 1}0.647060.3529417
{(0, 0, 1); −1; 0}0.529410.4705917
{(0, 0, 1); −1; 1}0.403510.5964957
{(0, 0, 1); 1; 0}0.500000.5000016
{(0, 0, 1); 1; 1}0.500000.5000024
{(0, 1, 0); 0; 0}0.423080.5769226
{(0, 1, 0); 0; 1}0.578950.4210519
{(0, 1, 0); −1; 0}0.466670.5333315
{(0, 1, 0); −1; 1}0.470590.5294151
{(0, 1, 0); 1; 0}0.500000.500004
{(0, 1, 0); 1; 1}0.666670.3333324
{(0, 1, 1); 0; 0}0.458330.5416724
{(0, 1, 1); 0; 1}0.391300.6087023
{(0, 1, 1); −1; 0}0.500000.500002
{(0, 1, 1); −1; 1}0.407410.5925927
{(0, 1, 1); 1; 0}0.523810.4761921
{(0, 1, 1); 1; 1}0.403230.5967762
{(1, 0, 0); 0; 0}0.619050.3809521
{(1, 0, 0); 0; 1}0.423080.5769226
{(1, 0, 0); −1; 0}0.423080.5769226
{(1, 0, 0); −1; 1}0.479170.5208348
{(1, 0, 0); 1; 0}0.142860.857147
{(1, 0, 0); 1; 1}0.680000.3200025
{(1, 0, 1); 0; 0}0.285710.7142914
{(1, 0, 1); 0; 1}0.818180.1818222
{(1, 0, 1); −1; 0}0.250000.750004
{(1, 0, 1); −1; 1}0.645160.3548431
{(1, 0, 1); 1; 0}0.619050.3809521
{(1, 0, 1); 1; 1}0.528300.4717053
{(1, 1, 0); 0; 0}0.458330.5416724
{(1, 1, 0); 0; 1}0.500000.5000024
{(1, 1, 0); −1; 0}0.500000.5000014
{(1, 1, 0); −1; 1}0.545460.4545522
{(1, 1, 0); 1; 0}0.500000.5000012
{(1, 1, 0); 1; 1}0.412700.5873063
{(1, 1, 1); 0; 0}0.375000.625008
{(1, 1, 1); 0; 1}0.300000.7000010
{(1, 1, 1); −1; 0}0.600000.4000010
{(1, 1, 1); −1; 1}0.700000.3000010
{(1, 1, 1); 1; 0}0.500000.5000034
{(1, 1, 1); 1; 1}0.482760.5172458
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

Stasiak, M.D.; Staszak, Ż. Modelling and Forecasting Crude Oil Prices Using Trend Analysis in a Binary-Temporal Representation. Energies 2024, 17, 3361. https://doi.org/10.3390/en17143361

AMA Style

Stasiak MD, Staszak Ż. Modelling and Forecasting Crude Oil Prices Using Trend Analysis in a Binary-Temporal Representation. Energies. 2024; 17(14):3361. https://doi.org/10.3390/en17143361

Chicago/Turabian Style

Stasiak, Michał Dominik, and Żaneta Staszak. 2024. "Modelling and Forecasting Crude Oil Prices Using Trend Analysis in a Binary-Temporal Representation" Energies 17, no. 14: 3361. https://doi.org/10.3390/en17143361

APA Style

Stasiak, M. D., & Staszak, Ż. (2024). Modelling and Forecasting Crude Oil Prices Using Trend Analysis in a Binary-Temporal Representation. Energies, 17(14), 3361. https://doi.org/10.3390/en17143361

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