myTestFreqAI/tests/test_talib.py
Ubuntu 17199e9a44
Some checks failed
Pre-commit auto-update / auto-update (push) Has been cancelled
first add
2025-04-21 21:11:51 +08:00

17 lines
453 B
Python

import pandas as pd
import talib.abstract as ta
def test_talib_bollingerbands_near_zero_values():
inputs = pd.DataFrame(
[
{"close": 0.00000010},
{"close": 0.00000011},
{"close": 0.00000012},
{"close": 0.00000013},
{"close": 0.00000014},
]
)
bollinger = ta.BBANDS(inputs, matype=0, timeperiod=2)
assert bollinger["upperband"][3] != bollinger["middleband"][3]