+ Reply to Thread
Results 1 to 4 of 4

Best way of getting a large time frame of historical prices from Yahoo!

  1. #1
    Registered User
    Join Date
    03-19-2012
    Location
    rochester, ny
    MS-Off Ver
    Excel 2013
    Posts
    14

    Best way of getting a large time frame of historical prices from Yahoo!

    I would like to get the daily historical closing prices of a stock for at least one years time. i know how to import the information, but each table only has around 66 dates and i need to use the "next" link at the bottom of the page to see the next 66 and so on... I can get the entire year in a spreadsheet with the link at the bottom of the page, but i don't know how to go about integrating it into a VBA program.

    Is there a way I can use the link at the bottom of the page? Can I use VBA to save the link and open it in my workbook? Better yet, is there a way to enter Yahoo's URL to display the data table containing the entire range of data on one page?

    Thanks
    Dustin

  2. #2
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Best way of getting a large time frame of historical prices from Yahoo!

    This gives you all of it in one csv download(Apr 96 to present).
    http://finance.yahoo.com/q/hp?s=YHOO...=d&z=66&y=3960

  3. #3
    Registered User
    Join Date
    03-19-2012
    Location
    rochester, ny
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Best way of getting a large time frame of historical prices from Yahoo!

    the "previous" link at the bottom of the page needs to be clicked to see more of the data. Is there a way to see Apr 96 to present on 1 table? I see the download at the bottom that contains all of the data. Is there a way to create a macro that will go to the url, save the download, and then open it?

  4. #4
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Best way of getting a large time frame of historical prices from Yahoo!

    Quote Originally Posted by dwassner View Post
    I see the download at the bottom that contains all of the data. Is there a way to create a macro that will go to the url, save the download, and then open it?
    Copy the 'Download to Spreadsheet' link, then in Excel do File - Open - paste the copied URL. Do this with the Macro Recorder to generate the code for further development and automation. Play around with the Date Range and frequency options on the Yahoo web page to see how the URL is generated according to the input parameters and incorporate this into the VBA code.
    Last edited by Chippy; 03-27-2012 at 08:49 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1