Portfolio123 values for Fred series vary in their frequency (monthly, weekly, ?) and some didn't used to be point in time (instead subject to past dated changes). Are they all now point in time? And when do new monthly and weekly values get posted? I am trying some for timing and perhaps other purposes, but if there are significant delays in posting or historical values are not point in time then the results might not help much.
Series published by FRED are either seasonally adjusted or not seasonally adjusted. When the PITSeries() feature was removed, the information that was disclosed in the description was lost. As an immediate workaround, the FRED ID may be used to see the source of the data. For example, https://fred.stlouisfed.org/series/RECPROUSM156N for ##RECPROB. These series are updated daily from FRED.
As far as I've seen, only series that are seasonally adjusted have historical effective dates available, and Portfolio123 doesn't provide any mechanism to compensate for the lack thereof for series that are not seasonally adjusted. So an option might be to leverage FHist() or series offset to delay the data artificially, eliminating lookahead.
Thanks, Aaron.
So FHist(”##CPI”,n) provides the value as released by FRED n months(or weeks?) ago, while Close(12,##CPI) provides the possibly adjusted FRED value for 12 months ago as known today, since ##CPI is a monthly value?
That's right.
-
FHist()returns the value that was available n weeks ago.FHistalways works in weeks, regardless of the underlying series cadence. SoFHist("Close(0, GetSeries(`##CPI`))",4)gives you the CPI value that was known approximately four weeks ago. -
Close(n, GetSeries("##CPI"))works in the cadence of the series. Since CPI is monthly,Close(12, GetSeries("##CPI"))returns the CPI value for 12 monthly bars ago, using the value currently stored for that historical period.
The same concept of series cadence also applies to aggregate series. Aggregate series can be set up with either a daily or weekly cadence. For a daily series, each bar represents one day; for a weekly series, each bar represents one week. So, for example, Close(1, ...) on a weekly aggregate series refers to the prior week's bar.
Thank you for the clarification. I have some comparisons to make!
A few points to clarify here.
As Walter stated, the correct syntax for FHist is FHist("Close(0, ##CPI)", n) or FHist("Close(0, GetSeries(`##CPI`))", n) to access historical values.
But more importantly, FHist only offers historical access based on weeks instead of bars for series which are not seasonally adjusted. It does not add point-in-time functionality. So for the task at hand, FHist and Close with offset may only be used to lag points to reduce lookahead for series which are not seasonally adjusted.
##CPI is seasonally adjusted, so it can be used directly without any compensation needed.
Ok, thank you!
I’ve been meaning to mention this (maybe it was mentioned elsewhere) but FRED only gives you 3 years of trailing high yield options adjusted spreads (e.g. BAMLH0A0HYM2). Important to know if yo use any of these series in a backtest. And make sure you don’t delete your file if you were lucky enough to have a copy saved before the change earlier this year.
One last thing…I am very cautious about using FRED data as it represents the latest revised version. Use ALFRED if you want vintage data that is point in time. alfred.stlouisfed.org