| 1 | import pandas as pd |
| 2 | import talib.abstract as ta |
| 3 | |
| 4 | |
| 5 | def test_talib_bollingerbands_near_zero_values(): |
| 6 | inputs = pd.DataFrame([ |
| 7 | {'close': 0.00000010}, |
| 8 | {'close': 0.00000011}, |
| 9 | {'close': 0.00000012}, |
| 10 | {'close': 0.00000013}, |
| 11 | {'close': 0.00000014} |
| 12 | ]) |
| 13 | bollinger = ta.BBANDS(inputs, matype=0, timeperiod=2) |
| 14 | assert bollinger['upperband'][3] != bollinger['middleband'][3] |