FRED/ALFRED series attributes question

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

Moderators: EViews Gareth, EViews Moderator

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

FRED/ALFRED series attributes question

Postby CharlieEVIEWS » Fri Oct 02, 2015 11:42 am

Dear all,

I really like the new fred/alfred integration, and I made extensive use of the EV8 version. It makes life a lot easier than using the fredapi wrapper in python directly. This becomes even more true when you want to obtain a series at a given date (e.g. the @ suffix) in

Code: Select all

copy fred::gdpdef@20150101 untitled::gpdef20150101

which i imagine is just a substitute for fred.get_series_as_of_date('gdpdef', '1/1/2015') if its going through some kind of python backend.

However, I have just one query and was wondering if you could provide some guidance. When youre in the FRED database window and you double click a queried series, you can bring up all the attributes of the series which comes from the DataFrame of that query (e.g. name = series id, description=title(?) etc, frequency, popularity). Is there any way (or workaround?) to pull this information into a workfile dynamically, using fetch or copy? I'm not too hot on databases in EViews, but any advice on this would be really useful. One thought might be to freeze the series attributes or something? But it isnt an object, so I cant quite figure it out.

Thanks again for all your efforts with this integration, and of course - best wishes as always.

Charlie

Edit: If this isnt currently possible in any way and should go into the 'suggestions' subforum, then please feel free to move the thread!

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: FRED/ALFRED series attributes question

Postby EViews Jason » Fri Oct 02, 2015 2:51 pm

If you use the fetch command, the attributes are also retrieved and can be viewed in the label view of the series.

Code: Select all

create u 1000
fetch fred::gdpdef@20150101
show GDPDEF_20150101.label  'note: use the EViews object name

'programatically get the 'popularity' attribute
string s=GDPDEF_20150101.@attr("popularity")
show s

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

Re: FRED/ALFRED series attributes question

Postby CharlieEVIEWS » Fri Oct 02, 2015 3:55 pm

That is absolutely perfect. One last question: Is the structure of the label the same for every series - i.e. will every series have identical attributes, regardless of its characteristics/entries in FRED?

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

Re: FRED/ALFRED series attributes question

Postby EViews Gareth » Fri Oct 02, 2015 4:01 pm

Each object's label will only show the attributes that it has. So if every object in your workfile has the same set of attributes, then yes, they will all have the same layout to their label view.

When pulling from FRED, EViews just gets whatever attributes are in FRED.
Follow us on Twitter @IHSEViews

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

Re: FRED/ALFRED series attributes question

Postby CharlieEVIEWS » Fri Oct 02, 2015 4:30 pm

Thats wonderful - thanks Gareth! It really saves a lot of time writing a .py with fredapi.

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

Re: FRED/ALFRED series attributes question

Postby CharlieEVIEWS » Fri Oct 02, 2015 4:47 pm

Ah - sorry to spam. I meant to mention this earlier: the label attribute names appear to be a bit different: is there any documentation about this? For example, compare:

Code: Select all

{
    "realtime_start": "2013-08-14",
    "realtime_end": "2013-08-14",
    "seriess": [
        {
            "id": "GNPCA",
            "realtime_start": "2013-08-14",
            "realtime_end": "2013-08-14",
            "title": "Real Gross National Product",
            "observation_start": "1929-01-01",
            "observation_end": "2012-01-01",
            "frequency": "Annual",
            "frequency_short": "A",
            "units": "Billions of Chained 2009 Dollars",
            "units_short": "Bil. of Chn. 2009 $",
            "seasonal_adjustment": "Not Seasonally Adjusted",
            "seasonal_adjustment_short": "NSA",
            "last_updated": "2013-07-31 09:26:16-05",
            "popularity": 39,
            "notes": "BEA Account Code: A001RX1"
        }
    ]
}


with
Attribute Value
Name: GNPCA_20130814
Display Name:
Last Update: Last updated: 10/03/15 - 00:43
Description: Real Gross National Product
Units: Billions of Chained 2009 Dollars
Frequency: Annual
Seasonal_adjustment: Not Seasonally Adjusted
Popularity: 36

Remarks: BEA Account Code: A001RX1

History: Original name: GNPCA@20130814


and ID becomes name, description becomes title, etc. Sorry for being a pain! A list of possible attributes and their eviews representations would be really super useful, but I cant find anything in the User Guides or the new online help system.

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: FRED/ALFRED series attributes question

Postby EViews Jason » Mon Oct 05, 2015 9:12 am

The relationships are not documented because the code can get complex in parts and are subject to change. Generally speaking however, here are the current rules:

The following most of the time have 1 to 1 relationships

Code: Select all

FRED to EViews
"id" = "name"
"last_updated"="last_update"
"title" = "description"
"notes" = "remarks"
"remarks" = "remarks2"


The following are used to determine the underlying EViews equivalent attribute, but these are not shown in the label view

Code: Select all

"frequency"
"observation_start"
"observation_end"


A combination of the following are used to generate the EViews attribute.

Code: Select all

"seasonal_adjustment_short" and "seasonal_adjustment"  = "seasonal adjustment"
"units_short" and "units" = "units"

All other FRED attributes may get created in EViews using the same name.

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

Re: FRED/ALFRED series attributes question

Postby CharlieEVIEWS » Mon Oct 05, 2015 9:14 am

Thanks Jason - that is very comprehensive, and really appreciated. I'm writing scripts to scrape and utilize all series dynamically, so these definitions are really integral. Many thanks again!


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 19 guests