Fetching stock data into EViews

For posting your own programs to share with others

Moderators: EViews Gareth, EViews Moderator

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

Fetching stock data into EViews

Postby EViews Gareth » Thu Jan 07, 2010 10:57 am

This program fetches stock data into EViews from the Yahoo Finance website. It is presented here primarily as a way of demonstrating how the @uidialogs and word list functions in EViews 7 can be used to build some pretty powerful programs. However you may find it a useful tool for fetching stock data into EViews!

Note, this program requires EViews 7 to run.

I'd appreciate any comments you have, or suggestions on how it could be improved!
Attachments
stocks.prg
stock fetching program
(7.06 KiB) Downloaded 787 times
Follow us on Twitter @IHSEViews

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

Re: Fetching stock data into EViews

Postby terrya » Sat Jan 16, 2010 2:20 pm

QMS Gareth wrote:This program fetches stock data into EViews from the Yahoo Finance website. It is presented here primarily as a way of demonstrating how the @uidialogs and word list functions in EViews 7 can be used to build some pretty powerful programs. However you may find it a useful tool for fetching stock data into EViews!

Note, this program requires EViews 7 to run.

I'd appreciate any comments you have, or suggestions on how it could be improved!


Hi
I've just installed EV7 and run the program. It's nifty. I would like to be able to get indices such as SP500 etc. I tried altering the url to get the right address and failed. Any ideas?

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

Re: Fetching stock data into EViews

Postby EViews Gareth » Mon Jan 18, 2010 2:06 pm

Well you can get indices by entering the symbol for those indices. The problem, though, is that most indices' symbols start with a "^" character (^GSPC for S&P500, I think), which is an illegal EViews name character. Thus the @recode part of my wfopen and import statements won't work.

I'm currently stumped on how to get around that elegantly, but until a more elegant solution presents itself, the attached modification will do.
Attachments
stocks.prg
(7.28 KiB) Downloaded 781 times
Follow us on Twitter @IHSEViews

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

Re: Fetching stock data into EViews

Postby terrya » Mon Jan 18, 2010 3:20 pm

QMS Gareth wrote:Well you can get indices by entering the symbol for those indices. The problem, though, is that most indices' symbols start with a "^" character (^GSPC for S&P500, I think), which is an illegal EViews name character. Thus the @recode part of my wfopen and import statements won't work.

I'm currently stumped on how to get around that elegantly, but until a more elegant solution presents itself, the attached modification will do.


I have now run it and its works well enough for me. My problem initially was the ^.

oek_stat
Posts: 11
Joined: Thu Sep 30, 2010 1:11 am

Re: Fetching stock data into EViews

Postby oek_stat » Tue Dec 07, 2010 5:54 am

I can't download the price of ETFs like the iTraxx Europe 5-Year (DXSR.DE).
Perhaps there is a problem with points because the download of the stock price of BASF (BAS.DE) also doesn't work.


Return to “Program Repository”

Who is online

Users browsing this forum: No registered users and 12 guests