From ff3992ba13ec2ff6bb67de1a2e62e22885fa61a3 Mon Sep 17 00:00:00 2001 From: moshferatu Date: Wed, 8 Jan 2025 10:51:14 -0800 Subject: [PATCH] Add test for ConnorsRSI strategy --- test/connors_rsi_test.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/connors_rsi_test.py diff --git a/test/connors_rsi_test.py b/test/connors_rsi_test.py new file mode 100644 index 0000000..f8896c1 --- /dev/null +++ b/test/connors_rsi_test.py @@ -0,0 +1,13 @@ +from datetime import datetime, timedelta + +from ohlc import ohlc +from strategies import connors_rsi + +today = datetime.today() +data = ohlc('SPY', start_date = today - timedelta(days = 365), end_date = today) + +signals = connors_rsi(data) + +result = data[['Date']].copy() +result['Signal'] = signals +print(result.tail(50)) \ No newline at end of file