Read in DAILY data from FRED

For questions and discussion related to reading in and working with data.
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Read in DAILY data from FRED

Unread post by ac_1 »

Hi Tom,

I am reading in DAILY(7/Daily) data from FRED as:

Code: Select all

calendar(7) 1954:7:01
data(format=fred) 1954:7:01 %allocend() DFF
prin / DFF
stats DFF

set filter_missing = %valid(DFF)
sample(smpl=filter_missing) DFF / cDFF
calendar(irregular)
all %nobs
stats cDFF

prin / cDFF
an irregular series with weekends removed.

Plotting cDFF the series is very 'spikey' :!:

How do I remove the non-trading days?

thanks,
Amarjit
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Read in DAILY data from FRED

Unread post by TomDoan »

Why are you reading that as seven-day rather than five-day data? So far as I can tell, it never has any weekend data.
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Re: Read in DAILY data from FRED

Unread post by ac_1 »

Yes, even though https://fred.stlouisfed.org/series/DFF is Frequency: Daily, 7-Day; and if I download the Excel/CSV file the data is 7 days a week, I can read in as 5 days.

Code: Select all

calendar(d)
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Re: Read in DAILY data from FRED

Unread post by ac_1 »

I usually read in Daily data as IRREGULAR.

DFF is Frequency: Daily, 7-Day, read into RATS with CALENDAR(D) as 5 periods per week.

The following is a U.S. Holiday Archive list https://www.sifma.org/resources/general ... y-archive/ - I'm not certain it's definitive. Is it possible to map the holiday archive back (unfortunately only) from 1996 to remove those days?

Similarly, a list for future holidays https://www.nyse.com/markets/hours-calendars years 2023, 2024, 2025. Is it possible to map these holiday's forward?

Hence, allowing forecasts with CALENDAR(D) data, rather than IRREGULAR, taking into account future holidays?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Read in DAILY data from FRED

Unread post by TomDoan »

I'm not sure what the point is of doing that into the future. The Fed Funds rate on December 25, 2025 will be the Fed Funds rate from December 24, 2025. That's what FRED is doing on the Excel spreadsheets.
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Re: Read in DAILY data from FRED

Unread post by ac_1 »

I can remove the non-trading days with e.g.

Code: Select all

set DFF 2023:01:16 2023:01:16 = %na; * Martin Luther King, Jr. Day
And I think it's better to use IRREGULAR with this particular data set.
Post Reply