Page 1 of 1
Read in DAILY data from FRED
Posted: Mon Apr 10, 2023 4:28 am
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
Re: Read in DAILY data from FRED
Posted: Mon Apr 10, 2023 7:47 am
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.
Re: Read in DAILY data from FRED
Posted: Mon Apr 10, 2023 8:22 am
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.
Re: Read in DAILY data from FRED
Posted: Tue Apr 11, 2023 5:42 am
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?
Re: Read in DAILY data from FRED
Posted: Tue Apr 11, 2023 2:03 pm
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.
Re: Read in DAILY data from FRED
Posted: Wed Apr 12, 2023 2:36 am
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.