Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Relative strength index
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Calculation== For each trading period an upward change ''U'' or downward change ''D'' is calculated. Up periods are characterized by the close being higher than the previous close: :<math>U = \text{close}_\text{now} - \text{close}_\text{previous}</math> :<math>D = 0</math> Conversely, a down period is characterized by the close being lower than the previous period's close, :<math> U = 0</math> :<math> D = \text{close}_\text{previous} - \text{close}_\text{now}</math> If the last close is the same as the previous, both ''U'' and ''D'' are zero. Note that both U and D are nonnegative numbers. Averages are now calculated from sequences of such ''U'' and ''D'', using an ''n''-period [[Moving average#Modified moving average|smoothed or modified moving average]] (SMMA or MMA), which is the [[Exponential smoothing|exponentially smoothed]] moving average with ''Ξ± = 1 / n''. Those are positively weighted averages of those positive terms, and behave additively with respect to the partition. Wilder originally formulated the calculation of the moving average as: ''newval = (prevval * (n - 1) + newdata) / n'', which is equivalent to the aforementioned exponential smoothing. So new data is simply divided by ''n'', or multiplied by ''Ξ±'' and previous average values are modified by ''(n - 1) / n'', i.e. ''1 - Ξ±''. Some commercial packages, like AIQ, use a standard [[Moving average#Exponential moving average|exponential moving average]] (EMA) as the average instead of Wilder's SMMA. The smoothed moving averages should be appropriately initialized with a simple moving average using the first ''n'' values in the price series. The ratio of these averages is the ''relative strength'' or ''relative strength factor'': :<math>\text{RS} = \frac{\text{SMMA}(U,n)}{\text{SMMA}(D,n)}</math> The relative strength factor is then converted to a relative strength index between 0 and 100:<ref name=wilder/> :<math> \text{RSI} = 100\cdot\left(1 - \frac{\text{SMMA}(D,n)}{\text{SMMA}(U,n) + \text{SMMA}(D,n)}\right) = 100 - { 100 \over {1 + \text{RS}} } </math> If the average of ''U'' values is zero, both RS and RSI are also zero. If the average of ''U'' values equals the average of ''D'' values, the RS is 1 and RSI is 50. If the average of ''U'' values is maximal, so that the average of ''D'' values is zero, then the RS value diverges to infinity, while the RSI is 100.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)