pvi#
- pvi(close, volume, length=None, initial=None, offset=None, **kwargs)[source]#
Positive Volume Index (PVI)
The Positive Volume Index is a cumulative indicator that uses volume change in an attempt to identify where smart money is active. Used in conjunction with NVI.
- Sources:
- Calculation:
- Default Inputs:
length=1, initial=1000
ROC = Rate of Change
roc = ROC(close, length) signed_volume = signed_series(volume, initial=1) pvi = signed_volume[signed_volume > 0].abs() * roc_ pvi.fillna(0, inplace=True) pvi.iloc[0]= initial pvi = pvi.cumsum()
- Args:
close (pd.Series): Series of ‘close’s volume (pd.Series): Series of ‘volume’s length (int): The short period. Default: 13 initial (int): The short period. Default: 1000 offset (int): How many periods to offset the result. Default: 0
- Kwargs:
fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method
- Returns:
pd.Series: New feature generated.