2018-08-05 20:08:49 +00:00
|
|
|
import pandas as pd
|
2020-09-28 17:43:15 +00:00
|
|
|
import talib.abstract as ta
|
2018-08-05 20:08:49 +00:00
|
|
|
|
2018-08-05 21:52:06 +00:00
|
|
|
|
2018-08-05 20:08:49 +00:00
|
|
|
def test_talib_bollingerbands_near_zero_values():
|
2024-05-12 13:29:14 +00:00
|
|
|
inputs = pd.DataFrame(
|
|
|
|
[
|
|
|
|
{"close": 0.00000010},
|
|
|
|
{"close": 0.00000011},
|
|
|
|
{"close": 0.00000012},
|
|
|
|
{"close": 0.00000013},
|
|
|
|
{"close": 0.00000014},
|
|
|
|
]
|
|
|
|
)
|
2018-08-05 20:08:49 +00:00
|
|
|
bollinger = ta.BBANDS(inputs, matype=0, timeperiod=2)
|
2024-05-12 13:29:14 +00:00
|
|
|
assert bollinger["upperband"][3] != bollinger["middleband"][3]
|