ppo#
- ppo(close, fast=None, slow=None, signal=None, scalar=None, mamode=None, talib=None, offset=None, **kwargs)[source]#
Percentage Price Oscillator (PPO)
The Percentage Price Oscillator is similar to MACD in measuring momentum.
- Sources:
https://www.tradingview.com/wiki/MACD_(Moving_Average_Convergence/Divergence)
- Calculation:
- Default Inputs:
fast=12, slow=26
SMA = Simple Moving Average EMA = Exponential Moving Average fast_sma = SMA(close, fast) slow_sma = SMA(close, slow) PPO = 100 * (fast_sma - slow_sma) / slow_sma Signal = EMA(PPO, signal) Histogram = PPO - Signal
- Args:
close(pandas.Series): Series of ‘close’s fast(int): The short period. Default: 12 slow(int): The long period. Default: 26 signal(int): The signal period. Default: 9 scalar (float): How much to magnify. Default: 100 mamode (str): See
`help(ta.ma)`
. Default: ‘sma’ talib (bool): If TA Lib is installed and talib is True, Returns the TA Libversion. Default: True
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.DataFrame: ppo, histogram, signal columns