diff --git a/pandas_ta/volatility/bbands.py b/pandas_ta/volatility/bbands.py index 3137e3a..a9d01c8 100644 --- a/pandas_ta/volatility/bbands.py +++ b/pandas_ta/volatility/bbands.py @@ -9,7 +9,7 @@ def bbands(close, length=None, std=None, mamode=None, offset=None, **kwargs): """Indicator: Bollinger Bands (BBANDS)""" # Validate arguments close = verify_series(close) - length = int(length) if length and length > 0 else 20 + length = int(length) if length and length > 0 else 5 min_periods = int(kwargs['min_periods']) if 'min_periods' in kwargs and kwargs['min_periods'] is not None else length std = float(std) if std and std > 0 else 2. mamode = mamode.lower() if mamode else 'sma' diff --git a/setup.py b/setup.py index 70ab66c..8ce4a92 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ long_description = "An easy to use Python 3 Pandas Extension with 95+ Technical setup( name ="pandas_ta", packages =['pandas_ta', 'pandas_ta.momentum', 'pandas_ta.overlap', 'pandas_ta.performance', 'pandas_ta.statistics', 'pandas_ta.trend', 'pandas_ta.volatility', 'pandas_ta.volume'], - version ="0.1.49b", + version ="0.1.50b", description =long_description, long_description =long_description, author ="Kevin Johnson", diff --git a/tests/test_indicator_volatility.py b/tests/test_indicator_volatility.py index 089f636..395891d 100644 --- a/tests/test_indicator_volatility.py +++ b/tests/test_indicator_volatility.py @@ -62,11 +62,11 @@ class TestVolatility(TestCase): def test_bbands(self): result = pandas_ta.bbands(self.close) self.assertIsInstance(result, DataFrame) - self.assertEqual(result.name, 'BBANDS_20') + self.assertEqual(result.name, 'BBANDS_5') try: expected = tal.BBANDS(self.close) - expecteddf = DataFrame({'BBL_20': expected[0], 'BBM_20': expected[1], 'BBU_20': expected[2]}) + expecteddf = DataFrame({'BBL_5': expected[0], 'BBM_5': expected[1], 'BBU_5': expected[2]}) pdt.assert_frame_equal(result, expecteddf) except AssertionError as ae: try: diff --git a/tests/test_indicator_volatility_ext.py b/tests/test_indicator_volatility_ext.py index 0c1e693..e2a3e2d 100644 --- a/tests/test_indicator_volatility_ext.py +++ b/tests/test_indicator_volatility_ext.py @@ -38,7 +38,7 @@ class TestVolatilityExtension(TestCase): def test_bbands_ext(self): self.data.ta.bbands(append=True) self.assertIsInstance(self.data, DataFrame) - self.assertEqual(list(self.data.columns[-3:]), ['BBL_20', 'BBM_20', 'BBU_20']) + self.assertEqual(list(self.data.columns[-3:]), ['BBL_5', 'BBM_5', 'BBU_5']) def test_donchian_ext(self): self.data.ta.donchian(append=True)