ADXIndicator.adx_pos / adx_neg head assertion failed
mike1936 opened this issue · 0 comments
mike1936 commented
Problem
The first non-zero +DI14 is missing when try to calculating them using ADXIndicator.adx_pos
.
Same problem with -DI14 and ADXIndicator.adx_neg
.
Expectation:
After inserting the following test function to TestADXIndicator
in ./test/unit/trend.py
, the test should pass
# ...
def test_adx_pos3(self):
target = "+DI14"
result = adx_pos(**self._params)
pd.testing.assert_series_equal(
self._df[target].head(15), result.head(15), check_names=False
)
def test_adx_neg3(self):
target = "-DI14"
result = self._indicator.adx_neg()
pd.testing.assert_series_equal(
self._df[target].head(16), result.head(16), check_names=False
)
# ...