How to use the finta.TA.HMA 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_utils_unit.py View on Github external
def test_trending_up():

    df = to_dataframe(data)
    ma = TA.HMA(df)
    assert isinstance(trending_up(ma, 10), Series)

    assert not trending_up(ma, 10).values[-1]
github peerchemist / finta / tests / test_utils_unit.py View on Github external
def test_trending_down():

    df = to_dataframe(data)
    ma = TA.HMA(df)
    assert isinstance(trending_down(ma, 10), Series)

    assert trending_down(ma, 10).values[-1]
github peerchemist / finta / tests / test_unit.py View on Github external
def test_hma():
    """test TA.HMA"""

    ma = TA.HMA(ohlc)

    assert isinstance(ma, series.Series)
    assert ma.values[-1] == 6428.9693186290006