API documentation for pandas_ta.momentum.roc Python function.
- roc(close, length=None, scalar=None, talib=None, offset=None, **kwargs)#
Rate of Change (ROC)
Rate of Change is an indicator is also referred to as Momentum (yeah, confusingly). It is a pure momentum oscillator that measures the percent change in price with the previous price ‘n’ (or length) periods ago.
- Default Inputs:
MOM = Momentum ROC = 100 * MOM(close, length) / close.shift(length)
close (pd.Series): Series of ‘close’s length (int): It’s period. Default: 1 scalar (float): How much to magnify. Default: 100 talib (bool): If TA Lib is installed and talib is True, Returns the TA Lib
version. Default: True
offset (int): How many periods to offset the result. Default: 0
fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method
pd.Series: New feature generated.