There is only one common way to get historical prices from Yahoo Finance into databases:
- Saving historical prices to CSV and loading CSV into databases.
Saving Historical Prices to CSV and Loading CSV into Databases
- Load historical prices from Yahoo Finance into CSV using batch files.
- 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.
- Download Market Data Downloader.
- Copy the MarketData folder from the downloaded package to the root of drive C:
- Edit symbols in files in the symbols folder like us-quotes.txt.
- Run the C:\MarketData\2-load-csv-us.cmd batch file.
- 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.
|Products for Traders and Investors|
Yahoo Finance is a logo and registered trademark of Yahoo! Inc.