From 48716dc81232d2584e3b0db03a2cc96797ea41fe Mon Sep 17 00:00:00 2001 From: moshferatu Date: Thu, 19 Dec 2024 13:35:28 -0800 Subject: [PATCH] Add test for Engulfing strategy --- test/engulfing_test.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/engulfing_test.py diff --git a/test/engulfing_test.py b/test/engulfing_test.py new file mode 100644 index 0000000..ae66b58 --- /dev/null +++ b/test/engulfing_test.py @@ -0,0 +1,13 @@ +from datetime import datetime, timedelta + +from ohlc import ohlc +from strategies import engulfing + +today = datetime.today() +data = ohlc('SPY', start_date = today - timedelta(days = 365), end_date = today) + +signals = engulfing(data) + +result = data[['Date']].copy() +result['Signal'] = signals +print(result.tail(50)) \ No newline at end of file