Announcement

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

  • New command in ssc - getsymbols

    A new command, getsymbols, is up in ssc. I thank Chris Baum for uploading the command.
    getsymbols collects and integrates time series of symbols (e.g. stock tickers, indexes, economic series) from any of the following sources: Quandl, Yahoo Finance, Google Finance and Alpha Vantage. The symbols must be equal to those used in the corresponding source. Quandl is a repository of hundreds of free and premium databases, and each database usually has many series. Examples of FREE Quandl databases are: WIKI, Chicago Mercantile Exchange Futures, Chicago Board Options Exchange, Federal Reserve Economic Data, London Stock Exchange, Franfurt Stock Exchange, Tokyo Stock Exchange, National Stock Exchange of India, NASDAQ OMX Global Index Data, Yale Department of Economics, World Bank databases, etc. Google Finance has only stock daily data from several countries. Yahoo Finance has stock quotes and market indexes, and ETF's from many countries. Alpha Vantage has stock quotes, marke iindexes, and also cryptocurrency quotes. This command works with Stata 13 or above.
    To install the command, go to Stata command line and type
    Code:
    ssc install getsymbols
    .
    Author: Carlos Alberto Dorantes, Tecnológico de Monterrey, Querétaro Campus, Querétaro, México.
    Email: [email protected]

  • #2
    Hi Alberto,

    I am using getsymbols but it gives me the following error:

    getsymbols ^GSPC WMT, fy(2014) freq(m) yahoo clear price(adjclose)

    Error while getting data from Yahoo Finance: 101
    The ticker ^GSPC might not exist or did not exist in the specified dates.
    Error while getting data from Yahoo Finance: 101
    The ticker WMT might not exist or did not exist in the specified dates.

    Do you know why this is happening? I'm using Stata 16

    Comment


    • #3
      While I am a fan of getsymbols routine, when I encounter a problem I switch to fetchyahooquotas if I need data from Yahoo finance. Sometimes I experienced your same problem. I do not know why but I run the command using only one ticker and then I run it with all the tickers I need
      I know that this is not a direct answer to your question. I am sharing a suggestion to move quickly in your work. Possibly Alberto can give us a deeper and better answer.

      Comment


      • #4
        Lara Christ By the way, I run the command you mentioned above and It worked for me. Maybe you need to update the routine. Just click

        Code:
        adoupdate, update
        and see if this is the case

        Comment


        • #5
          Hi Lara. I just tried the getsymbols line in my Stata 16 and it worked. As Dario mentioned, it might be a good idea to update the command. Also, you could reinstall getsymbols:

          Code:
          ssc install getsymbols, replace
          I hope this help

          Comment


          • #6
            Hi, people!
            I had a similar problem. When a run the getsymbols and look for some Ticker the answer is:

            "Error while getting data from Yahoo Finance: 5100
            The ticker WMT might not exist or did not exist in the specified dates."

            I've tried the codes "adoupdate, update" and "ssc install getsymbols, replace".

            Does'nt work. There's another tip?

            Thanks!!

            Comment


            • #7
              Giordany BS I am able to use it just fine. I am on Stata 17 for Mac.

              For example:
              Code:
              . getsymbols ^GSPC WMT, fy(2014) freq(m) yahoo clear price(adjclose)
              The data is being pulled from Yahoo.com ; the variables of this dataset are:
                   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 ^GSPC was downloaded
              Symbol WMT was downloaded
              105 periods of 2 symbol(s) from Yahoo were downloaded.
              Number of observations with valid prices for all symbols: 105  out of  105

              Comment


              • #8
                Giordany BS i used getsymbols 5 minutes ago and it worked perfectly. If you show us the exact line of code you used, it would be useful to check if something is wrong.

                Comment


                • #9
                  Thanks, everyone...
                  Was a problem with my firewall.
                  ^^

                  Comment

                  Working...
                  X