# How to calculate the JdK RS-Ratio

Anyone have a clue how to calculate the JdK RS-Ratio?

Let's say I want to compare the Relative strength for these:

• EWA iShares MSCI Australia Index Fund

• EWC iShares MSCI Canada Index Fund

• EWD iShares MSCI Sweden Index Fund

• EWG iShares MSCI Germany Index Fund

• EWH iShares MSCI Hong Kong Index Fund

• EWI iShares MSCI Italy Index Fund

• EWJ iShares MSCI Japan Index Fund

• EWK iShares MSCI Belgium Index Fund

• EWL iShares MSCI Switzerland Index Fund

• EWM iShares MSCI Malaysia Index Fund

• EWN iShares MSCI Netherlands Index Fund

• EWO iShares MSCI Austria Index Fund

• EWP iShares MSCI Spain Index Fund

• EWQ iShares MSCI France Index Fund

• EWS iShares MSCI Singapore Index Fund

• EWU iShares MSCI United Kingdom Index Fund

• EWW iShares MSCI Mexico Index Fund

• EWT iShares MSCI Taiwan Index Fund

• EWY iShares MSCI South Korea Index Fund

• EWZ iShares MSCI Brazil Index Fund

• EZA iShares MSCI South Africa Index Fund

Each of them should be compared to the SP500 (SPY index). Calculate the relative strength of each of them to SPY and have it normalized (I think it is the only solution)  • Anyone have an idea how the formula could look like? – Isak La Fleur Jun 4 '15 at 1:34
• I know the formula exactly. I can give you a preview if you interested. – kafir harbi Jan 5 '17 at 8:37
• This is not a good answer. The OP is obviously interested in how the formula looks like. Otherwise he/she wouldn't have asked. Telling him/her that you know it without actually giving any explanations doesn't help. – LocalVolatility Jan 5 '17 at 9:02
• Can you explain a little bit more, for the details ? – EES88899 Nov 18 '19 at 17:53

Reading what I have, I can only offer a guess.

1: Let's say you're looking at 9 sectors compared to \$SPX on a daily chart. Foreach sector, compute relative closing price: 100 * Sector/\$SPX

2: It looks like the RS-Ratio is averaged over 14 periods. I say 14 because stockcharts.com shows RS-Ratio peaking after a lag (2-3wks), despite price peaking 2-3 weeks earlier. I use 14 because that's a common number in TA.

3: RS-Momentum looks like it's simply the rate-of-change of the calculation in #1. Indeed, stockcharts.com says exactly this: "RS-Momentum is an indicator that measures the momentum (rate-of-change) of RS-Ratio."

4: When they talk about normalizing, compute the mean & stddev of the 9 calculations in #1, then normalize as ... 100 * ((value-mean)/stddev + 1). I would guess that these values are "normalized" per day. I would guess that a separate normalization would be required for the values from #3 as well.

That's how I would approach the problem.

I consulted: http://stockcharts.com/school/doku.php?st=rrg&id=chart_school:technical_indicators:rrg_relative_strength in formulating my response, and I've had a few months to sleep on it.

I think the normalisation step is incorrect. Since we would like have 100 as our baseline, it should be 100 + ((value-mean)/stddev + 1). Then we get fairly realistic results. See the following Python function (code review welcome):

def rs_ratio(prices_df, benchmark, window=10):
from numpy import mean, std
for series in prices_df:
rs = (prices_df[series].divide(benchmark)) * 100
rs_ratio = rs.rolling(window).mean()
rel_ratio = 100 + ((rs_ratio - rs_ratio.mean()) / rs_ratio.std() + 1)
prices_df[series] = rel_ratio
prices_df.dropna(axis=0, how='all', inplace=True)
return prices_df


It looks just like a 10 period and 30 period simple moving average crossover (ie PPO using simple moving averages)