How to Download Historical Data from Yahoo Finance (2024)

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

Yahoo Finance Website

Go to Yahoo Finance homepage: finance.yahoo.com

How to Download Historical Data from Yahoo Finance (1)

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.

How to Download Historical Data from Yahoo Finance (2)

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.

How to Download Historical Data from Yahoo Finance (3)

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

Type this URL in your browser address bar (or use the link directly):

https://finance.yahoo.com/quote/MSFT

Replace "MSFT" with the symbol you are looking for.

Preparing the Historical Data

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

How to Download Historical Data from Yahoo Finance (4)

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:

How to Download Historical Data from Yahoo Finance (5)

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

How to Download Historical Data from Yahoo Finance (6)

When the Download Link is Missing

For some symbols, the Download Data link is missing and the CSV file is unavailable. This is most likely caused by licensing terms between Yahoo and the particular stock exchange or index provider.

Unfortunately this currently (2023) applies to some of the most popular stock indices, including S&P500 (^GSPC) and the Dow Jones Industrial Average (^DJI).

Individual US stocks are working, as well as stocks from other major markets, including the UK, France, Germany, Japan, or China.

If you can't see the Download Data link in the top right corner of the historical data table, you can still select the data (including the header row) in the browser and copy-paste it into a blank Excel file. This is not the most elegant way to get historical data, but at least an acceptable workaround if you only need one symbol which happens to be unavailable.

Yahoo Finance Historical Data Format

When you open the CSV in Excel, you can see the data format, which is usually Date, Open, High, Low, Close, Volume, and Adjusted Close if applicable.

How to Download Historical Data from Yahoo Finance (7)

Floating Point Imprecision

One thing that may be surprising is that the prices (open, high, low, close) sometimes have 6 decimal places. For instance, when the stock closed at 249.18 the data can actually show 249.179993.

This is due to the way computers, only understanding zeros and ones, handle decimal numbers (this issue is known as floating point imprecision in computer science). It appears Yahoo does not correct it before presenting the data to the outside world.

For most research purposes this imprecision is immaterial (it only affects the sixth decimal place), but you may still want to correct it using Excel ROUND function.

Adjusted Close vs. Close

Adjusted Close is the Close adjusted for dividends, stock splits, and other 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 is the same as Close.

Volume Accuracy and Interpretation

Stock trading volume can be inaccurate. For some indices, Volume shows complete nonsense (indices themselves don't have trading volume; the number shown can be the total trading volume of all index components or entire stock exchange, or whatever Yahoo thinks fits there).

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.

How to Download Historical Data from Yahoo Finance (8)

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.

How to Download Historical Data from Yahoo Finance (9)

Besides sorting the data, you can also delete any 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.

How to Download Historical Data from Yahoo Finance (10)

Now you have the data ready for further work.

Yahoo Finance Alternatives for Historical Data

Yahoo Finance has been the most popular source of free historical data for a long time. However, the discontinuation of Yahoo Finance free API and other restrictions in the recent years has made many people look for alternatives. One of the best and fast growing free source is Alpha Vantage, which can be used with Excel, Python, and a number of other programming languages. See my Alpha Vantage tutorial at FinTut.

How to Download Historical Data from Yahoo Finance (2024)
Top Articles
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 5857

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.