거래기술에 관한 정보

RSI Calculation(RSI 계산)

효성공인 2020. 12. 19. 16:35

RSI Calculation(RSI 계산)

You are in Technical Analysis»Relative Strength Index (RSI)

기술 분석 → 상대 강도 지수(RSI)에 있습니다.

 

This page is a detailed guide how to calculate Relative Strength Index (RSI). You can see how the formulas work in Excel in the RSI Excel Calculator. The calculation is explained in detail in chapter 4 of the calculator’s guide.

 

이 페이지에서는 상대 강도 지수(RSI)를 계산하는 방법에 대해 자세히 설명합니다. RSI Excel Calculator에서 Excel의 공식 작동 방식을 확인할 수 있습니다. 계산은 계산기 안내서의 4장에 자세히 설명되어 있다.

 

RSI Calculation Formula
RSI 계산식

 

RSI = 100 – 100 / ( 1 + RS )

RS = Relative Strength( 상대 강도)= AvgU / AvgD

 

AvgU = average of all up moves in the last N price bars

AvgD = average of all down moves in the last N price bars

AvgU = 마지막 N개 가격대의 모든 상승 평균
AvgD = 마지막 N개 가격대에서의 모든 하락 이동의 평균

 

N = the period of RSI

N = RSI 기간

There are 3 different commonly used methods for the exact calculation of AvgU and AvgD (see details below)

AvgU 및 AvgD의 정확한 계산을 위해 일반적으로 사용되는 세 가지 방법이 있습니다(아래 세부 정보 참조).

 

RSI Calculation Step by Step

RSI 단계별 계산

 

Calculate up moves and down moves (get U and D)

위쪽 및 아래쪽 이동 계산(U 및 D 가져오기)

Average the up moves and down moves (get AvgU and AvgD)

위/아래 이동 평균(GetAvgU 및 AvgD)

Calculate Relative Strength (get RS)

상대 강도 계산(RS 가져오기)

Calculate the Relative Strength Index (get RSI)

상대 강도 지수 계산(RSI 가져오기)

Step 1: Calculating Up Moves and Down Moves

1단계: 위로 이동 및 아래로 이동 계산

 

We’ll illustrate the calculation of RSI on the example of the most common period, 14. .).

가장 일반적인 기간의 예인 14에 대한 RSI 계산을 보여드리겠습니다.

For RSI calculation you need closing prices of the last 15 days (for RSI with a period of 10, you need the last 11 closing prices etc)

RSI 계산의 경우 최근 15일 동안의 마감 가격이 필요합니다. (기간 10의 RSI의 경우 최근 11일 마감 가격 등이 필요함).

 

Let’s start with calculating the up moves and down moves in the last 14 days (or 14 price bars in general).

지난 14일(또는 일반적으로 14개의 가격 막대) 동안 상승 및 하강 이동을 계산하는 것부터 시작해 보겠습니다.

 

First, calculate the bar-to-bar changes for each bar: Change = Closet – Closet-1

먼저 각 막대에 대한 막대 간 변경 사항을 계산합니다. Change = Closet – Closet-1
For each bar, up move (U) equals:
각 막대에 대해 상향 이동(U)은 다음과 같습니다.

 

Closet – Closet-1 if the price change is positive

마감 – 마감-1 가격 변화가 긍정적인 경우

Zero if the price change is negative or zero
가격 변화가 음수이거나 0인 경우 0

 

Down move (D) equals:

하향 이동(D)은 다음과 같습니다.

 

The absolute value of Closet – Closet-1 if the price change is negative

Closet의 절대값 – Closet-1 가격변동이 음수인 경우

Zero if the price change is positive or zero
가격 변화가 긍정적이거나 0인 경우 0

 

These up and down moves are calculated in columns C and D in the RSI Calculator.

위와 아래로 이동은 RSI 계산기의 C열과 D열로 계산됩니다.

Now you have the first important input for the RSI formula, the increases and declines in the last N days (with N being the RSI period). The next step is to average them.

이제 RSI 공식에 대한 첫 번째 중요한 입력이 있습니다. 지난 N일 동안의 증가 및 감소(N은 RSI 기간임). 다음 단계는 평균을 내는 것입니다

 

Step 2: Averaging the Advances(상승) and Declines
2단계: 진전(상승)과 하락의 평균 산출

 

Three different approaches are commonly used. They differ in the way how average up and down moves are calculated:

일반적으로 세 가지 다른 접근법이 사용됩니다. 평균 상승 및 하강 이동 계산 방법은 서로 다릅니다.

 

Simple Moving Average

단순 이동 평균

Exponential Moving Average

지수 이동 평균

Wilder’s Smoothing Method
와일더 스무딩 방법

 

Simple Moving Average

단순 이동 평균

Under this method, which is the most straightforward(가장 쉬운), AvgU and AvgD are calculated as simple moving averages:

가장 간단한(쉬운) 이 방법에서, AvgU와 AvgD는 단순 이동 평균으로 계산됩니다.

Average UP = sum of all up moves (U) in the last N bars divided by N

마지막 N개 막대의 모든 상승 이동(U)을 N으로 나눈 값

Average Down = sum of all down moves (D) in the last N bars divided by N

AvgD = 마지막 N개 막대에서 모든 하향 이동(D)을 N으로 나눈 합계

N = RSI period

N = RSI 기간

Exponential Moving Average

지수 이동 평균

Here AvgU and AvgD are calculated from up moves and down moves using an exponential moving average in the same way as you would calculate an EMA of price.

여기서 AverageUP 및 AverageDown은 가격 EMA를 계산하는 것과 동일한 방식으로 지수 이동 평균을 사용하여 위 아래 이동으로부터  계산됩니다.

The EMA period is the RSI period. (  EMA 기간은 RSI 기간입니다

 

   The formula is: 공식은

AverageUp time = αX Up time  + ( 1 – α ) Average Up time-1

평균 상승기간 =@ X 상승시간 + (1 – α) 평균상승 시간-1

Average Down time = α X Down time + ( 1 – α ) * Average Down time-1
평균 다운타임 = α X 다운타임 + (1 –α ) * 평균 다운타임-1

α = 2 / ( N;기간+ 1 )

N = RSI period(RSI 기간)

 

Wilder’s Smoothing Method

와일더 스무딩 방법

 

J. Welles Wilder, the inventor of RSI, calculated the indicator using a smoothing method with the same logic as an exponential moving average, only the smoothing factor is different:

RSI의 개발자인 J. Welles Wilder는 지수 이동 평균과 동일한 논리로 평활화 방법을 사용하여 지표가 계산되었지만 평활요소만 다릅니다

α = 1 / N(α =2 / ( N;기간+ 1 :지수이동평균) 

and therefore 1 – α = ( N – 1 ) / N

따라서 1 – α = ( N – 1 ) / N

N = RSI period(RSI 기간

 

For example, for RSI 14 the formula for average up move is:

예를 들어, RSI 14의 경우 평균 상승 공식은

Average UPtime = 1/14X Up time + 13/14 * Average UP time-1

평균 UP 시간 × 1/14X Up 시간 + 13/14 * 평균 UP 시간

 

You will find the logic of these calculations is very similar to the calculation of Average True Range (ATR), another indicator invented by J. Welles Wilder.

이러한 계산의 논리는 J. Welles Wilder가 개발한 또 다른 지표인 평균 참 범위(ATR) 계산과 매우 유사하다는 것을 알게 될 것입니다.

 

Step 3: Calculating Relative Strength

3단계: 상대 강도 계산

 

Now as you have the average up move (AvgU) and average down move (AvgD) in the last 14 price bars, the next step is to calculate Relative Strength, which is defined as the ratio of average up moves and average down moves.

이제 마지막 14개 가격 막대에 평균 상승(AvgU) 및 평균 하강(AvgD)이 있으므로 다음 단계에서는 상대 강도를 계산합니다. 상대 강도는 평균 상승과 평균 하강 이동의 비율로 정의됩니다.

RS = AverageUP / Average Down

 

Step 4: Calculating the Relative Strength Index (RSI)

4단계: 상대 강도 지수(RSI) 계산

 

Finally, we know the Relative Strength and we can apply the whole RSI formula:

마지막으로 Relative Strength를 알고 전체 RSI 공식을 적용할 수 있습니다.

 

RSI = 100 – 100 / ( 1 + RS)

 

Lowest Possible RSI Value

가장 낮은 가능한 RSI 값

 

What situation in the market would give us the lowest possible RSI value? A totally bearish market, of course. Imagine that every single day the market closed lower than the day before. There would be no up days(상승일) (all the UPs in the last N bars would be zero). Averae U would be zero (for SMA method immediately after N bars, for EMA and Wilder’s methods it would gradually approach zero with each bar if there had been non-zero UP's before). The average decline (AvgD), on the other hand, would be some positive number (as you take absolute values when calculating the RSI). Relative Strength would be zero divided by something positive, which gives us zero. The RSI would be zero:

시장의 어떤 상황이 우리에게 가능한 가장 낮은 RSI 값을 제공할까요? 물론 완전히 약세장이다. 매일 시장이 전날보다 낮게 마감되었다고 상상해 보십시오. 가동일 (상승일)이 없습니다 (마지막 N 막대의 모든 UP이 0이됩니다). Averae UP은 0입니다 (N 막대 바로 뒤에 있는 SMA 방법의 경우, EMA 및 Wilder의 방법의 경우 이전에 0이 아닌 UP이 있었던 경우 각 막대에서 점차 0에 접근합니다). 반면에 평균 하락 (평균 하락)은 양수입니다 (RSI를 계산할 때 절대 값을 사용하므로). 상대 강도는 0을 양의 값으로 나눈 값으로 0이됩니다. RSI는 0이됩니다.

 

RSI = 100 – 100 / ( 1 + 0 ) = 100 – 100 = 0

 

Highest Possible RSI Value

가능한 최대 RSI 값

 

What situation in the market would give us the maximum possible RSI value? This would be a totally bullish market with no down days. Average Down would be zero, AverageUP some positive number. Relative Strength would be something positive divided by zero. Mathematically, you can’t calculate this – in this case the RSI value is defined as 100. If the average decline would be some very low number, but not zero, Relative Strength would be close to infinite and the RSI would be close to 100:

시장의 어떤 상황이 우리에게 가능한 최대 RSI 값을 제공할까요? 이것은 다운데이가 없는 완전히  강세 시장이 될 것입니다. Average Down은 0이고 AverageUP는 양수입니다. 상대 강도는 양수를 0으로 나눈 값입니다. 수학적으로 이를 계산할 수 없습니다.(무한대임으로)이 경우 RSI 값은 100으로 정의됩니다. 평균 감소가 매우 낮은 숫자이지만 0은 아니며  Relative Strength는 무한에 가깝고 RSI는 100에 가깝습니다. :

RSI = 100 – 100 / ( 1 + a big number ) = 100 – 0 = 100

 

To conclude, RSI can reach values from 0 (bearish market) to 100 (bullish market).

결론적으로, RSI는 0(약세 시장)에서 100(불황 시장)까지의 값에 도달할 수 있습니다.

 

Comparing the Calculation Methods
계산 방법 비교

 

The three calculation methods often give quite different results. While different traders have different preferences, most would agree that being consitent and sticking with one method (rather than jumping from one to another) is more important than which of the methods you choose (this also applies to RSI period length).

세 가지 계산 방법은 종종 상당히 다른 결과를 제공합니다. 서로 다른 거래자가 선호하는 방식이 다르지만, 대부분의 거래자는 한 방법에서 다른 방법으로의 전환보다는 한 방법을 고수하고 집착하는 것이 어떤 방법을 선택하는 것보다 더 중요하다는 데 동의합니다(이 방법은 RSI 기간 길이에도 적용됨).

 

The RSI Calculator allows you to put up to 3 different RSI indicators on the chart at the same time, so you can compare how different settings looks in the same situation (for actual trading it is better to use just one, maybe two indicators simultaneously). Further explanation of RSI calculation methods and practical use is available in the calculator’s guide.

RSI 계산기를 사용하면 동시에 차트에 최대 3개의 RSI 표시기를 표시할 수 있으므로 동일한 상황에서 서로 다른 설정이 어떻게 표시되는지 비교할 수 있습니다(실제 거래의 경우 한 개 또는 두 개의 표시기를 동시에 사용하는 것이 좋습니다). RSI 계산 방법과 실제 사용에 대한 자세한 설명은 계산기 가이드를 참조하십시오.