Page 1 of 4

GetStocks (fetch stock data)

Posted: Mon Apr 05, 2010 1:38 pm
by EViews Gareth
This thread is about the GetStocks Add-in that provides an easy way to download US stock data into EViews.

Change log
  • 2010/02/10 - Initial release
  • 2010/04/07 - Added better error handling for invalid stock symbols
  • 2010/05/10 - Added a command line interface (see documentation)
  • 2011/03/04 - Added the following options:
    • Country/currency to fetch option (E.g. getstocks(curr="AX") bhp will download the bhp stock in Australian Dollar)
    • Data importing option (i.e. import the data either in a new workfile, a new page, or an existing page)
    • Option for specifying a list of the stock names (for more details, see documentation)
  • 2011/03/07 - Fix for cases where no workfile is open and the desired stocks start with an invalid EViews character (such as "^")

Re: GetStocks (fetch stock data)

Posted: Wed Apr 07, 2010 4:12 pm
by startz
If you put in an invalid stock symbol, the error message reads a little more like a "server error" rather than an, um, user error.

Re: GetStocks (fetch stock data)

Posted: Wed Apr 07, 2010 4:22 pm
by EViews Gareth
Just updated it, re-download it and try the latest one.

Re: GetStocks (fetch stock data)

Posted: Wed Apr 07, 2010 5:30 pm
by startz
Well, i was hoping you could prevent me from making errors in the first place :) ...but short of that it solves the problem

Re: GetStocks (fetch stock data)

Posted: Wed Apr 07, 2010 7:58 pm
by tchaithonov
I bet it would be way too many choices to load the names from source and put them in a list .... but is there a way to limit as to what users can put in? I know it's not the best comparison but what I am saying is similar to when you put in a stock name in Google finance, choices pops up in a list.... no idea how to write a constantly changing list object tho .......

Re: GetStocks (fetch stock data)

Posted: Wed Apr 07, 2010 8:12 pm
by EViews Gareth
That's a little beyond the current capabilities.

Re: GetStocks (fetch stock data)

Posted: Wed Apr 07, 2010 11:30 pm
by RobHayward
How can I open the aipz file? I have tried using Eviews but that does not work. I have tried winzip but that does not work. I am using Eviews 7.0 not 7.1. Do I need 7.1 and if I do, how can I get it?

Thanks

Re: GetStocks (fetch stock data)

Posted: Thu Apr 08, 2010 7:38 am
by EViews Steve
Rob:

We actually just published the 7.1 manual upgrade installer on our website last night. Currently, it's only available from our website (not via Automatic downloads within EViews). Go ahead and download it from there (http://www.eviews.com/download/download.html) and run the setup.

Steve

Re: GetStocks (fetch stock data)

Posted: Mon May 10, 2010 10:25 am
by EViews Gareth
Just uploaded a new version with a command line interface. This lets you use the downloader in a program without the dialog popping up:

Code: Select all

Syntax: getstocks(options) stocklist stocklist should be a space delimited list of stocks Options: o retrieve open price c retrieve close price h retrieve high price l retrieve low price a retrieve adjusted close price v retrieve volume start="date" start date of data (should be in quotes) end = "date" end date of data (should be in quotes) freq=key Frequency to fetch. Key can be 1 (daily), 2 (weekly) or 3 (monthly)
Thus, you could use it as:

Code: Select all

getstocks(o, c, h, l, start = "2006/04/03", end="2010/05/10") ihs c lyg

Re: GetStocks (fetch stock data)

Posted: Mon May 10, 2010 1:33 pm
by terrya
Just uploaded a new version with a command line interface. This lets you use the downloader in a program without the dialog popping up:

Code: Select all

Syntax: getstocks(options) stocklist stocklist should be a space delimited list of stocks Options: o retrieve open price c retrieve close price h retrieve high price l retrieve low price a retrieve adjusted close price v retrieve volume start="date" start date of data (should be in quotes) end = "date" end date of data (should be in quotes) freq=key Frequency to fetch. Key can be 1 (daily), 2 (weekly) or 3 (monthly)
Thus, you could use it as:

Code: Select all

getstocks(o, c, h, l, start = "2006/04/03", end="2010/05/10") ihs c lyg

Just tried it for indices . Error message comes up with "string assigned to scalar". I did the update for add-in.

Re: GetStocks (fetch stock data)

Posted: Mon May 10, 2010 1:43 pm
by EViews Gareth
Which indices did you try?

Re: GetStocks (fetch stock data)

Posted: Mon May 10, 2010 1:47 pm
by terrya
Which indices did you try?
NZ50, Aus all-ords, sp500, nyse, dow jones - used ^nz50 etc (as for the previous version). Maybe ^ the problem.

Re: GetStocks (fetch stock data)

Posted: Mon May 10, 2010 1:55 pm
by EViews Gareth
My bad. Silly mistake. Will upload a new version in the next few minutes.


Edit: update is up.

Re: GetStocks (fetch stock data)

Posted: Sat Jan 15, 2011 3:47 pm
by rod_jensen
I'm in the process of deciding whether to upgrade to EViews 7.0/7.1. The GetStocks data add-in sounds helpful and potentially powerful. A few quick questions, if you please will:
In general, is there any comprehensive, detailed literature available for this add-in?
Some things I'm interested in knowing are:
1. Does the add-in retrieve data from publicly available sites, such as yahoo, msn, etc.?
2. Is it also possible to retrieve index data, for example on broad market indexes (Dow, S&P, NASDAQ), ETFs, Mutual Funds, so on and so forth?
3. What securities/indexes ticker conventions are used? Are cusips identified? Are ETF and Mutual Fund tickers identified?
4. Is it possible to actually see/get to/manipulate the code which drives the add-in? Is the add-in code something that can be expanded upon once it's downloaded by a user?
5. How heavy duty are the retrieval capabilities? If I wanted to retrieve time series data on literally thousands of tickers, is it possible? Or is there a finite limit to the number of tickers (and/or length of time series) that can be retrieved? Maybe it's just a question of available RAM?
6. Is there desire/ambition to push beyond the ability to only fetch the following:
o retrieve open price
c retrieve close price
h retrieve high price
l retrieve low price
a retrieve adjusted close price
v retrieve volume
For example, this link (http://www.gummy-stuff.org/Yahoo-data.htm) lists lots of "tags" for different variables for a given security. A generalization of the above list (o, c, h, ... , v) to accomodate a broader set of indicatives (such as are on the link) could be huge for securities analysts, traders, etc.

Thanks much!

Re: GetStocks (fetch stock data)

Posted: Sat Jan 15, 2011 4:18 pm
by EViews Gareth
The add-in comes with documentation. When you download the add-in it comes as an AIPZ file. This is really just a zip file that EViews then unzips. If you don't have EViews 7.1, you can simply download the file yourself, change the extension from .aipz to .zip, then unzip it and inspect the code and documentation yourself.

1. Yahoo.
2. Any index that is supported by Yahoo.
3. The conventions used by Yahoo.
4. All add-ins are simply just EViews programs. Thus you can edit and manipulate it as much as you want.
5. The dialog version of the add-in won't support 1000s at a time. However the command line version probably will. However I believe I remember some problems due to Yahoo limiting the number of connections you can make.
6. Didn't know about those. It would be pretty simple to add them yourself. I'll add it to a list of things to think about doing ourselves though.