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.
Bulk Series Declaration
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Bulk Series Declaration
No (and if you think of about it, there isn't a logical way such a thing could work).
Re: Bulk Series Declaration
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
In your specific case, no, but in the more general case of:
it clearly wouldn't work.
Code: Select all
series *_return = 3
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3796
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Bulk Series Declaration
Wouldn't that just set all series with a name ending in "_return" equal to 3?In your specific case, no, but in the more general case of:
it clearly wouldn't work.Code: Select all
series *_return = 3
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Bulk Series Declaration
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
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?
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
