Where can I download historical stock prices?
June 5, 2020 12:51 PM   Subscribe

I would like to know price of every stock on the NYSE on a given date and time in history. I would like to download this information in CSV format. Where can I obtain this information? Can pay for it, if necessary.
posted by panama joe to Work & Money (8 answers total) 3 users marked this as a favorite
Best answer: Here's a YT video on how to pull historic data in excel

Here's a link with instructions to download a file with all the ticker symbols.

Copy the dates down the column and apply the stock data lookup to each ticker symbol. You may have to format some of the symbols, but that should work.
posted by ananci at 1:22 PM on June 5, 2020

Offhand, I know the Bloomberg terminal does this. Do you have any academic affiliations that might get you access? It's prohibitively expensive for most organizations.
posted by orrnyereg at 1:22 PM on June 5, 2020

Best answer: Getting stock data into R for free

TL;DR it’s built in to Google Spreadsheets or you can use Yahoo! Finance or Quandl.
posted by Monochrome at 1:32 PM on June 5, 2020 [1 favorite]

Be mindful that stock prices alone don’t get you total return. Stocks pay dividends, and stocks also split from time to time, making it harder to use just a price series to tell you something useful about longer term returns.
posted by thenormshow at 1:40 PM on June 5, 2020 [1 favorite]

Response by poster: Sadly, I do not have access to a Bloomberg terminal or any paid-for financial information services.
posted by panama joe at 1:43 PM on June 5, 2020

Seconding the recommendation for Yahoo finance. I used to use it all the time for this purpose; it looks like the functionality is still there. However, you'll have to go through the stocks one by one, as the way to download historical data is accessed through each stock's specific page. I'm not sure if that's a dealbreaker for you; it does sound like a lot of work to get the entire NYSE. However if you're trying to do some kind of full-market analysis, you can also download quotes for index funds and ETFs, if that helps your project.
posted by Joey Buttafoucault at 2:26 PM on June 5, 2020 [1 favorite]

Best answer: > price of every stock on the NYSE on a given date and time in history

Monochrome's response gives a couple of ways to lookup historical prices by symbol - using the Quantmod package in R, or using google spreadsheets (both of which would be fee to use). But this only describes how to get data for a single stock symbol at a time.

Once you have a list of all the stock symbols you are interested in, you can then automate fetching all the prices -- e.g. by looping over the list and calling getSymbols on each symbol in R code, or by making some giant google spreadsheet that calls =GOOGLEFINANCE(A1, "price", ...) using symbol data from some column A1, A2, A3, ... and filling down a few thousand rows.

To get a list stock symbols currently* listed on the NYSE, you can download this bar-separated data file and open it in a spreadsheet reading program, then filter by the value of the exchange column to show only NYSE listed symbols


The definitions of the exchange codes for the otherlisted data set is here (two of them correspond to the NYSE exchange) : http://www.nasdaqtrader.com/trader.aspx?id=symboldirdefs#other

* this data will give the symbols that are currently listed, not the ones that were historically listed at some point in time. Depending on what analysis you are trying to do, between then and now some new companies may have been listed, and some may have been delisted for various reasons (e.g. company was acquired by another public company, company was acquired by a private company, company was taken private, company failed to comply with accounting and regulatory requirements to submit audited financial reports, company went bankrupt). Using current list of symbols instead of historical list may bias your analysis.
posted by are-coral-made at 2:29 PM on June 5, 2020 [1 favorite]

Stock prices get complex quickly for reasons listed above. What are you using the data for? Do you need latest or just historical?
posted by geoff. at 2:27 PM on June 7, 2020

« Older Buying eyeglass frames only online and getting the...   |   Explain BI to me, an advanced PivotTable user Newer »
This thread is closed to new comments.