Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
macd regtest
Browse files Browse the repository at this point in the history
  • Loading branch information
peerchemist committed Mar 21, 2020
1 parent cdfca99 commit e435422
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_reg.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ def test_tr():
assert round(talib_tr[-1], 5) == round(tr.values[-1], 5)


def test_macd():
"""test MACD"""

macd = TA.MACD(ohlc)
talib_macd = talib.MACD(ohlc['close'])

assert round(talib_macd[0][-1], 3) == round(macd["MACD"].values[-1], 3)
assert round(talib_macd[1][-1], 3) == round(macd["SIGNAL"].values[-1], 3)


def test_atr():
'''test TA.ATR'''

Expand Down

0 comments on commit e435422

Please sign in to comment.