GetStocks (fetch stock data)

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13306
Joined: Tue Sep 16, 2008 5:38 pm

GetStocks (fetch stock data)

Postby EViews Gareth » Mon Apr 05, 2010 1:38 pm

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 "^")

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: GetStocks (fetch stock data)

Postby startz » Wed Apr 07, 2010 4:12 pm

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13306
Joined: Tue Sep 16, 2008 5:38 pm

Re: GetStocks (fetch stock data)

Postby EViews Gareth » Wed Apr 07, 2010 4:22 pm

Just updated it, re-download it and try the latest one.
Follow us on Twitter @IHSEViews

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: GetStocks (fetch stock data)

Postby startz » Wed Apr 07, 2010 5:30 pm

Well, i was hoping you could prevent me from making errors in the first place :) ...but short of that it solves the problem

tchaithonov
Posts: 168
Joined: Mon Apr 13, 2009 7:39 am
Location: New York City

Re: GetStocks (fetch stock data)

Postby tchaithonov » Wed Apr 07, 2010 7:58 pm

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 .......

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13306
Joined: Tue Sep 16, 2008 5:38 pm

Re: GetStocks (fetch stock data)

Postby EViews Gareth » Wed Apr 07, 2010 8:12 pm

That's a little beyond the current capabilities.
Follow us on Twitter @IHSEViews

RobHayward
Posts: 11
Joined: Fri Feb 19, 2010 3:21 am

Re: GetStocks (fetch stock data)

Postby RobHayward » Wed Apr 07, 2010 11:30 pm

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

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: GetStocks (fetch stock data)

Postby EViews Steve » Thu Apr 08, 2010 7:38 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13306
Joined: Tue Sep 16, 2008 5:38 pm

Re: GetStocks (fetch stock data)

Postby EViews Gareth » Mon May 10, 2010 10:25 am

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
Follow us on Twitter @IHSEViews

terrya
Posts: 107
Joined: Wed Aug 26, 2009 2:37 pm

Re: GetStocks (fetch stock data)

Postby terrya » Mon May 10, 2010 1:33 pm

EViews Gareth wrote: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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13306
Joined: Tue Sep 16, 2008 5:38 pm

Re: GetStocks (fetch stock data)

Postby EViews Gareth » Mon May 10, 2010 1:43 pm

Which indices did you try?
Follow us on Twitter @IHSEViews

terrya
Posts: 107
Joined: Wed Aug 26, 2009 2:37 pm

Re: GetStocks (fetch stock data)

Postby terrya » Mon May 10, 2010 1:47 pm

EViews Gareth wrote:Which indices did you try?

NZ50, Aus all-ords, sp500, nyse, dow jones - used ^nz50 etc (as for the previous version). Maybe ^ the problem.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13306
Joined: Tue Sep 16, 2008 5:38 pm

Re: GetStocks (fetch stock data)

Postby EViews Gareth » Mon May 10, 2010 1:55 pm

My bad. Silly mistake. Will upload a new version in the next few minutes.


Edit: update is up.
Follow us on Twitter @IHSEViews

rod_jensen
Posts: 4
Joined: Sat Jan 15, 2011 1:40 pm

Re: GetStocks (fetch stock data)

Postby rod_jensen » Sat Jan 15, 2011 3:47 pm

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!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13306
Joined: Tue Sep 16, 2008 5:38 pm

Re: GetStocks (fetch stock data)

Postby EViews Gareth » Sat Jan 15, 2011 4:18 pm

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.
Follow us on Twitter @IHSEViews


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 16 guests