Created
February 16, 2022 18:42
-
-
Save neurojojo/badfb3a77df0c56038a6252e03393410 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pickle | |
stock_tseries_df = pd.DataFrame() | |
for x in ssr_database.iterrows(): | |
try: | |
thisstock = yf.download( x[1].Ticker, start=x[1].Datetime.date(), end=x[1].NextDay.date(), interval = '30m' ) | |
tmp = pd.DataFrame( [ x[1].Ticker, x[1].Datetime, x[1].NextDay, thisstock['Close'].values[0:13],thisstock['Close'].values[14:],thisstock['Volume'].values[0:13],thisstock['Volume'].values[14:]] ).transpose() | |
stock_tseries_df = pd.concat( [stock_tseries_df,tmp] ) | |
with open("ssr_database_df.pickle","wb") as f: | |
pickle.dump(stock_tseries_df,f) | |
except: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment