Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • getsymbols.ado

    I have written numerous programs over the years downloading Yahoo stock data and suddenly today, I got error message 631 which refers to a firewall. I have done nothing in regards to the firewall. It might be at Yahoo end b ut not sure.,
    Also, I tried the option with google (finance) and ran into similar problems

    Anyone else with this?

  • #2
    The following worked successfully for me just now (code stolen from an earlier post)
    Code:
    import delimit "https://query1.finance.yahoo.com/v7/finance/download/%5EVIX?period1=1262304000&period2=1618531200&interval=1d&events=history&includeAdjustedClose=true" ,clear
    Please have a look at the Statalist FAQ for advice on effectively posing your questions and sharing Stata output. It would be helpful if you were to run the commands that get the error message and then copy those commands and their output from the Results window and pasted time into a new reply here using code delimiters [CODE] and [/CODE] to surround the pasted output. Then we could do a better job of trying to reproduce your experience.



    Comment


    • #3
      It appears that URLs in -getsymbols- have changed. If you change line 16 from
      Code:
      local urlyahoo = "https://l1-query.finance.yahoo.com/v7/finance/chart/"
      to
      Code:
      local urlyahoo = "https://query1.finance.yahoo.com/v7/finance/chart/"
      Afterwards, downloading from yahoo appears to work. I don't know what changes are necessary Google.

      Code:
      . getsymbols WMT, fy(2014) fm(3) fd(2) ly(2015) lm(6) ld(30)  price(adjclose) keepall yahoo clear
      The data is being pulled from Yahoo.com ; the variables of this dataset are:
           open high low close adjclose volume
      Period returns were calculated using the variable: adjclose and only this variable was kept; if you want to keep all variables use the option keepall
      Symbol WMT was downloaded
      336 periods of 1 symbol(s) from Yahoo were downloaded.
      Number of observations with valid prices for all symbols: 336  out of  336

      Comment


      • #4
        Thanks Scott, that was quite helpful
        Last edited by Allan Gregory; 19 May 2021, 18:56.

        Comment


        • #5
          Thanks Scott! I received some emails about this problems with getsymbols. Thanks for finding a solution! I will update the getsymbols command

          Comment


          • #6
            getsymbols 1.1 is up at ssc.

            You can now install the new version of getsymbols from ssc:

            Code:
            ssc install getsymbols
            If you had a previous installation of getsymbols, type:

            Code:
            ssc install getsymbols, replace
            This will fix the problem with Yahoo Finance

            Comment

            Working...
            X