13 lines
312 B
Python
13 lines
312 B
Python
|
from datetime import datetime, timedelta
|
||
|
|
||
|
from ohlc import ohlc
|
||
|
from strategies import rsi_25_75
|
||
|
|
||
|
today = datetime.today()
|
||
|
data = ohlc('SPY', start_date = today - timedelta(days = 365), end_date = today)
|
||
|
|
||
|
signals = rsi_25_75(data)
|
||
|
|
||
|
result = data[['Date']].copy()
|
||
|
result['Signal'] = signals
|
||
|
print(result.tail(50))
|