Skip to content

Instantly share code, notes, and snippets.

@ritvikmath
Last active May 28, 2023 01:12
Show Gist options
  • Save ritvikmath/854ca31dd569e5361c53a134bcfa80a0 to your computer and use it in GitHub Desktop.
Save ritvikmath/854ca31dd569e5361c53a134bcfa80a0 to your computer and use it in GitHub Desktop.
import yfinance as yf
#define the ticker symbol
tickerSymbol = 'MSFT'
#get data on this ticker
tickerData = yf.Ticker(tickerSymbol)
#get the historical prices for this ticker
tickerDf = tickerData.history(period='1d', start='2010-1-1', end='2020-1-25')
#see your data
tickerDf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment