From 140ad834b3c5f0fc2b8faba65b73cbc6fab77df2 Mon Sep 17 00:00:00 2001 From: ryan russell Date: Sun, 30 Jan 2022 23:29:29 -0600 Subject: [PATCH] docstring google format compliance --- pandas_ta/candles/cdl_pattern.py | 15 +++++++++------ pandas_ta/momentum/apo.py | 2 +- pandas_ta/momentum/bias.py | 2 +- pandas_ta/momentum/dm.py | 2 +- pandas_ta/momentum/inertia.py | 2 +- pandas_ta/momentum/ppo.py | 2 +- pandas_ta/momentum/qqe.py | 2 +- pandas_ta/momentum/stoch.py | 2 +- pandas_ta/momentum/stochf.py | 2 +- pandas_ta/momentum/stochrsi.py | 2 +- pandas_ta/momentum/tsi.py | 2 +- pandas_ta/overlap/hilo.py | 2 +- pandas_ta/overlap/kama.py | 2 +- pandas_ta/overlap/smma.py | 2 +- pandas_ta/trend/adx.py | 2 +- pandas_ta/trend/amat.py | 6 +++--- pandas_ta/trend/long_run.py | 2 +- pandas_ta/trend/short_run.py | 6 +++--- pandas_ta/trend/tsignals.py | 8 +++++--- pandas_ta/trend/xsignals.py | 22 ++++++++++++++-------- pandas_ta/utils/data/polygon_api.py | 2 +- pandas_ta/volatility/accbands.py | 2 +- pandas_ta/volatility/atr.py | 2 +- pandas_ta/volatility/bbands.py | 2 +- pandas_ta/volatility/kc.py | 2 +- pandas_ta/volatility/natr.py | 2 +- pandas_ta/volatility/rvi.py | 2 +- pandas_ta/volatility/thermo.py | 2 +- pandas_ta/volume/aobv.py | 4 ++-- pandas_ta/volume/efi.py | 2 +- pandas_ta/volume/kvo.py | 2 +- pandas_ta/volume/wb_tsv.py | 2 +- 32 files changed, 62 insertions(+), 51 deletions(-) diff --git a/pandas_ta/candles/cdl_pattern.py b/pandas_ta/candles/cdl_pattern.py index 97a6ed0..4a89b77 100644 --- a/pandas_ta/candles/cdl_pattern.py +++ b/pandas_ta/candles/cdl_pattern.py @@ -33,14 +33,17 @@ def cdl_pattern( Examples: - Get all candle patterns (This is the default behaviour) - >>> df = df.ta.cdl_pattern(name="all") + Get all candle patterns (This is the default behaviour):: - Get only one pattern - >>> df = df.ta.cdl_pattern(name="doji") + df = df.ta.cdl_pattern(name="all") - Get some patterns - >>> df = df.ta.cdl_pattern(name=["doji", "inside"]) + Get only one pattern:: + + df = df.ta.cdl_pattern(name="doji") + + Get some patterns:: + + df = df.ta.cdl_pattern(name=["doji", "inside"]) Args: open_ (pd.Series): Series of 'open's diff --git a/pandas_ta/momentum/apo.py b/pandas_ta/momentum/apo.py index 86c0153..9f6f4f2 100644 --- a/pandas_ta/momentum/apo.py +++ b/pandas_ta/momentum/apo.py @@ -23,7 +23,7 @@ def apo( close (pd.Series): Series of 'close's fast (int): The short period. Default: 12 slow (int): The long period. Default: 26 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' 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 diff --git a/pandas_ta/momentum/bias.py b/pandas_ta/momentum/bias.py index e0e1a97..05a1887 100644 --- a/pandas_ta/momentum/bias.py +++ b/pandas_ta/momentum/bias.py @@ -19,7 +19,7 @@ def bias( Args: close (pd.Series): Series of 'close's length (int): The period. Default: 26 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/momentum/dm.py b/pandas_ta/momentum/dm.py index ddb34fc..a42852a 100644 --- a/pandas_ta/momentum/dm.py +++ b/pandas_ta/momentum/dm.py @@ -23,7 +23,7 @@ def dm( Args: high (pd.Series): Series of 'high's low (pd.Series): Series of 'low's - mamode (str): See ```help(ta.ma)```. Default: 'rma' + mamode (str): See ``help(ta.ma)``. Default: 'rma' talib (bool): If TA Lib is installed and talib is True, Returns the TA Lib version. Default: True drift (int): The difference period. Default: 1 diff --git a/pandas_ta/momentum/inertia.py b/pandas_ta/momentum/inertia.py index ca707ce..201627f 100644 --- a/pandas_ta/momentum/inertia.py +++ b/pandas_ta/momentum/inertia.py @@ -31,7 +31,7 @@ def inertia( rvi_length (int): RVI period. Default: 14 refined (bool): Use 'refined' calculation. Default: False thirds (bool): Use 'thirds' calculation. Default: False - mamode (str): See ```help(ta.ma)```. Default: 'ema' + mamode (str): See ``help(ta.ma)``. Default: 'ema' drift (int): The difference period. Default: 1 offset (int): How many periods to offset the result. Default: 0 diff --git a/pandas_ta/momentum/ppo.py b/pandas_ta/momentum/ppo.py index 4e8cab1..f2c0381 100644 --- a/pandas_ta/momentum/ppo.py +++ b/pandas_ta/momentum/ppo.py @@ -23,7 +23,7 @@ def ppo( 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' + mamode (str): See ``help(ta.ma)``. Default: 'sma' 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 diff --git a/pandas_ta/momentum/qqe.py b/pandas_ta/momentum/qqe.py index 5e4d667..3491d9f 100644 --- a/pandas_ta/momentum/qqe.py +++ b/pandas_ta/momentum/qqe.py @@ -28,7 +28,7 @@ def qqe( length (int): RSI period. Default: 14 smooth (int): RSI smoothing period. Default: 5 factor (float): QQE Factor. Default: 4.236 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' drift (int): The difference period. Default: 1 offset (int): How many periods to offset the result. Default: 0 diff --git a/pandas_ta/momentum/stoch.py b/pandas_ta/momentum/stoch.py index f35d944..9752026 100644 --- a/pandas_ta/momentum/stoch.py +++ b/pandas_ta/momentum/stoch.py @@ -33,7 +33,7 @@ def stoch( k (int): The Fast %K period. Default: 14 d (int): The Slow %D period. Default: 3 smooth_k (int): The Slow %K period. Default: 3 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' 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 diff --git a/pandas_ta/momentum/stochf.py b/pandas_ta/momentum/stochf.py index 7e5c5bc..224b7e8 100644 --- a/pandas_ta/momentum/stochf.py +++ b/pandas_ta/momentum/stochf.py @@ -26,7 +26,7 @@ def stochf( close (pd.Series): Series of 'close's k (int): The Fast %K period. Default: 14 d (int): The Slow %D period. Default: 3 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' 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 diff --git a/pandas_ta/momentum/stochrsi.py b/pandas_ta/momentum/stochrsi.py index e0e3628..008aeca 100644 --- a/pandas_ta/momentum/stochrsi.py +++ b/pandas_ta/momentum/stochrsi.py @@ -30,7 +30,7 @@ def stochrsi( rsi_length (int): RSI period. Default: 14 k (int): The Fast %K period. Default: 3 d (int): The Slow %K period. Default: 3 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/momentum/tsi.py b/pandas_ta/momentum/tsi.py index 9b4a2dd..ece45f3 100644 --- a/pandas_ta/momentum/tsi.py +++ b/pandas_ta/momentum/tsi.py @@ -26,7 +26,7 @@ def tsi( signal (int): The signal period. Default: 13 scalar (float): How much to magnify. Default: 100 mamode (str): Moving Average of TSI Signal Line. - See ```help(ta.ma)```. Default: 'ema' + See ``help(ta.ma)``. Default: 'ema' drift (int): The difference period. Default: 1 offset (int): How many periods to offset the result. Default: 0 diff --git a/pandas_ta/overlap/hilo.py b/pandas_ta/overlap/hilo.py index ad292bf..1ce8676 100644 --- a/pandas_ta/overlap/hilo.py +++ b/pandas_ta/overlap/hilo.py @@ -33,7 +33,7 @@ def hilo( close (pd.Series): Series of 'close's high_length (int): It's period. Default: 13 low_length (int): It's period. Default: 21 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/overlap/kama.py b/pandas_ta/overlap/kama.py index fe734c3..450deef 100644 --- a/pandas_ta/overlap/kama.py +++ b/pandas_ta/overlap/kama.py @@ -27,7 +27,7 @@ def kama( length (int): It's period. Default: 10 fast (int): Fast MA period. Default: 2 slow (int): Slow MA period. Default: 30 - mamode (str): See ```help(ta.ma)```. Valid MAs that support initialize + mamode (str): See ``help(ta.ma)``. Valid MAs that support initialize the first value: 'ema', 'fwma', 'linreg', 'midpoint', 'pwma', 'rma', 'sinwma', 'sma', 'swma', 'trima', 'wma'. Default: 'sma' drift (int): The difference period. Default: 1 diff --git a/pandas_ta/overlap/smma.py b/pandas_ta/overlap/smma.py index f0e8b4f..2bf83bb 100644 --- a/pandas_ta/overlap/smma.py +++ b/pandas_ta/overlap/smma.py @@ -28,7 +28,7 @@ def smma( Args: close (pd.Series): Series of 'close's length (int): It's period. Default: 10 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' 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 diff --git a/pandas_ta/trend/adx.py b/pandas_ta/trend/adx.py index 3669422..fd58cc0 100644 --- a/pandas_ta/trend/adx.py +++ b/pandas_ta/trend/adx.py @@ -27,7 +27,7 @@ def adx( length (int): It's period. Default: 14 lensig (int): Signal Length. Like TradingView's default ADX. Default: length scalar (float): How much to magnify. Default: 100 - mamode (str): See ```help(ta.ma)```. Default: 'rma' + mamode (str): See ``help(ta.ma)``. Default: 'rma' drift (int): The difference period. Default: 1 offset (int): How many periods to offset the result. Default: 0 diff --git a/pandas_ta/trend/amat.py b/pandas_ta/trend/amat.py index 9733a6b..6b7b507 100644 --- a/pandas_ta/trend/amat.py +++ b/pandas_ta/trend/amat.py @@ -14,8 +14,8 @@ def amat( """Archer Moving Averages Trends (AMAT) Archer Moving Averages Trends (AMAT) developed by Kevin Johnson provides - creates both long run ```help(ta.long_run)``` and short run - ```help(ta.short_run)``` trend signals given two moving average speeds, + creates both long run ``help(ta.long_run)`` and short run + ``help(ta.short_run)`` trend signals given two moving average speeds, fast and slow. The long runs and short runs are binary Series where '1' is a trend and '0' is not a trend. @@ -27,7 +27,7 @@ def amat( fast (int): The period of the fast moving average. Default: 8 slow (int): The period of the slow moving average. Default: 21 lookback (int): Lookback period for long_run and short_run. Default: 2 - mamode (str): See ```help(ta.ma)```. Default: 'ema' + mamode (str): See ``help(ta.ma)``. Default: 'ema' offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/trend/long_run.py b/pandas_ta/trend/long_run.py index 717b2a6..4c91482 100644 --- a/pandas_ta/trend/long_run.py +++ b/pandas_ta/trend/long_run.py @@ -22,7 +22,7 @@ def long_run( signals. Sources: - It is part of the Converging and Diverging Conditional logic in: + It is part of the Converging and Diverging Conditional logic in: https://www.tradingview.com/script/Z2mq63fE-Trade-Archer-Moving-Averages-v1-4F/ Args: diff --git a/pandas_ta/trend/short_run.py b/pandas_ta/trend/short_run.py index 9bbe03f..18d063e 100644 --- a/pandas_ta/trend/short_run.py +++ b/pandas_ta/trend/short_run.py @@ -17,12 +17,12 @@ def short_run( It is recommended to use 'smooth' signals for 'fast' and 'slow' for the comparison to reduce unnecessary noise. For indicators using long_run, see - Archer Moving Average Trend (```help(ta.amat)```) and Archer On Balance - Volume (```help(ta.aobv)```). Both use Moving Averages for 'fast' and 'slow' + Archer Moving Average Trend (``help(ta.amat)``) and Archer On Balance + Volume (``help(ta.aobv)``). Both use Moving Averages for 'fast' and 'slow' signals. Sources: - It is part of the Converging and Diverging Conditional logic in: + It is part of the Converging and Diverging Conditional logic in: https://www.tradingview.com/script/Z2mq63fE-Trade-Archer-Moving-Averages-v1-4F/ Args: diff --git a/pandas_ta/trend/tsignals.py b/pandas_ta/trend/tsignals.py index 64dccea..ca94b53 100644 --- a/pandas_ta/trend/tsignals.py +++ b/pandas_ta/trend/tsignals.py @@ -19,10 +19,12 @@ def tsignals( whose values are boolean or integers (0 or 1). Examples: - ta.tsignals(close > ta.sma(close, 50), asbool=False) - ta.tsignals(ta.ema(close, 8) > ta.ema(close, 21), asbool=True) + ta.tsignals(close > ta.sma(close, 50), asbool=False) - Source: Kevin Johnson + ta.tsignals(ta.ema(close, 8) > ta.ema(close, 21), asbool=True) + + Source: + Kevin Johnson Args: trend (pd.Series): Series of 'trend's. The trend can be either a boolean or diff --git a/pandas_ta/trend/xsignals.py b/pandas_ta/trend/xsignals.py index 047065f..5d43cca 100644 --- a/pandas_ta/trend/xsignals.py +++ b/pandas_ta/trend/xsignals.py @@ -29,15 +29,21 @@ def xsignals( False, it does the same but for the short side. Example: - # These are two different outcomes and depends on the indicator and it's - # characteristics. Please check BOTH outcomes BEFORE making an Issue. - rsi = df.ta.rsi() - # Returns tsignal DataFrame when RSI crosses above 20 and then below 80 - ta.xsignals(rsi, 20, 80, above=True) - # Returns tsignal DataFrame when RSI crosses below 20 and then above 80 - ta.xsignals(rsi, 20, 80, above=False) + These are two different outcomes and depends on the indicator and it's + characteristics. Please check BOTH outcomes BEFORE making an Issue:: + + rsi = df.ta.rsi() + + Returns tsignal DataFrame when RSI crosses above 20 and then below 80:: - Source: Kevin Johnson + ta.xsignals(rsi, 20, 80, above=True) + + Returns tsignal DataFrame when RSI crosses below 20 and then above 80:: + + ta.xsignals(rsi, 20, 80, above=False) + + Source: + Kevin Johnson Args: signal (pd.Series): The Signal to compare from. Commonly the 'close'. diff --git a/pandas_ta/utils/data/polygon_api.py b/pandas_ta/utils/data/polygon_api.py index 9279ccc..bbd150e 100644 --- a/pandas_ta/utils/data/polygon_api.py +++ b/pandas_ta/utils/data/polygon_api.py @@ -12,7 +12,7 @@ def polygon_api(ticker: str, **kwargs) -> DataFrame: It returns OCHLV data from polygon (requires a valid subscription of course). To install the `polygon library `__ , use ``pip install polygon``. - You can customize the range of data using kwargs ``from_date``, ``to_date````timespan`` and ``multiplier``. For a + You can customize the range of data using kwargs ``from_date``, ``to_date``, ``timespan`` and ``multiplier``. For a description of these arguments, see `Here `__ diff --git a/pandas_ta/volatility/accbands.py b/pandas_ta/volatility/accbands.py index b72cec3..f83c345 100644 --- a/pandas_ta/volatility/accbands.py +++ b/pandas_ta/volatility/accbands.py @@ -23,7 +23,7 @@ def accbands( close (pd.Series): Series of 'close's length (int): It's period. Default: 10 c (int): Multiplier. Default: 4 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' drift (int): The difference period. Default: 1 offset (int): How many periods to offset the result. Default: 0 diff --git a/pandas_ta/volatility/atr.py b/pandas_ta/volatility/atr.py index 372601e..298d4d1 100644 --- a/pandas_ta/volatility/atr.py +++ b/pandas_ta/volatility/atr.py @@ -24,7 +24,7 @@ def atr( low (pd.Series): Series of 'low's close (pd.Series): Series of 'close's length (int): It's period. Default: 14 - mamode (str): See ```help(ta.ma)```. Default: 'rma' + mamode (str): See ``help(ta.ma)``. Default: 'rma' talib (bool): If TA Lib is installed and talib is True, Returns the TA Lib version. Default: True drift (int): The difference period. Default: 1 diff --git a/pandas_ta/volatility/bbands.py b/pandas_ta/volatility/bbands.py index 352b4bd..b4e635f 100644 --- a/pandas_ta/volatility/bbands.py +++ b/pandas_ta/volatility/bbands.py @@ -23,7 +23,7 @@ def bbands( length (int): The short period. Default: 5 std (int): The long period. Default: 2 ddof (int): Degrees of Freedom to use. Default: 0 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' talib (bool): If TA Lib is installed and talib is True, Returns the TA Lib version. Default: True ddof (int): Delta Degrees of Freedom. diff --git a/pandas_ta/volatility/kc.py b/pandas_ta/volatility/kc.py index 7df2fa2..85539d1 100644 --- a/pandas_ta/volatility/kc.py +++ b/pandas_ta/volatility/kc.py @@ -24,7 +24,7 @@ def kc( close (pd.Series): Series of 'close's length (int): The short period. Default: 20 scalar (float): A positive float to scale the bands. Default: 2 - mamode (str): See ```help(ta.ma)```. Default: 'ema' + mamode (str): See ``help(ta.ma)``. Default: 'ema' offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/volatility/natr.py b/pandas_ta/volatility/natr.py index c20b919..30af53e 100644 --- a/pandas_ta/volatility/natr.py +++ b/pandas_ta/volatility/natr.py @@ -24,7 +24,7 @@ def natr( close (pd.Series): Series of 'close's length (int): The short period. Default: 20 scalar (float): How much to magnify. Default: 100 - mamode (str): See ```help(ta.ma)```. Default: 'ema' + mamode (str): See ``help(ta.ma)``. Default: 'ema' 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 diff --git a/pandas_ta/volatility/rvi.py b/pandas_ta/volatility/rvi.py index acfb429..da895d6 100644 --- a/pandas_ta/volatility/rvi.py +++ b/pandas_ta/volatility/rvi.py @@ -31,7 +31,7 @@ def rvi( refined (bool): Use 'refined' calculation which is the average of RVI(high) and RVI(low) instead of RVI(close). Default: False thirds (bool): Average of high, low and close. Default: False - mamode (str): See ```help(ta.ma)```. Default: 'ema' + mamode (str): See ``help(ta.ma)``. Default: 'ema' offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/volatility/thermo.py b/pandas_ta/volatility/thermo.py index 5259659..fcfc93b 100644 --- a/pandas_ta/volatility/thermo.py +++ b/pandas_ta/volatility/thermo.py @@ -24,7 +24,7 @@ def thermo( length (int): The period. Default: 20 long(int): The buy factor short(float): The sell factor - mamode (str): See ```help(ta.ma)```. Default: 'ema' + mamode (str): See ``help(ta.ma)``. Default: 'ema' drift (int): The diff period. Default: 1 offset (int): How many periods to offset the result. Default: 0 diff --git a/pandas_ta/volume/aobv.py b/pandas_ta/volume/aobv.py index 4226bd4..650e180 100644 --- a/pandas_ta/volume/aobv.py +++ b/pandas_ta/volume/aobv.py @@ -16,7 +16,7 @@ def aobv( Archer On Balance Volume (AOBV) developed by Kevin Johnson provides additional indicator analysis on OBV. It calculates moving averages, default 'ema', of OBV as well as the moving average Long and Short Run Trends, see - ```help(ta.long_run)```. Lastly, the indicator also calculates the rolling + ``help(ta.long_run)``. Lastly, the indicator also calculates the rolling Maximum and Minimum OBV. Sources: @@ -29,7 +29,7 @@ def aobv( slow (int): The period of the slow moving average. Default: 12 max_lookback (int): Maximum OBV bars back. Default: 2 min_lookback (int): Minimum OBV bars back. Default: 2 - mamode (str): See ```help(ta.ma)```. Default: 'ema' + mamode (str): See ``help(ta.ma)``. Default: 'ema' offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/volume/efi.py b/pandas_ta/volume/efi.py index 19db37b..29e9ba1 100644 --- a/pandas_ta/volume/efi.py +++ b/pandas_ta/volume/efi.py @@ -23,7 +23,7 @@ def efi( volume (pd.Series): Series of 'volume's length (int): The short period. Default: 13 drift (int): The diff period. Default: 1 - mamode (str): See ```help(ta.ma)```. Default: 'ema' + mamode (str): See ``help(ta.ma)``. Default: 'ema' offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/volume/kvo.py b/pandas_ta/volume/kvo.py index 119c231..34b908a 100644 --- a/pandas_ta/volume/kvo.py +++ b/pandas_ta/volume/kvo.py @@ -29,7 +29,7 @@ def kvo( fast (int): The fast period. Default: 34 slow (int): The slow period. Default: 55 signal (int): The signal period. Default: 13 - mamode (str): See ```help(ta.ma)```. Default: 'ema' + mamode (str): See ``help(ta.ma)``. Default: 'ema' offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/volume/wb_tsv.py b/pandas_ta/volume/wb_tsv.py index 1ba3ef5..ba58f63 100644 --- a/pandas_ta/volume/wb_tsv.py +++ b/pandas_ta/volume/wb_tsv.py @@ -29,7 +29,7 @@ def wb_tsv( volume (pd.Series): Series of 'volume's length (int): It's period. Default: 18 signal (int): It's avg period. Default: 10 - mamode (str): See ```help(ta.ma)```. Default: 'sma' + mamode (str): See ``help(ta.ma)``. Default: 'sma' drift (int): The difference period. Default: 1 offset (int): How many periods to offset the result. Default: 0