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 48.1 summarizes the options that the SASEFRED engine uses. In addition, there is one required option: API_KEY=’fred_api_key’.

Table 48.1: Summary of LIBNAME libref SASEFRED Options

Option

Description

APIKEY=

Specifies the required FRED access key that enables you to access the data that the FRED website provides.

AUTOMAP=

Specifies whether or not to overwrite the existing XML map file.

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.

PROXY=

Specifies the proxy server to use (if you cannot connect otherwise)

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))

RTSTART=

Specifies the real-time start date for the observation period (YYYY-MM-DD formatted string, optional; the default is today.)

RTEND=

Specifies the real-time end date for the observation period (YYYY-MM-DD formatted string, optional; the default is today.)

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 48.2 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.

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 48.3 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).

URL=

Specifies a URL from which to request useful information about available releases, vintage dates, tags, categories, sources, and series. The information is downloaded from the specified URL and stored in the XFREDTPU data set (a temporary utility data set), which can then be saved or renamed to a permanent SAS data set.