Financial Time Series Toolbox    

Relative Strength Index (RSI)

The Relative Strength Index (RSI) is a momentum indicator that measures an equity's price relative to itself and its past performance. The function name is rsindex.

The rsindex function needs a series that contains the closing price of a stock. The default period length for the RSI calculation is 14 periods. This length can be changed by providing a second input argument to the function. Similar to the previous commands, if your closing price series is not named Close, you can provide the correct name.

Calculate and plot the RSI for IBM along with the price range using these commands:

Figure 3-3, Relative Strength Index (RSI) and IBM Stock Prices shows the resulting figure.

Figure 3-3: Relative Strength Index (RSI) and IBM Stock Prices


  William's %R On-Balance Volume (OBV)