diff --git a/README.md b/README.md index fe3e28b..7f1ce2f 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ $ pip install pandas_ta Latest Version -------------- -Best choice! Version: *0.3.14b* +Best choice! Version: *0.3.15b* * Includes all fixes and updates between **pypi** and what is covered in this README. ```sh $ pip install -U git+https://github.com/twopirllc/pandas-ta @@ -998,7 +998,9 @@ of the last bars defined by the length parameter. See ```help(ta.tos_stdevall)`` * _Moving Average Convergence Divergence_ (**macd**): New argument ```asmode``` enables AS version of MACD. Default is False. See ```help(ta.macd)```. * _Parabolic Stop and Reverse_ (**psar**): Bug fix and adjustment to match TradingView's ```sar```. New argument ```af0``` to initialize the Acceleration Factor. See ```help(ta.psar)```. * _Percentage Price Oscillator_ (**ppo**): Included new argument ```mamode``` as an option. Default is **sma** to match TA Lib. See ```help(ta.ppo)```. +* _Standard Deviation_ (**stdev**): To use ```ddof``` argument, also set ```talib=False```. The ```ddof``` argument is not available if you have TA Lib installed in your environment. Same goes for **variance**. See ```help(ta.stdev)```. * _True Strength Index_ (**tsi**): Added ```signal``` with default ```13``` and Signal MA Mode ```mamode``` with default **ema** as arguments. See ```help(ta.tsi)```. +* _Variance_ (**variance**): To use ```ddof``` argument, also set ```talib=False```. The ```ddof``` argument is not available if you have TA Lib installed in your environment. Same goes for **stdev**. See ```help(ta.variance)```. * _Volume Profile_ (**vp**): Calculation improvements. See [Pull Request #320](https://github.com/twopirllc/pandas-ta/pull/320) See ```help(ta.vp)```. * _Volume Weighted Moving Average_ (**vwma**): Fixed bug in DataFrame Extension call. See ```help(ta.vwma)```. * _Volume Weighted Average Price_ (**vwap**): Added a new parameter called ```anchor```. Default: "D" for "Daily". See [Timeseries Offset Aliases](https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliases) for additional options. **Requires** the DataFrame index to be a DatetimeIndex. See ```help(ta.vwap)```. diff --git a/pandas_ta/statistics/stdev.py b/pandas_ta/statistics/stdev.py index d5c2ddf..6047101 100644 --- a/pandas_ta/statistics/stdev.py +++ b/pandas_ta/statistics/stdev.py @@ -21,7 +21,7 @@ def stdev(close, length=None, ddof=None, talib=None, offset=None, **kwargs): from talib import STDDEV stdev = STDDEV(close, length) else: - stdev = variance(close=close, length=length, ddof=ddof).apply(npsqrt) + stdev = variance(close=close, length=length, ddof=ddof, talib=False).apply(npsqrt) # Offset if offset != 0: @@ -56,9 +56,10 @@ Args: length (int): It's period. Default: 30 ddof (int): Delta Degrees of Freedom. The divisor used in calculations is N - ddof, - where N represents the number of elements. Default: 1 + where N represents the number of elements. The 'talib' argument + must be false for 'ddof' to work. Default: 1 talib (bool): If TA Lib is installed and talib is True, Returns the TA Lib - version. Default: True + version. TA Lib does not have a 'ddof' argument. Default: True offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/pandas_ta/statistics/variance.py b/pandas_ta/statistics/variance.py index 520f7da..60f54f4 100644 --- a/pandas_ta/statistics/variance.py +++ b/pandas_ta/statistics/variance.py @@ -54,9 +54,10 @@ Args: length (int): It's period. Default: 30 ddof (int): Delta Degrees of Freedom. The divisor used in calculations is N - ddof, - where N represents the number of elements. Default: 0 + where N represents the number of elements. The 'talib' argument + must be false for 'ddof' to work. Default: 1 talib (bool): If TA Lib is installed and talib is True, Returns the TA Lib - version. Default: True + version. TA Lib does not have a 'ddof' argument. Default: True offset (int): How many periods to offset the result. Default: 0 Kwargs: diff --git a/setup.py b/setup.py index 0dc6594..b5f7c6f 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( "pandas_ta.volatility", "pandas_ta.volume" ], - version=".".join(("0", "3", "14b")), + version=".".join(("0", "3", "15b")), description=long_description, long_description=long_description, author="Kevin Johnson",