Page 1 of 1

Bloomberg Link via Formula?

Posted: Tue Jan 24, 2017 1:16 pm
by kcaron
I need to create dozens of series with links to Bloomberg historic prices in EViews.

Currently, I'm pulling historical prices from Bloomberg into EViews one at a time, but this is very slow.

Ideally, I would like to write a program that creates a series (with an embedded link) via a loop.

Is there a way to write a program for this?

I know I can create a series manually then click on Properties > Values > External Link and manually enter fetch none::"XYZ Equity" and it will work.

It would just be much easier if I could set that value via a command line or program...

I'm using EViews 9.5 Enterprise Edition Dec 27 2016 Build

Thanks!

Re: Bloomberg Link via Formula?

Posted: Tue Jan 24, 2017 1:32 pm
by EViews Gareth
Not entirely sure I know what you're asking, but I think you just need to loop with the fetch command? Fetch has a link option that allows you to fetch as a link.

Re: Bloomberg Link via Formula?

Posted: Tue Jan 24, 2017 1:34 pm
by kcaron
Could you give me an example of how I might create a new series via a command line statement that incorporates fetch as link?

Re: Bloomberg Link via Formula?

Posted: Tue Jan 24, 2017 5:23 pm
by EViews Gareth

Code: Select all

fetch(link) nameofseries

Re: Bloomberg Link via Formula?

Posted: Thu Jan 26, 2017 2:44 pm
by kcaron
Unfortunately I can't figure out how to do this, even with your example (thank you!)...
Capture.PNG
Capture.PNG (11.31 KiB) Viewed 7192 times
Could you look at this and tell me if there is a way to create a series (using the command line) that will also set the series' external link like this? This would allow me to create a loop program that would let me add 160 series with linked values.

I've literally spent hours on this.

Sorry to bother you with this simple issue...

Kevin

Re: Bloomberg Link via Formula?

Posted: Thu Jan 26, 2017 3:11 pm
by EViews Gareth
The command I gave you does that.

Re: Bloomberg Link via Formula?

Posted: Thu Jan 26, 2017 4:18 pm
by EViews Jason
In order for links to work, the Bloomberg database will need to be in your database registry.
- Select Options->Database Registry and then press the Add new entry button.
- Enter an alias such as bloom
- select Bloomberg from the database type drop down
- enter your login information
- press ok

The following EViews command will then create the desired database link

Code: Select all

fetch(link) bloom::"ctas us equity"

Re: Bloomberg Link via Formula?

Posted: Thu Jan 26, 2017 6:47 pm
by kcaron
Thanks, Gareth!

I got it to create the series in EViews with the link.

But my little program below still doesn't work...


for %i ctas ibm gm

fetch(link) bloom::"{%i} us equity"

next


I imagine this program would insert three new and Bloomberg linked data series into the workfile.

Instead, I get this error:

"Database Error: Bloomberg library error: 'Invalid Security {%I} US EQUITY' in "FETCH(LINK) BLOOM:"{%I} US EQUITY"...

Re: Bloomberg Link via Formula?

Posted: Thu Jan 26, 2017 7:27 pm
by EViews Gareth

Code: Select all

for %i ctas ibm gm %name = %i + " us equity" fetch(link) bloom::%name next