+ Reply to Thread
Results 1 to 4 of 4

Why sometimes it takes so long for STOCKHISTORY to pull data?

  1. #1
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    Why sometimes it takes so long for STOCKHISTORY to pull data?

    I just knew STOCKHISTORY a few days ago, then started working on VBA code for stock historical data analysis. I am still testing the code.

    I have a list of more than 5000 companies, and I have tested pulling data from Today()-10 to Today(). For the same symbol list and same date parameter. Sometimes it takes no more than 10 minutes (since only 10 calendar days of data), but sometimes it takes ridiculous amount of times (such as right now, Saturday afternoon, I have been waiting for more than 30 minutes, and only about half of symbol list have been pulled into excel). It is still pulling, I have written a separate procedure to calculate the number of symbol data have been pulled, it is making process, but very slowly, sometimes only 2-3 symbols within 5 minutes, sometimes suddenly adding data for around 100 symbols.

    Is it because of weekend or nighttime, then it takes longer time to interact with outside data source? I am not sure where data comes from when using function STOCKHISTORY, does Microsoft store the historical data in its own server, or pulling data from third party. Or it is due to Office 365? Office 365 does not "work hard" on weekend? I am not saying that it takes longer on weekends or nighttime, I am just guessing/feeling like that, I have been working with the function for only a few days.

    The processing time is significantly different from time to time, I am wondering why. It does show #BUSY!

    Thanks.
    Last edited by VAer; 09-04-2021 at 03:12 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Why sometimes it takes so long for STOCKHISTORY to pull data?

    STOCKHISTORY gets data from a third party company called Refinitiv. I don't know why the performance varies but they probably deal with large amounts of data requests and throttle the output depending on demand. That's just a guess.

    Requesting data for 5000 companies is large and probably more than the typical situation they are set up to service from Excel requests. Remember, you are not paying anything additional to get this data.

    If you are using this data for stock trading or professional reasons, you probably need to get a paid account with a market information provider.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    Re: Why sometimes it takes so long for STOCKHISTORY to pull data?

    Quote Originally Posted by 6StringJazzer View Post
    STOCKHISTORY gets data from a third party company called Refinitiv. .
    Thanks for the information. Just want to build a program and help me study the historical data. Not for professional trading, just personal study. It is still better than checking one company at a time, manually on Yahoo Finance website.

    I have spent whole afternoon pulling data (more than 30 minutes before my first post 2:55pm, it is 4:43pm now, about 2.5 hours so far, still have around 300 symbols left). For such data (not large amount, only 10 calendar days for testing), it took less than 10 minutes sometimes.

  4. #4
    Forum Contributor
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    680

    Re: Why sometimes it takes so long for STOCKHISTORY to pull data?

    Ok, suddenly done. A few minutes ago (when I was writing above post, still around 300 symbols left), now suddenly all pop in, only 1 symbol GNPK left, it shows #VALUE! something wrong (sometimes all symbols can be pulled), but it is okay, as long as majority are pulled, I am fine.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA Code Takes too long to Run
    By rain4uu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2020, 11:02 AM
  2. macro too long and takes too long needs simplifying
    By margal in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-26-2016, 05:26 PM
  3. Subquery problem takes so long paste data
    By vahiddastitash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-04-2016, 01:38 AM
  4. HOw can I take Long column of Data to convert to number Quickly!
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2015, 07:19 PM
  5. Replies: 2
    Last Post: 12-04-2014, 11:14 AM
  6. Long code takes an age to run
    By E3iron in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-05-2009, 07:38 AM
  7. VBA takes too long to execute..
    By ruchi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-06-2009, 04:53 AM

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