The SASEFRED Interface Engine

Example 39.4 Selecting Time Series When Native Frequency Is Greater Than Requested Frequency

This example shows how to retrieve data for multiple time series that have different default frequencies. The time series are Domestic Financial Commercial Paper Outstanding (DFINCP), Domestic Nonfinancial Commercial Paper Outstanding (DNFINCP), Foreign Financial Commercial Paper Outstanding (FFINCP), Foreign Nonfinancial Commercial Paper Outstanding (FNFINCP), and Total Credit Market Assets Held by Domestic Financial Sectors (ABSITCMAHDFS). The native frequency of the first four time series is ‘Weekly’, and the native frequency of the last time series (ABSITCMAHDFS) is ‘Quarterly’. The requested frequency as it is specified by the FREQ= option is ‘Quarterly’ (FREQ=q). The native frequency of all five time series is either greater than or equal to the requested frequency. Hence, the output includes the data for all time series.

title 'Selecting Time Series When Native Frequency Is Greater Than Requested Frequency';
libname _all_ clear;

libname fred sasefred "%sysget(FRED)"
   OUTXML=fredex04
   AUTOMAP=replace
   MAPREF=MyMap
   XMLMAP="%sysget(FRED)fredex04.map"
   APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   IDLIST='dfincp,dnfincp,ffincp,fnfincp,absitcmahdfs'
   START='2010-01-01'
   END='2010-05-20'
   FREQ='q'
   OUTPUT=1
   FORMAT=xml;

data diffNative_freqq;
   set fred.fredex04;
run;
proc contents data=diffNative_freqq; run;
proc print data=diffNative_freqq; run;

Output 39.4.1: Selecting Time Series When Native Frequency Is Greater Than Requested Frequency

Selecting Time Series When Native Frequency Is Greater Than Requested Frequency

Obs date realtime_start realtime_end DFINCP DNFINCP FFINCP FNFINCP ABSITCMAHDFS
1 2010-01-01 2013-09-26 2013-09-26 352.1 84.0 229.0 35 2547.36
2 2010-04-01 2013-09-26 2013-09-26 341.6 98.5 186.9 38 2418.72