This article will compare the results of the relative strength index — RSI — strategy to two different types of relative strength indexes over a period of ten years’ worth of intraday FX data. Theoretically, an indicator followed by a sizeable number of market participants such as the relative strength index should have more impact and weight than its other variations due to the sheer number of market participants acting on its signals, but does this mean the relative strength index will outperform its other variations? let’s explore the idea of selectively modifying and adding filters to the RSI and its impact on predictability and profitability.
The Fibonacci Trading Book is finally out! Filled with Fibonacci-based trading methods (tools, indicators, patterns, and strategies), this book will guide you through improving your trading and analysis by incorporating an important technical analysis approach that is Fibonacci (PDF Version available, see below).
The Fibonacci Trading Book
Amazon.com: The Fibonacci Trading Book: 9798394344046: Kaabar, Sofien: Booksamzn.to
Intuition of the Research
Trading strategies come in all shapes and forms. From fundamentals to technical analysis and hybrid strategies, there is a plethora of strategies to be made in order to generate alpha. We are often confronted with the dilemma of “which strategy works better and when?”. Let’s take an example of the relative strength index which is based on price momentum and is generally used to generate contrarian signals when it is showing an extreme reading. How do we know that the signal will be good? In reality, that is very difficult to achieve, and our best aim is to confirm this with back-testing results.
However, classical technical indicators, when used in their default forms are unlikely to provide positive returns or at the very least consistent positive returns. Filters and tweaks are strategy-enhancers that try to eliminate bad signals so that the profitability increases. It is a form of risk management that protects the portfolio from taking low conviction trades.
The aim of the paper is to back-test a strategy on three types of relative strength indexes so as to compare them together. The conditions of the strategy states that we should open a long position whenever the RSI values are oversold and a short position whenever the RSI values are overbought. An oversold situation occurs whenever the market’s momentum is bearish enough to push the RSI’s values towards the lower limit zone. In contrast, an overbought situation occurs whenever the market’s momentum is bullish enough to push the RSI’s values towards the upper limit zone.
The strategy will be run on 5 major currency pairs. For an apples-to-apples comparison, we will omit the transaction costs part as the aim is not to find a profitable ready-for-deployment strategy but rather to answer the following question:
Which type of RSI strategy performed better over the last 10 years? And which type had a better relative hit ratio?
The back-test will run on several FX data on the hourly time frame since 01/01/2011. The choice of the hourly time frame is related to the abundance of data and signals as well as giving us the ability to back-test the intraday horizon. Also, lower time frames give technical analysis a theoretical edge as it tends to lose its popularity to fundamental analysis in the higher time frame because of other exogenous variables that impact the price. We will back-test three indicators which are discussed in greater depth in the next sections, the first being a standard 14-period relative strength index, the second a modified relative strength index which relies on a simple moving average rather than a smoothed moving average as used in the original RSI, and the third a correlation-adjusted relative strength index (CARSI) which filters the signals according to rules presented later. When back-testing a strategy, we need to account for the exit technique.
In our case, we are also trying to detect the reaction of the market after the RSI becomes overbought or oversold in addition to forming a trading strategy, therefore, we can back-test two exit methods:
· 1-hour holding period: This assumes that whenever the RSI enters the oversold or overbought level, we should expect a quick reaction, therefore, the algorithm will buy or sell at the signal and then exit at the next close, holding the position for one hour. We will refer to this as the fixed period strategy
· Hold the position until getting another signal: This assumes that the signal is valid until getting a new updated signal. For instance, whenever the RSI reaches 30, we buy and hold the position until it either reaches 70 (short position) or exits 30 and dips again below it (long position). We will refer to this as the variable period strategy.
As risk management is related to the trader’s risk-reward preferences, we will omit it in the back-test and approach the data from a neutral stance. The performance evaluation metrics that will be analyzed are the following:
The hit ratio: This is the number of profitable trades over the number of total trades. If we have 56% hit ratio, then on 100 trades, we should have gotten 56 profitable trades.
The gross return: This is the return we have achieved following a strategy. If we start out with $100 and finish with $105, then our gross return would be 5%.
The risk-reward metric: This is the average gain divided by the average loss. As we do not use risk management in the back-test, we are interested in seeing what the broad risk is in using the strategy.
Total trades taken: This is the total number of the closed positions and is a measure of the frequency.
Strategy 1: The Relative Strength Index (RSI)
First introduced by J. Welles Wilder Jr., the RSI is one of the most popular technical indicators. Mainly used as a contrarian indicator where extreme values signal a reaction that can be exploited. Typically, we use the following steps to calculate the default 14-period RSI:
Calculate the change in the closing prices from the previous ones.
Separate the positive net changes from the negative net changes.
Calculate a smoothed moving average on the positive net changes and on the absolute values of the negative net changes.
Divide the smoothed positive changes by the smoothed negative changes. We will refer to this calculation as the Relative Strength — RS.
Apply the normalization formula shown below for every time step to get the RSI.
As a side note, the smoothed moving average is a special type of moving averages developed by Welles Wilder which is smoother than the simple moving average. The trading conditions will be as follows:
A long position is generated whenever the 14-period RSI closes at a value less than 30 while the previous value is greater than 30.
A short position is generated whenever the 14-period RSI closes at a value greater than 70 while the previous value is less than 70.
The exit strategy will be two fold, as discussed previously, one strategy will back-test exiting after one hour (one price bar) and the strategy will back-test exiting only when the algorithm encounters another signal. The next table shows the results in detail for 5 currency pairs. The results for all three strategies will be discussed in section 3.
The PDF link for the Fibonacci Trading Book is the following (make sure to include your e-mail address in the notes part):
Pay Kaabar using PayPal.Me
Go to paypal.me/sofienkaabar and type in the amount. Since it’s PayPal, it’s easy and secure. Don’t have a PayPal…paypal.me
Strategy 1: The Modified RSI
The modified relative strength index uses the simple moving average instead of the smoothed moving average in its calculation. This will cause the RSI to be more reactive and to benefit from the plain simple average technique. Intuitively, this will give us more signals since the values of the modified RSI will be more volatile and have more range. The trading conditions will be the same as the previous strategy:
A long position is generated whenever the 14-period modified RSI closes at a value less than 30 while the previous value is greater than 30.
A short position is generated whenever the 14-period modified RSI closes at a value greater than 70 while the previous value is less than 70.
As you can see, the signals are more abundant, and the RSI looks more volatile. It looks like the modified RSI’s natural subjective boundaries should be further than the standard 70 and 30, but we will keep them so that we remain coherent across the three back-tests. The following tables show the performance of the modified RSI strategy using the same conditions as the first strategy.
Strategy 1: The Correlation-Adjusted RSI
The idea of adjusting for correlation deals with the concept of convictions. To create the correlation-adjusted RSI, we will follow these steps:
We calculate the 14-period RSI on the market price as we do in the first strategy.
We then calculate a 3-period rolling correlation between the price and the RSI.
Finally, we calculate a 14-period RSI based on the 3-period correlation measure.
Correlation is the degree of linear relationship between two or more variables. It is bounded between -1 and 1 with one being a perfectly positive correlation, -1 being a perfectly negative correlation, and 0 as an indication of no linear relationship between the variables (they relatively go in random directions). The measure is not perfect and can be biased by outliers and non-linear relationships, it does however provide quick glances to statistical properties.
We will retain two indicators from the three previous steps, the 14-period RSI (as in the first strategy) and the 14-period RSI applied on the correlation between the price and the RSI. The former will give us the signal while the latter will confirm the signal (by validating it or eliminating it). We will follow the below intuition to explain why we are creating this strategy:
“The price and its RSI have generally a very high correlation since the latter is merely derived from the former, however, sometimes they diverge slightly due to dynamic shift in momentum. This divergence may signal that whenever the correlation is low between the market and its RSI, any trading idea based on the latter may have a lower chance of achieving a positive result because we have statistical data that suggests the market will not follow the RSI ceteris paribus.”
The two indicators form what we are calling a correlation-adjusted relative strength index — CARSI. The trading conditions will be the same as the previous strategy with a filter:
A long position is generated whenever the 14-period RSI closes at a value less than 30 while the previous value is greater than 30. Simultaneously, the 14-period RSI based on the correlation between the price and the first RSI must be above 50.
A short position is generated whenever the 14-period RSI closes at a value greater than 70 while the previous value is less than 70. Simultaneously, the 14-period RSI based on the correlation between the price and the first RSI must be above 50.
We have now seen the results based on the three strategies. The next section will discuss and compare the performance metrics.
Results
As a refresher of the back-testing, our aim is to see which of the three RSI’s has performed better on the 5 major currency pairs since 2011 using hourly data. The data showed some tendency of a strategy that outperformed the others on a gross level; The modified RSI (MRSI) had a greater gross return than the regular and the correlation-adjusted RSI. The results were mixed between the regular RSI and the CARSI as can be seen in the next comparison tables. One thing that can be noticed across the results is that generally, the variable holding period works better than the fixed holding period.
When we compare the different hit ratios over the years and across the different FX pairs, we find that at no time did the standard RSI hit ratio for the fixed period have a better hit ratio than both the MRSI and CARSI. Interestingly, four out of five times, the CARSI had a better hit ratio than the regular RSI which may point to an added-value with regards to the filtering effect from adjusting to correlation. Overall, the modified RSI had the most times where the hit ratio is greater than the other two RSI’s.
When it comes to the variable period strategy, the modified RSI had the biggest hit ratios across the board but also a lower risk-reward ratio. More importantly, the correlation filter added more value since the hit ratio of the CARSI is bigger than the hit ratio of the RSI. However, with this being said, the risk-reward ratio of the regular ratio was slightly greater than the CARSI’s risk-reward measure.
In this article, we have analyzed the results from three different relative strength indexes and have concluded that the modified type which relies on the simple moving average outperformed the other two during the last 11 years period on the intraday horizon.
The results do not indicate that a superior strategy can be formed using this type of RSI, they merely point to the fact that default indicators such as a 14-period RSI may not be up-to-date with the ever-changing market dynamics. Further research must be done to prove the superiority of the modified RSI over the regular RSI, but at the moment, it does show more potential than the one we are used to.