c_rsi_14d_dividend_and_split_adjusted#
- c_rsi_14d_dividend_and_split_adjusted(m_close_dividend_and_split_adjusted)[source]
Calculate the 14-day relative strength index (RSI) for dividend-and-split-adjusted close prices.
- Parameters:
m_close_dividend_and_split_adjusted (DataColumn) – The adjusted close prices.
- Returns:
The 14-day relative strength index.
- Return type:
Notes
The RSI is computed as:
\[\mathrm{RSI}_{14} = 100 - \frac{100}{1 + \dfrac{\mathrm{Average\ Gain}}{\mathrm{Average\ Loss}}}\]In Excel, assuming your adjusted close prices are in column A starting at cell A2:
In cell B3, enter:
=MAX(A3 - A2, 0)
and drag down to compute daily gains.
In cell C3, enter:
=MAX(A2 - A3, 0)
and drag down to compute daily losses.
In cell D16, enter:
=AVERAGE(B3:B16)
to compute the 14-day average gain.
In cell E16, enter:
=AVERAGE(C3:C16)
to compute the 14-day average loss.
In cell F16, enter:
=100 - (100 / (1 + (D16 / E16)))
to compute the 14-day RSI.