This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
def rsi(ohlc: pd.DataFrame, period: int = 14) -> pd.Series: | |
"""See source https://github.com/peerchemist/finta | |
and fix https://www.tradingview.com/wiki/Talk:Relative_Strength_Index_(RSI) | |
Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. | |
RSI oscillates between zero and 100. Traditionally, and according to Wilder, RSI is considered overbought when above 70 and oversold when below 30. | |
Signals can also be generated by looking for divergences, failure swings and centerline crossovers. |