Can any mathematically inclined trader explain how RSI calculations work with ALL consecutive down days within the defined period (i.e. No Up days during test period). Seems like you would get RSI=0, but that does not happen with TradeStation platform or at Stockcharts.com.
Below is how 5 day RSI is calculated with both Up and Down days within sample period. However, with RSI = 100.0 - (100.0 / (1.0+RS)) and RS = SUM_GAINS / SUM_LOSSES. When there are NO Up days(no gains) then SUM_GAINS=0, which should make RS=0, and thus RSI=0. But on a series of ONLY Down days, (or ONLY Up days) within the defined period, there are NON-ZERO RSI values generated on sources such as TradeStation and Stockcharts.com.
Why are non-zero RSI values generated with All consecutive DOWN days within the defined period(or ALL UP days)?
RSI Formula
-------
SUM_GAINS = sum of gains over last D days (including today).
SUM_LOSSES = sum of losses over last D days (including today).
RS = SUM_GAINS / SUM_LOSSES
RSI = 100.0 - (100.0 / (1.0+RS))
5-Day RSI Example
-----------------
Date Gain Loss
---- ---- ----
01/03/89 1.1% 0.0%
01/04/89 0.5% 0.0%
01/05/89 0.0% 0.9%
01/06/89 1.3% 0.0%
01/07/89 0.0% 1.5%
SUM_GAINS = 0.58%
SUM_LOSSES = 0.48%
RS = 1.21
RSI = 54.75
Below is how 5 day RSI is calculated with both Up and Down days within sample period. However, with RSI = 100.0 - (100.0 / (1.0+RS)) and RS = SUM_GAINS / SUM_LOSSES. When there are NO Up days(no gains) then SUM_GAINS=0, which should make RS=0, and thus RSI=0. But on a series of ONLY Down days, (or ONLY Up days) within the defined period, there are NON-ZERO RSI values generated on sources such as TradeStation and Stockcharts.com.
Why are non-zero RSI values generated with All consecutive DOWN days within the defined period(or ALL UP days)?
RSI Formula
-------
SUM_GAINS = sum of gains over last D days (including today).
SUM_LOSSES = sum of losses over last D days (including today).
RS = SUM_GAINS / SUM_LOSSES
RSI = 100.0 - (100.0 / (1.0+RS))
5-Day RSI Example
-----------------
Date Gain Loss
---- ---- ----
01/03/89 1.1% 0.0%
01/04/89 0.5% 0.0%
01/05/89 0.0% 0.9%
01/06/89 1.3% 0.0%
01/07/89 0.0% 1.5%
SUM_GAINS = 0.58%
SUM_LOSSES = 0.48%
RS = 1.21
RSI = 54.75