Skip to content

Downloads historical data of all tickers in the SP 500.

License

Notifications You must be signed in to change notification settings

andrewczgithub/SP500-Data-Puller

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

S&P 500 Data Puller

Downloads historical data of all tickers in the S&P 500.

"myWebscraper.py" has two main portions which are described below.

Section 1: Scrape Wikipedia page with list of S&P 500 companies

The first part of this code scrapes the relevant wikipedia page to get all the tickers in the S&P 500 according to the market sector and stores it in a python dictionary database.

Section 2: Query 'Yahoo Finance' for historical data and save as .csv

The second portion of this code queries 'Yahoo Finance' via the pandas.datareader to get the historical data for the tickers between the dates specified within the code. This data is read into a pandas dataframe structure which is then saved as a .csv for potential use with other programs like R or Excel.

About

Downloads historical data of all tickers in the SP 500.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%