Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_zlema():
"""test TA.ZLEMA"""
ma = TA.ZLEMA(ohlc)
assert isinstance(ma, series.Series)
assert ma.values[-1] == 5193.0313725800006
def test_kc():
"""test TA.KC"""
ma = TA.ZLEMA(ohlc, 20)
kc = TA.KC(ohlc, MA=ma)
assert isinstance(kc["KC_UPPER"], series.Series)
assert isinstance(kc["KC_LOWER"], series.Series)
assert kc["KC_UPPER"].values[-1] == 6059.9253031099979
assert kc["KC_LOWER"].values[-1] == 4591.8874420500033