How to Download Historical Data from Yahoo Finance

This page is a detailed guide to finding and downloading historical data such as daily stock prices or index values from Yahoo Finance.

Go to Yahoo Finance homepage:

Yahoo Finance homepage

At the moment and on my computer it looks like this. It may look a little different on your device, but the key sections will most likely always be there.

To access historical data, we need to get to the quote page dedicated to the particular security we are looking for. There are several different ways how we can get to that page.

How to Find the Right Symbol on Yahoo Finance

Option 1: If it’s one of the popular indices like the S&P500 or the Dow, the fastest way is to click on the particular quote shown below the search bar.

Option 2: If you know the Yahoo symbol, you can enter it in the search bar. If you don’t, just enter the company name, index name or some other relevant phrase. Yahoo will suggest things which you are most likely looking for and usually you will find the right security among the first few options.

Yahoo Finance symbol search

Just be careful with stocks – some (especially the most popular ones) are traded on multiple exchanges in different countries. The exchange is shown on the right side of each suggested item.

For instance, if you are looking for Microsoft stock as in the screenshot above, Yahoo will suggest the stock traded on NASDAQ (symbol MSFT, which is the one you are probably looking for), but also other issues traded in places like Frankfurt or Amsterdam. These are often traded in different currencies and the market data will be different from what you need.

Option 3: If you haven’t been successful with symbol search, you can try to find the security by clicking Market Data in the main horizontal menu and selecting the particular category.

Yahoo Finance Market Data categories

Option 4 – the fastest if you know the Yahoo symbol:

Type this URL in your browser address bar:

Replace “MSFT” with the symbol you are looking for, obviously.

Preparing the Historical Data

Once you get to the right symbol’s main page, it should look like this (I’ll continue with the Microsoft stock example):

Historical data for the given symbol

Click Historical Data. Just below the main symbol menu there will be a few options to specify what data you want – you can adjust the date range, data type (usually you want Historical Prices, which is set by default) and frequency (you probably want Daily, set by default). Don’t forget to click Apply if you’ve made any changes. Then click Download Data, which is highlighted in the following screenshot:

Customizing and downloading historical data

The website will offer a CSV file, usually named table.csv, which you can either save to your computer or immediately open.

Yahoo Finance historical data output

Shortcut to Get the Data File

If you know the symbol, you can actually get the CSV file right away without having to interact with Yahoo Finance website – just by typing the right URL into your browser. The URL is in this format:

Again, replace “MSFT” with the symbol you want. It works for most symbols.

This file will contain the entire history of daily prices available on Yahoo Finance for that symbol.

Yahoo Finance Historical Data Format

If you open the CSV in Excel, you can see the data format, which is usually Date, Open, High, Low, Close and Volume and Adjusted Close if applicable. Just a few things to note:

  • Stock trading volume is sometimes very inaccurate. For some indices Volume shows complete nonsense (indices themselves don’t have trading volume; the number shown can be the total volume of index components or stock exchange or whatever Yahoo thinks fits there).
  • Adjusted Close is the Close adjusted for dividends, stock splits and similar corporate actions. For some purposes (such as historical volatility calculation) it is more useful than Close, for others Close is more appropriate. For most indices and securities which don’t pay dividends Adjusted Close will be the same as Close.
Yahoo Finance historical data format

Adjusting the Data to Your Needs

The data as provided by Yahoo Finance is sorted from newest to oldest. You will often want it sorted the other way, which is easy to do in Excel. Select all the cells with data and then in Excel main menu choose Data and in the lower menu click Sort.

Sorting data in Excel

The Sort dialog window will appear, where you can choose to sort the data by Date, Oldest to Newest. Make sure to have the “My data has headers” option checked if you have selected the cells including the first header row.

Sorting data in Excel

Besides sorting the data as you want, you can of course also delete the columns which you don’t need, such as Volume and Adjusted Close.

Saving the CSV as XLSX

If you primarily do your data analysis in Excel, it is useful to save the file as a standard Excel workbook (xlsx) rather than CSV, because there is not so much you can do (and save) with a CSV in Excel.

Saving file as Excel workbook

That’s it. Now you have the data ready for further work.

Have a question or feedback? Send a message. It takes less than a minute.