17 Download Historical Price Files

Download Historical Price Files

figs/beginner.gif figs/hack17.gif

Historical prices are necessary if you're to successfully evaluate fundamental and technical measures for a stock.

Fundamental and technical analysts (for the difference between the two, see Chapter 4 and Chapter 5) don't have much in common other than the evaluation of historical prices to determine whether a stock is a buy, hold, or sell. Those who study fundamental measures use historical prices to identify typical P/E ratios and dividend yields for stocks. Because fundamental investors buy for the long term, they want historical prices going back several years. Conversely, technical analysts study the vagaries of price movement to try to determine where the price might go next. Technical analysis tends to the short term, so price charts might cover a few months or even a few hours. Smart investors combine the best of both of these methodologies to buy quality growth companies at good prices. Whether you want prices for days, months, or years, you can download a price spreadsheet from Yahoo! Finance.

When you open a web page for a stock at Yahoo! Finance (http://finance.yahoo.com), it's easy to download the historical prices you want by following these steps:

  1. Click the Historical Prices link in the navigation bar in the left margin to open the Historical Prices page.

  2. Specify the start and end dates for your price history.

  3. Select the Monthly option to download for each month: the opening price on the first trading day of the month, the closing price on the last trading day, and the highest and lowest prices during the month. You can also select the Daily, Weekly, or Dividend Only options.

  4. To retrieve the prices, click Get Prices. As illustrated in Figure, Yahoo! Finance displays the Open, Close, High, and Low prices for the periods you chose. However, for a true indication of a stock's price history, you want the prices adjusted for stock splits and dividends, which is provided by Adj Close in the last column.

    You can download actual closing prices or prices adjusted for stock splits from Yahoo! Finance

  5. To download a spreadsheet of these prices, scroll to the bottom of the page and click Download to Spreadsheet. Depending on the browser you use, the steps may be different. If you use Internet Explorer, when the File Download dialog box appears, click Save. In the Save As dialog box, navigate to the folder in which you want to save the historical price file. By default, the filename is table.csv, so be sure to type a meaningful name in the File Name box. For example, you might use INTC_Price0311 for Intel's prices downloaded in November 2003.

    By using a filenaming format, you can control the order in which your price files appear in Windows Explorer. For example, by starting the filename with the stock ticker followed by the year, and then the month (<ticker><yyyy><mm>), all the price files for a stock appear in chronological order. To group price files by year, start the filename with the year and month, and append the ticker symbol to the end.

  6. To open the price file in Excel, choose FileOpen and navigate to the folder that contains the price file. In the Open dialog box, select Text Files (*.prn; *.txt; *.csv) in the Files of Type drop-down list, so you can see the .csv files in the folder. Double-click the name of the price file you want. Excel opens the file as a worksheet. If you want to save the file as an Excel workbook, choose FileSave As and be sure to select Microsoft Excel Workbook (.xls) in the Files of Type drop-down list.

     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows