Bulk Series Declaration

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

caburdick
Posts: 24
Joined: Mon Jun 15, 2009 7:41 am

Bulk Series Declaration

Postby caburdick » Fri Sep 30, 2011 6:57 am

Is there a way to use wildecards when definining new series? I have closing price data for a variety of asset indices and I would like to convert them all to gross rates of return. Is there a way to do something like:

series *_return = 1+@pcx(*_close)

I could declare a group and loop through elements of the group to define the new series one at a time, but it seems like something simpler should be possible.

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

Re: Bulk Series Declaration

Postby EViews Gareth » Fri Sep 30, 2011 7:49 am

No (and if you think of about it, there isn't a logical way such a thing could work).

caburdick
Posts: 24
Joined: Mon Jun 15, 2009 7:41 am

Re: Bulk Series Declaration

Postby caburdick » Fri Sep 30, 2011 9:03 am

Since * represents multiplication in a formula, such a command would require a redefinable wildcard (which some languages allow); are there further complications that I'm missing?

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

Re: Bulk Series Declaration

Postby EViews Gareth » Fri Sep 30, 2011 9:22 am

In your specific case, no, but in the more general case of:

Code: Select all

series *_return = 3
it clearly wouldn't work.

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

Re: Bulk Series Declaration

Postby startz » Fri Sep 30, 2011 10:26 am

In your specific case, no, but in the more general case of:

Code: Select all

series *_return = 3
it clearly wouldn't work.
Wouldn't that just set all series with a name ending in "_return" equal to 3?

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

Re: Bulk Series Declaration

Postby EViews Gareth » Fri Sep 30, 2011 11:33 am

Yes, but he wants to create new series. It would create an infinite amount of new series.

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

Re: Bulk Series Declaration

Postby startz » Fri Sep 30, 2011 11:42 am

Oh.
Is an infinite number of new series all that bad? Computers have a lot more RAM then they used to.

Actually, I'm not too enamored of wild cards in this situation. Too easy to introduce errors. Or in the case of the original request, what happens if there are different variable lists with postfix "_return" versus "_close"

But would it be easy to add a function that gave a list of all the prefixes of variables with a given wildcard prefix (or something) in order to make it easy to write a loop? Given that EViews doesn't have a native list object, maybe not so easy?


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 2 guests