-
Notifications
You must be signed in to change notification settings - Fork 0
RS ratio and Momentum calculations
Knowing how the formula works, helps to understand and interpret the values on the RRG charts.
I used ChatGPT and this article on Z-score to understand the formula.
The formula itself was picked from An0n1mity/RRGPy.
Relative strength measures the stock's performance in comparison to a benchmark index like NIFTY 50
.
A rising RS indicates the stock is outperforming the Index and and a declining RS shows under performance.
The Relative strength of a stock is determined by dividing the stock price with the benchmark index.
Multiplying the result by 100, gives a percentage measure.
The first part, subtracts the RS from it moving average (14 periods by default). This measures how the RS performs against its average. A positive value indicates the RS is above average and vice versa.
The second part, divides the resulting value with the standard deviation of RS.
The result is a multiple of the Std.Dev. (How many standard deviations is the RS from its average.). Values can be above or below 0.
The final step adds 100 to serve as a baseline. All values are now above or below 100.
RS Momentum uses Rate Of Change (ROC) of RS as the basis for calculations.
ROC measures the rate at which the RS ratio changes over time. (How fast is the RS ratio increasing or decreasing)
In RRG-Lite, the RS is compared against its value 52 week prior to determine rate of change.
The first part, RS ratio is divided by its value from a previous period. This compares the current RS ratio to its old value.
- A positive value indicates an increase and vice versa.
- An unchanged RS ratio will result in 1. We correct this in the next step.
The second part, reduces 1 and normalizes the values. If the RS ratio is unchanged, the result in 1. Reducing 1 makes it 0. All values are now centered around 0.
The final part, converts the result into a percentage change relative to the old value.
To calculate the momentum value, we apply the same earlier Z-score standardization formula.
To summarize, both the RS ratio and RS momentum are multiples of Standard deviation.
Both indicate how far the values have deviated from their average.
.