How to use the finta.TA.ZLEMA function in finta

To help you get started, we’ve selected a few finta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peerchemist / finta / tests / test_unit.py View on Github external
def test_zlema():
    """test TA.ZLEMA"""

    ma = TA.ZLEMA(ohlc)

    assert isinstance(ma, series.Series)
    assert ma.values[-1] == 5193.0313725800006
github peerchemist / finta / tests / test_unit.py View on Github external
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