Last active
March 13, 2021 18:30
-
-
Save blakesanie/c3ac2c37d063497f8fc726f89172e11c 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 yfinance as yf | |
import sys | |
if len(sys.argv) != 2: | |
raise Exception("please provide ticker") | |
symbol = sys.argv[1].upper() | |
ticker = yf.Ticker(symbol) | |
hist = ticker.history(period="10y", interval="1d", | |
auto_adjust=True, threads=True) | |
hist.to_csv("./prices/{}.csv".format(symbol)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment