Knowledge Base | How to Load Historical Stock Prices from Yahoo Finance to Databases

Available Methods

There is only one common way to get historical prices from Yahoo Finance into databases:

  1. Saving historical prices to CSV and loading CSV into databases.

Saving Historical Prices to CSV and Loading CSV into Databases


  1. Load historical prices from Yahoo Finance into CSV using batch files.
  2. Import loaded CSV data into databases.

The first step has the ready-to-use code as described in the article.

The second step depends on a target database.

Saving Historical Prices to CSV using Market Data Downloader

Market Data Downloader includes preconfigured projects for loading historical stock prices and dividends from Yahoo! Finance for several stock markets.

Quick steps:

  1. Download Market Data Downloader.
  2. Copy the MarketData folder from the downloaded package to the root of drive C:
  3. Edit symbols in files in the symbols folder like us-quotes.txt.
  4. Run the C:\MarketData\2-load-csv-us.cmd batch file.
  5. Check CSV files in the C:\MarketData\csv folder.

Market Data Downloader also includes a preconfigured database for Microsoft SQL Server and a ready-to-use batch file to import CSV data.

See Preconfigured Project.


Products for Traders and Investors
The app loads data from Yahoo Finance, Google Finance, and MSN Money to CSV and SQL Server
Version: 2.14 | 07/25/2018 | 0.9MB | Home | What's New | Edition Comparison


Yahoo Finance is a logo and registered trademark of Yahoo! Inc.

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.