1. Introduction
Crude oil plays a key role in the global economy as a raw material of strategic importance. Its price directly influences many branches of the economy, especially the chemical industry and transport. Fluctuations in oil prices determine the transportation costs for not only land, but also air and water, transport. As a result, it is involved in setting the price levels of almost all consumer and investment goods. Indirectly, changes in crude oil prices influence the profitability of industry sectors connected with machines and automobile exploitation at each stage of their lifecycle, from production to use and utilization. As a consequence, the financial results of entire economies often depend on crude oil prices [
1,
2]. Many studies indicate that there are cause-and-effect relationships between the stock market quotations [
3,
4], derivative instruments [
5], and currency exchange rates [
6,
7]. Due to these reasons, the effective prediction of oil prices is crucial for management-level operational decision making. In fact, the accurate prediction of future price trends enables the optimization of material purchases, production planning, and the selection of the most advantageous forms of transport. Thanks to these effects, organizations can significantly decrease operational cost, increase business profitability, and strengthen their competitive position on the market. Moreover, accurate oil price forecasts are highly important for financial markets, especially for the derivatives sector.
Although the problem of oil price prediction is brought up many times in the subject literature, there are still no effective prediction tools on the market. Many different methods are used for predicting crude oil prices, ranging from standard methods and indicators of the technical analysis and to the advanced statistical methods, machine learning-based solutions, and state modelling [
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19]. Most of the existing research concentrates on long-term prediction and uses daily closing prices, as in [
17], weekly prices, as in [
18], or even monthly closing prices, as in [
19]. This kind of approach does not take into account the dynamics of changes during the day, even though it can visibly influence the investors’ behaviour in ensuing periods. What is more, traditional methods rarely assess the range of forecasted changes, limiting the prediction to the possible direction of the price trend (increase/decrease). The lack of the precise indication of price expectations significantly decreases the applicability of the models. Another important issue is the lack of literature describing the problem of modelling small, short-term price changes, occurring in hours or even minutes rather than days. The importance of the short-term oil price modelling increases, especially in the context of modern financial instruments market, where CFDs (Contracts for Difference) [
20] are particularly popular. CFDs are leveraged derivative instruments used for investments in the crude oil market. Investors using financial leverage often operate on time horizons measured in hours or minutes. As a result, the demand for advanced tools and algorithms that allow for accurate forecasting of short-term price fluctuations is constantly increasing [
15,
16].
In their previous works, authors have proven that using candlestick representation (or its version limited to the daily closing prices) leads to a loss in the informative value and the prediction efficiency of the modelling. As an answer to this issue, in response to the needs of intraday price analysis, authors introduced a binary-temporal representation [
21] and proposed the use of state modelling employing it [
22,
23]. In the proposed models, the best results were obtained using two basic technical analysis methods—trend analysis and average analysis [
24]. Both methods of analysis are characterized by high effectiveness for the crude oil market. In the presented paper, authors suggest using the most popular technical analysis indicator, i.e., RSI (relative strength index), demonstrating its determination in the binary-temporal representation.
The RSI indicator, due to its simplicity and clear interpretation, stands as a one of the most popular technical analysis tools that is currently used on the market [
25,
26,
27,
28,
29]. The very idea of the indicator assumes the determination overbought and oversold market levels. It was developed in the 1970s and has been used ever since to forecast the direction of price changes in virtually all markets. Much research has been conducted to verify its effectiveness for a wide range of financial instruments. The structure of a classic RSI indicator performs its determination based on data given in a candlestick representation. In the following paper, we will present the concept of calculating a bRSI indicator (binary RSI) based on the binary-temporal representation. The empirical research used the latest tick data of the Brent crude oil price in the US dollar (XBR/USD) for a period of 6 years (1 January 2019–1 January 2025). The data was collected from the Swiss broker Ducascopy.
The main goal of the paper is to present the concept of the new technical analysis indicator—bRSI—which corresponds to the RSI indicator in the binary-temporal representation, as well as the empirical verification of its applicability when constructing investment strategies on crude oil market. The structure of the article is as follows: After a short introduction, in
Section 1, we present the general idea of the research.
Section 2 introduces the assumptions of the binary-temporal representation.
Section 3 describes the construction of the proposed bRSI indicator.
Section 4 shows the research results for the empirical experiments with the use of RSI and bRSI indicators and their comparative analysis. The paper ends with a summary of conclusions resulting from the performed research.
2. Binary-Temporal Representation of Crude Oil Rates
The effectiveness of the course analysis is strongly dependent on both the applied modelling method and the means of computing the input data. In the scientific literature and analytical practice, the most popular approach is to use so-called candlestick representation, where four key values are calculated for the given timeframe: opening, closing, minimum, and maximum price [
25,
26]. However, often, only the closing prices from a given period are used. In the crude oil prices analyses, mostly daily closing prices are applied, which brings the risk of losing information about the dynamics of changes occurring during the day.
It is worth noting that the amount of information lost from the historical data due to the use of simplified formatting method can be variable in time and hard to assess precisely. As a consequence, research performed using such data can generate results of a limited credibility, especially in the context of the short-term price fluctuations. Moreover, the application of this type of analysis can be unjustified in a narrow timeframe. The potential influence of this limitation in both scientific research and practical use was described in detail in [
21].
To increase the prediction precision, one can use data of a higher resolution, i.e., tick data, meaning that data show each registered change in price trajectory, independently of scale. Even though they allow for maximal detail, they still require reduction in the noise that stems from many arbitrary small oscillations [
30,
31,
32]. Also, the velocity of this type of data is another limitation, since often the data can take up dozens of gigabytes, making it impossible to use many standard analytical models. For these reasons, it becomes necessary to transform the tick data in a way that reduces noise while preserving the information relevant to the modelling process.
One effective solution of this problem is the so-called binary-temporal representation, developed based on the point and figure method proposed by the De Villers 1933 [
33]. Despite its advantages, the original method was mostly replaced by the candlestick representation that is most popular today [
25,
26].
The binary-temporal representation only concentrates on registering significant changes in the price trajectory, within a given range, eliminating the arbitrary microfluctuations. The representation consists of two parameters—the distraction of
i-th change (
εi), which is assigned “1” if the price increases by a given value (i.e., the so-called discretization unit
δ) and “0” if the price decreases by the same value. The other parameter is the duration of the
i-th change, denoted as ∆
ti. This calculated in seconds passed from the end of previous change. In other words, the tick data is transformed into an ordered sequence of pairs (
εi, ∆
ti), according to the following formula:
In
Figure 1, we can see the process of transforming the tick data for the crude oil course trajectory into the binary-temporal representation, calculated for the discretization unit of 50 pips (where 1 pips corresponds to the change in the barrel price of 0.01 USD, so each change of one discretization unit equals a USD 0.5 change in the price of the crude oil).
The key advantage of the binary-temporal representation is the possibility of effective noise filtering with the simultaneous retention of precision, determined by the value δ. Each change exceeding the threshold value is registered, which allows for the analysis of analyzing actual price movements on the market, while omitting the arbitrary fluctuations. Moreover, this form of representation is most useful in constructing prediction models, built to assess the direction of future changes in price trajectory. Contrary to many existing solutions, which focus mostly on the direction of the change without indicating its scale, modelling with the use of binary-temporal representation allows for the unequivocal determination of the probability of a future course increase equal to δ, under the assumption that a decrease of the same size does not occur. This method of modelling additionally allows for the precise determination of the price levels at which the particular operations of buying and selling can be performed.
3. Concept of a Standard RSI
The RSI indicator was developed in 1978 by financial market analyist J. Welles Wilder and described in his book “New Concepts in Technical Trading Systems” [
34]. RSI is classified as representative of the technical analysis group called oscillators, the main characteristic of which is the fluctuation in the normalized value in the range between 0 and 100, depending on the market situation. It is used to indicate potential overbought or oversold areas of a given instrument. The idea of the indicator assumes the analysis of the strength and dynamics of the course changes in order to quickly detect the moments of trend breakthrough and potential turning points. The indicator is chosen based on the candlestick representation, particularly on the closing prices of a number of previous candles.
The calculation of the RSI consists of two stages. The first step is to appoint a so-called indicator of a relative strength (RS), which is the ratio between the average increase and the average decrease in a chosen timeframe (usually 14 candles):
In the next step, we indicate the RSI value based on the index normalized to 100 points using the following formula:
The interpretation of the RSI is based on the identification of the overbought and oversold areas of the market. Reaching or exceeding the overbought level signals that the market is excessively bought, which means a rapid or long-lasting increase in prices within a short time. This kind of situation often foreshadows a possible downward correction and is treated as a sell signal. On the other hand, reaching or exceeding the oversold threshold indicates excessive market selling, indicating an overly fast or long-lasting decrease in prices in a short amount of time, which usually suggests possible upward correction and is treated as a buy signal. In the literature and investment practice, the three basic sets of overbought and oversold are (40, 60), (30, 70), and (20, 80) [
34,
35,
36].
4. Conception of Binary RSI (bRSI)
Let us consider the application of the RSI indicator in the binary-temporal representation. Analogously to the standard approach, which was constructed with the candlestick representation in mind, first we needed to appoint a binary-temporal relative strength indicator (bRS) corresponding to the RS indicator. In order to achieve this, we can assume that the strength will be measured as the ratio between the average increase and the average decrease in price. Although, in the classical approach, the information about the time is encompassed in the candlestick representation’s timeframe parameter, in the case of the binary-temporal representation, there exists the need for the direct inclusion of the parameters representing price movement duration. To achieve this, average increases and decreases are multiplied by the ratio of the increase/decrease duration to the total duration of the changes.
For the
i-th change, the number of increases
in N previous changes in the binary-temporal representation can be calculated from the following formula:
The number of decreases
is determined as follows:
The sum of durations calculated for the price increases
and decreases
is described by the formula
where
The bRS indicator for the
i-th change can be denoted as follows:
Next, we can indicate the bRSI indicator for the
i-th change using the RSI Definition (3):
The indicator appointed in this way can be used to assess the current market situation and predict future changes. The predictive value of an indicator constructed thus will be analyzed in
Section 5.
5. Construction and Verification Strategy Based on RSI Indicator
5.1. Assumptions of Strategy
The RSI index, according to its definition, is used to identify the overbought and oversold levels on the market, which can signal the potential trend changes. Due to the normalized character of the indicator, we can assume that the threshold values are fixed and independent from the other RSI parameters. The most popular investing strategy assumes the follows [
34,
35,
36]:
Opening a BUY position, when the RSI value drops below the oversold threshold (THR_D) and closing the SELL position, if RSI reaches the overbought level (THR_U).
Opening the SELL position, when the RSI value exceeds the overbought level (THR_U) and closing the BUY position, if the RSI level drops below the oversold level (THR_D).
In the literature and investment practice, three sets of thresholds (THR_U,THR_D) are often used: (40, 60); (30, 70) and (20, 80). The RSI indicator is calculated based on 14 historical candles. This most popular strategy, with these mentioned parameters, is now verified for both the classical RSI indicator and the bRSI introduced. In case of the binary-temporal representation, we assumed that each binary change corresponds to a candle; therefore, in the bRSI analysis, we also considered 14 previous binary changes.
The strategy presented above can be used in the algorithmic trade systems for the CFD contracts on the crude oil market. The implementation of this strategy for candlestick representation was developed in the MQL5 language and for the binary-temporal representation in the C++ language. The code was optimized using dedicated indicators in order to minimize the duration of the experiments.
Historical 6-year long tick data was used to conduct the research, spanning from 1 January 2019 up to 1 January 2025. In accordance with the commonly applied research methodology, the period was divided into two three-year-long subperiods: teaching/validation (1 January 2019–31 December 2021) and testing (1 January 2022–1 January 2025).
The financial efficiency of investment strategies, using leveraged instruments, is determined using efficiency indicators based on the analysis of capital dropdowns. This group of indicators includes the Calmar, Sterling, and Burke ratios [
37,
38,
39]. Calmar’s ratio [
37] is calculated as the ratio between the average annual rate of return (
) and the risk measured by the maximal drowdown (
MDD):
Sterling’s ratio [
40] is a risk measure that calculates the average capital drop and can be calculated as
where
are the next highest recorded drawdowns, assuming they are listed in descending order (
The Burke ratio [
41] assumes variance as a measure of risk and is determined from the following formula:
The article includes the calculation of all ratios, but the optimization process uses the Calmar ratio, which is the most popular among investors. It should be emphasized, however, that using another indicator would lead us to establish identical sets of strategy parameters. All backtests were performed for an account with an initial capital of USD 100,000. The transactions were opened with a fixed size of 1 Lot. To assure the higher generality of the results, a spread of 2 pips was used. In practice, most brokers offer a significantly lower average spread, and therefore the real-life application of the presented strategies can bring ever better financial results.
5.2. Verification Standard Strategy of RSI
Even though the described investment strategy is often cited and was verified more than once for the selected timeframes, the subject literature still lacks a complex comparison of its effectiveness for the crude oil market, performed for the different time intervals typically used by the analysts. Authors applied dedicated specialistic software to conduct backtests for the investment systems based on the following intervals: 1 min (1 M), 5 min (5 M), 15 min (15 M), 1 h (1 H), and 4 h (4 H). The tests were performed on the validation set spanning from 1 January 2019 up to 31 December 2021 for three sets of RSI thresholds: (40, 60), (30, 70) and (20, 80).
Let us now consider the backtest results presented in
Table 1 for the set of thresholds (40, 60).
Next, we chose the time interval for which the effectiveness of the strategy was the highest. In the research performed, the best results were obtained for the 4 h interval (4 H), for which the Calmar ratio calculated for the validation period was equal to −0.0232 and the average annual rate of return reached −0.01%. In the next stage of the research, we performed a backtest for the same interval but used data from the training period (1 January 2022–1 January 2025). In this case, the Calmar ratio improved up to 0.13, and the average annual rate of return rose to 4.12%. The course of the equity curve obtained during this test is shown in
Figure 2.
The research results indicate that the analyzed strategy achieved the highest Calmar ratio at the level of 0.13 in the test period. This result suggests that this strategy can generate profit in the long term. However, it should be emphasized that, in the validation period, the value of the Calmar ratio was negative, which indicates the instability of the obtained results and the relatively low reliability of the signals generated by this strategy.
Let us consider the results of backtests presented in
Table 2 for the set of thresholds (30, 70) from the validation period.
Then, a timeframe was selected for which the efficiency of the strategy based on RSI was the highest. The highest efficiency was observed for the 30 M interval, for which the Calmar ratio was 0.0884, while the average annual rate of return was 3.3%. In the next step, a backtest was conducted for this interval in the test period. It was characterized by a Calmar ratio of 0.0487, and the average annual rate of return was 2.23%.
Figure 3 shows the backtest results.
The obtained results show that, in the best case, the strategy considered achieves a Calmar ratio of 0.0487 (in the test period). Such a level of efficiency indicates that the given strategy can generate minimal profit in the long run. Let us consider the third set of thresholds (20, 80), for which the results of the backtests are presented in
Table 3.
The research results show a negative Calmar ratio for all time intervals, which means that the system generated losses in each case. The highest Calmar ratio (as well as Sterling and Burke) was noted for a 4 h interval. Yet, one has to note that it included only 4 transactions, which suggests a very long duration of open transactions and a very low reliability of results.
5.3. Verification Standard Strategy of bRSI
Let us consider the effectiveness of the researched strategy with the use of the binary-temporal representation. The buy/sell transactions are opened and closed after the occurrence of the next change in the binary-temporal representation, for which the bRSI index exceeds the appointed border levels (in case of the standard approach, the actualization of RSI happens after the occurrence of the next candle). The system’s effectiveness depends on the selected discretization unit, which can be treated as the equivalent of the timeframe in the classic candlestick approach.
For each of the three researched sets of parameters, we performed backtests in the validation period for the full set of discretization units for which the course retains the informative value, i.e., in the range between 2 and 236. The process was described in detail in [
42]. The discretization units for which the system generated less than 10 transactions were omitted as being less credible. Next, regarding the discretization unit that reached maximal financial effectiveness in the backtest, we conducted further assessment of the test data in order to prove the high effectiveness of the system’s performance.
Let us consider the set of thresholds (40, 60). The most financially effective result in the validation period was obtained for the system constructed with the discretization unit of 202 pips (corresponding to a change in the course trajectory of USD 2.02). The value of the Calmar ratio obtained in this backtest was equal to 0.2405, and the average annual return rate reached 5.05%. Next, for the given discretization unit, we performed a backtest based on the test period. Results of this backtest are presented in
Figure 4. Results show the cumulative return rate registered after each change in the binary-temporal representation. The strategy in the test period was characterized by the effectiveness achieved when a Calmar ratio equal to 0.3006. In the test period, the average annual rate of return reached 18%. Obtained results indicate unequivocally that, in the test period, the researched strategy obtained better results.
The obtained results show that the studied strategy achieves a Calmar ratio of 0.30 in the test period. This level of efficiency indicates the possibility of generating a constant profit over a longer period of time.
Let us consider a set of thresholds (30, 70). The most financially efficient result in the validation period was obtained for a discretization unit of 208 pips (corresponding to a change in the exchange rate of
$2.08), for which the Calmar ratio was 0.54. In the backtest period, the average annual rate of return was 11.43%. For a given discretization unit, a backtest was conducted for a later test period. This is characterized by the efficiency achieved using a Calmar ratio of 0.2894. In the test period, the average annual rate of return was 13.85%. This result means that in the test period the researched strategy obtained significantly worse results.
Figure 5 presents the results of the discussed backtest.
The research results show that the considered strategy achieves a Calmar ratio of 0.2894 in the test period. This level of efficiency indicates the possibility of generating a constant profit in a longer period of time.
Let us examine the performance of the strategy for the set of thresholds (20, 80). The most financially efficient system in the validation period was obtained for the binary-temporal representation with a discretization unit of 208 pips (corresponding to a change in the exchange rate by
$2.08). For a given discretization unit, the Calmar ratio was 0.8746. In the backtest period, the average annual rate of return was 18.04%. For the adopted discretization unit, a backtest was conducted for the later test period, which is characterized by efficiency measured by the Calmar ratio of 0.4114. The average annual rate of return was 14.55%. This result means in the test period the researched strategy obtained worse results. However, the system maintains high efficiency throughout the research.
Figure 6 shows the backtest results.
The results of the study show that the studied strategy achieves a Calmar ratio of 0.4114 in the test period. This level of effectiveness indicates the possibility of generating stable profit in the long term.
5.4. Comparison of Results and Discussion
Let us now consider a comparison of the results obtained.
Table 4 shows the collective comparison of the strategies. The strategies generating losses in the validation process were not included. In Chapter 5.2, an analysis of a strategy based on the classic RSI indicator for standard timeframes was carried out. For a set of thresholds (30, 70) and the 30 min interval, a positive financial efficiency was noted in the backtests (both in the validation and test periods). It should be noted that the efficiency in both periods was minimal (the corresponding values were 0.0848 and 0.0487). Moreover, a 50% decrease in efficiency was noted in the test period. Such results rule out the practical use of the classic RSI as an effective tool for forecasting crude oil prices.
Section 5.3 analyzed a strategy based on binary-temporal representation. For all tested sets of thresholds, both in the validation and test periods, positive financial efficiency was obtained. The highest level of efficiency was achieved for a discretization unit equal to 208 pips (corresponding to a price change of USD 2.08) and certain thresholds (20, 80). In this case, the Calmar ratio was 0.8746 in the validation period and 0.4114 in the test period, respectively. A strategy characterized by a Calmar ratio of around 0.4 allows us to achieve a positive rate of return in the long-term investment horizon and may be attractive to investors. It should also be emphasized that, for the remaining sets tested using the thresholds, the strategy was characterized by a positive Calmar ratio in both the validation and test periods.
Comparing the efficiency of the strategies for the standard RSI and bRSI, it is clearly indicated that the use of the binary-temporal representation allows us to obtain significantly better results. The highest efficiency for strategies based on the standard RSI was 0.0487, while for systems based on the binary-temporal representation it was 0.4114—which was about 10 times higher.
When analyzing the research results, a certain concern was raised by the large changes in efficiency in the test and validation periods, despite the fact that even after a decrease in efficiency in the test period, the strategies generate constant profit. In the opinion of the authors, such a phenomenon indicates the need to construct more “personalized” strategies for the oil market in order to achieve even higher efficiency. It seems that a good solution would be, for example, combining RSI analysis with state modelling. Authors intend to conduct further research on the use of the bRSI indicator in such a case.
The authors are also aware that for another period or another strategy, the results could be different, but testing all possible strategies with all combinations of parameters is unrealistic due to the required computing power. Therefore, the authors focused on the most popular strategy with a typical parameter configuration. The fact the method obtains high financial efficiency, allowing for systematic profits, fully justifies the development of tools based on bRSI for the oil market.
6. Conclusions
The article presents the concept and method of determining the bRSI indicator, which is the equivalent of the RSI indicator in the binary-temporal representation. The proposed approach considers both the ratio of the number of increases to the number of decreases and the ratio of the duration of increases to the duration of decreases in the analyzed period.
In the paper, empirical analysis of using new indicators for predicting crude oil prices was carried out with advanced software developed by the author. First, the effectiveness of the most popular investment strategy based on RSI for the crude oil market was examined with the three typical sets of parameters most often used by analysts. As a result of the optimization, a timeframe was determined that allows us to achieve maximum effectiveness for a given set. Only in one case did we obtain a positive Calmar ratio in the validation and test periods, but its value was minimal. Then, the effectiveness of the same strategy for the binary-temporal representation and the bRSI indicator was examined. For all sets of parameters, both in the test and validation periods, a profit was noted. The most financially effective strategy using the bRSI indicator in the test period is characterized by a Calmar ratio ten times higher than the strategy based on the standard RSI indicator. This result confirms the high effectiveness of forecasts and the possibility of practical use of the proposed indicator by investors on the crude oil market.
It should be emphasized that the presented concept of determining the bRSI indicator is universal and can also be used to forecast the prices of other raw materials or financial instruments.