The SASEFRED Interface Engine

Syntax: SASEFRED Interface Engine

The SASEFRED interface engine uses standard engine syntax to read the observations or data values for one or more economic time series. Table 39.4 summarizes the options that the SASEFRED engine uses. In addition, there is one required option: API_KEY=’fred_api_key’.

Table 39.4: Summary of LIBNAME libref SASEFRED Options

Option

Description

IDLIST=

Specifies a list of time series IDs for accessing FRED data. To select more than one time series, list the unique time series IDs, separated by commas.

START=

Specifies the start date for the observation period (YYYY-MM-DD formatted string, optional; the default is 9999-12-31 (latest available))

END=

Specifies the end date for the observation period (YYYY-MM-DD formatted string, optional; the default is 1776-07-04 (earliest available))

FREQ=

Specifies the reporting frequency of the selected data (lower frequency to aggregate values to): ‘m’ for monthly, ‘d’ for daily. The FRED frequency aggregation feature converts higher-frequency data series to lower-frequency time series (such as converting a monthly time series to an annual time series). See Table 39.5 for the complete list of frequencies.

AGG=

Specifies the aggregation method used for frequency aggregation. The valid aggregation arguments are ’avg’, ’sum’, and ‘eop’; the default is ‘avg’.

LIMIT=

Specifies the maximum number of observations (rows) to return (integer between 1 and 100,000, optional; the default is 100,000)

OFFSET=

Specifies the number of rows (observations) to skip in the returned data set. Specifying OFFSET=0 is the same as omitting the OFFSET= option. If you specify both the OFFSET= and LIMIT= options, the number of rows specified in the OFFSET= option is skipped before the count begins of the number of rows, specified in the LIMIT= option, that are returned (nonnegative integer, optional; the default is 0).

SORT=

Specifies the order of the results in ascending or descending observation_date order. The valid sort arguments are ‘asc’ and ‘desc’; the default is ‘asc’.

UNITS=

Specifies a data value transformation. The valid units arguments are ‘lin’, ‘chg’, ‘ch1’, ‘pch’, ‘pc1’, ‘pca’, ‘cch’, ‘cca’, and ‘log’; the default is ‘lin’. See Table 39.6 for more information about units.

VINTAGE=

Specifies one or more dates in history. Vintage dates are used to download data as they existed on that specific date in history (YYYY-MM-DD formatted string, optional; by default no vintage dates are set). You can request one or many vintage dates at a time; dates are in YYYY-MM-DD format and are separated by commas (no blanks allowed). For multiple vintage dates, specify OUTPUT=2 for all observations or OUTPUT=3 for only new or revised observations.

OUTPUT=

Specifies an output type. The valid output arguments are ‘1’ for Observations by Real-Time Period; ‘2’ for Observations by Vintage Date, All Observations; ‘3’ for Observations by Vintage Date, New and Revised Observations Only; and ‘4’ for Observations, Initial Release Only (integer, optional; the default is ‘1’).

FORMAT=

Specifies a file extension that indicates the type of file to retrieve. Only XML is supported for the SASEFRED interface engine in SAS/ETS 13.1 (SAS 9.4).