10 lines
252 B
Python
10 lines
252 B
Python
|
from datetime import datetime, timedelta
|
||
|
|
||
|
from indicators import sma
|
||
|
from ohlc import ohlc
|
||
|
|
||
|
today = datetime.today()
|
||
|
data = ohlc('SPY', start_date = today - timedelta(days = 365), end_date = today)
|
||
|
|
||
|
sma_values = sma(data, period = 10)
|
||
|
print(sma_values)
|