• Language & Exchange Rate Switch
  • Preference Settings
    Rise/fall colour
    Start-End Time of the Change
Web3 Exchange
Gate Blog

Your Gateway to crypto news and insights

Gate.io Blog Introduction to the ROC Indicator and Its Practical Use in Quantitative Trading

Introduction to the ROC Indicator and Its Practical Use in Quantitative Trading

07 October 13:42
Trend following and momentum trading are two of the most basic strategies utilized in traditional market timing investment. Trend-following indicators are tools that analyze the trend in the current price, while momentum indicators are used to measure the pace of price fluctuation. If the price of a crypto coin is compared to a moving car, the trend-following indicator represents the moving direction, and the momentum indicator denotes the speed at which the car is running. The dual moving average and MACD are typical trend following strategies, and ROC is the most classic momentum-based indicator.

What is ROC and What is it used for?

The Price Rate of Change (ROC) is a classic indicator that measures the momentum of price fluctuation and the rate at which prices change over a specified period of time. The ROC indicator is plotted against zero, and the indicator moving into positive or negative territory reflects the direction of price changes. What’s more, its absolute value can be utilized to forecast the possible price momentum shifts.

When the price is at a new high and the ROC indicator also moves to a corresponding new height, the probability is that there is sufficient momentum for price growth, with more room for rising; and vice versa. If the price reaches a new high, the indicator, however, is not at the corresponding height, there will be an inverse divergence between price and momentum, which usually indicates that the price will rise weakly and the price changes trend may be reversed.

How to Calculate the ROC Indicator:

The process of calculating the ROC indicator is relatively simple.

Firstly, choose an “N” value. (“N” refers to period)
Secondly, find the most recent period's closing price, which is named “Ren_Close”.
Thirdly, find the period's close price from “N” periods ago, which is denoted as “N_Close”.
At last, calculate the indicator with the following formula.


Advantages of the ROC Indicator:


Not only can the ROC indicator tell you the trend of price changes within the selected trading period, but also the strength of price momentum by the rate of change. Meanwhile, it can help you predict the movements in relation to price trends. The indicator can be regarded as a separate breakout indicator to specify entry and exit points. Besides, in combination with other trend-following indicators, it can be used to create a composite indicator system and identify trend changes.

Creation of ROC Trading Strategy

ROC, a momentum-based indicator, can be seen in a wide range of strategies. It can be used to build momentum identification strategies on its own or added to other strategies (especially trend following strategies) to improve the probability of signal identification. When building a strategy only using ROC, the principle assumes that there may be a continuous momentum effect that is a usual market phenomenon in which crypto prices follow a trend for a rather long time. This effect, in other words, and on a simple basis, means that cryptocurrencies whose prices have risen in the past will also rise in the future, while those whose prices have fallen in the past will also decline in the future.
When creating a ROC strategy, you can analyze the markets with one ROC indicator or multiple ROC indicators in different periods synchronously. For example, the classic triple momentum strategy combines ROC indicators from three different periods to identify entry and exit points.

Practical Use:
First, ROC breakout strategy
[Trading Coins]
SOl is the main coin in the strategy studying and BTC is used to test the generalization ability of the strategy.
[Trading Period]
30 minutes
[Trading Leverage]
10 ☓
[Backtesting Time]
Time: 2021/07/18 - 2021/09/13 (SOL)
Time: 2021/07/18 - 2021/09/13(BTC)
[Trading Logic]
It is assumed that there is a momentum effect in the price of coins invested. When the ROC reading exceeds a set parameter, it is believed that the price will enjoy a strong upward trend and the coins should be bought in time. However, when the reading is lower than a set parameter, it is believed that the price will have a downward movement and the coins should be sold on a timely basis.

[Parameter Settings]
The strategy involves a total of three parameters: time frame for ROC indicator, a parameter for entry(if the ROC indicator is above this value, you will see a buy signal), and a parameter for exit(if the ROC indicator is below this value, a sell signal will show).
Time Frame: 24
Entry: 5
Exit: -2

[Backtest Results]
For SOL:

The strategy boasts good performance on SOL on the backtesting interval with the cumulative return reaching 17,131.05%

For BTC:


As you can see, the strategy which is applied to BTC without any parameter optimization still works great.

Second, Imitating Triple Momentum Strategy

[Trading Coins]
SOl is the main coin in the strategy studying and BTC is used to test the generalization ability of the strategy.
[Trading Period]
30 minutes
[Trading Leverage]
10 ☓

[Backtesting Time]
Time: 2021/07/18 - 2021/09/13 (SOL)
Time: 2021/07/18 - 2021/09/13(BTC)

[Trading Logic]
It is assumed that there is a momentum effect in the price of coins invested and the entry point is targeted according to three ROC indicators in different periods. Buy when each of the three ROC indicators meets the set parameters, and sell when a single ROC indicator meets one of the parameters.

[Parameter Settings]
The strategy involves three ROC indicators with different periods and 7 parameters. When the entry point is targeted, the three indicators are necessary, with their time frames 24, 12 and 6, as well as the breakout parameters 4, 2, and 1 respectively. When targeting a selling point, you can adopt a ROC indicator with a period of 24 and sell when it falls below -1.
Time Frame: 24, 12, 6
Entry: 4, 2, 1
Exit: -1

[Backtest Results]
For SOL:


The strategy boasts good performance on SOL on the backtesting interval, with a cumulative return of 4,189.19% and a max drawdown of 5.92%.

For BTC:


As you can see, the strategy which is applied to BTC without any parameter optimization still works great.

Note: The above strategies are for learning purposes only, and do not constitute any investment advice. No promise on any investment gains, please exercise your caution before investment.

Unbox Your Luck and Get a $6666 Prize
Register Now
Claim 20 Points now
New User Exclusive: complete 2 steps to claim Points immediately!

🔑 Register an account with Gate.io

👨‍💼 Complete KYC within 24 hours

🎁 Claim Points Rewards

Claim now
Language and Region
Exchange Rate
Go to Gate.TR?
Gate.TR is online now.
You can click and go to Gate.TR or stay at Gate.io.