Aruoba Diebold Scotti Real-Time Factor Model
Aruoba Diebold Scotti Real-Time Factor Model
https://estima.com/procedures/adsjbes2009.zip has the program and data file for replicating the real-time factor model in Aruoba, Diebold and Scotti(2009), "Real-Time Measurement of Business Conditions," Journal of Business and Economic Statistics, vol 27, no 4, 417-427. This develops a business cycle index using four series observed at different frequencies (daily, weekly, monthly and quarterly). Because two of the series are "flows", the sum of the index across their observed range is needed. In the paper, this is done by creating a huge state vector, long enough to include an entire quarter of days. A more efficient way to do this is to create aggregator states:
x7(t) = x7(t-1)+x(t) if there is no weekly observation at t-1, x7(t)=x(t) if there is
xq(t) = xq(t-1)+x(t) if there is no quarterly observation at t-1, xq(t)=x(t) if there is
This requires "poking" a 1 or 0 into the diagonal element of the transition matrix, 1 when the first branch in a line holds, 0 when it's the second.
x7(t) = x7(t-1)+x(t) if there is no weekly observation at t-1, x7(t)=x(t) if there is
xq(t) = xq(t-1)+x(t) if there is no quarterly observation at t-1, xq(t)=x(t) if there is
This requires "poking" a 1 or 0 into the diagonal element of the transition matrix, 1 when the first branch in a line holds, 0 when it's the second.
Re: Aruoba Diebold Scotti Real-Time Factor Model
Dear Tom Doan,
Thank you for posting your code!
I was trying to figure out the difference between IJC1 and IJC0, EMP1 and EMP0, and GDP1 vs GDP0.
I does not look like one is the lag of the other.
May be one is the detrended version of the other?
I would appreciate if you can give me a hint.
Thank you!
Thank you for posting your code!
I was trying to figure out the difference between IJC1 and IJC0, EMP1 and EMP0, and GDP1 vs GDP0.
I does not look like one is the lag of the other.
May be one is the detrended version of the other?
I would appreciate if you can give me a hint.
Thank you!
Last edited by Ermine on Thu Aug 06, 2015 9:28 pm, edited 1 time in total.
Re: Aruoba Diebold Scotti Real-Time Factor Model
The model has each observable series as an AR(1) in its own frequency, so GDP lags back to the previous quarter. GDP1 is the previous quarter's value, while GDP0 is the current quarter's value, similarly for the others (in their frequency). The position of actual values in GDP0 (and the other "0" series) is critical because they determine where you have an "observation" in the measurement equation---you have some entries with no observable Y's, many with 1 (for the five-day-a-week slope series), some with 2 or 3. (It doesn't look like there are any with 4 because IJC is recorded on a Saturday).
Re: Aruoba Diebold Scotti Real-Time Factor Model
Thank you, this is exactly what I first thought of!TomDoan wrote:GDP1 is the previous quarter's value, while GDP0 is the current quarter's value, similarly for the others (in their frequency).
But the numbers do not look like that.
As an example, consider EMP. On 31 May 1962, EMP1 (first lag) is -0.34101, but one period ago, on 30 April1962, EMP0 is -0.327756. But these numbers are supposed to be equal.
What can be the source of this discrepancy? Can it be related to detrending?
Thank you!
Last edited by Ermine on Thu Aug 06, 2015 9:28 pm, edited 1 time in total.
Re: Aruoba Diebold Scotti Real-Time Factor Model
Based upon the paper, they should be the same. You would have to ask the authors about that.
Re: Aruoba Diebold Scotti Real-Time Factor Model
Thank you! I didn't know that these are original data.TomDoan wrote:You would have to ask the authors about that.
Re: Aruoba Diebold Scotti Real-Time Factor Model
From communication with one of the authors:
Thanks for pointing this out...the EMP1_use series should be EMP0_use lagged.
Hope this may be of help to someone.
Thanks for pointing this out...the EMP1_use series should be EMP0_use lagged.
Hope this may be of help to someone.
Re: Aruoba Diebold Scotti Real-Time Factor Model
Prof. Aruoba pointed out that we had had the same conversation with him several years ago, and the existing program already ignores the xxx1_use program for all but the initial lagged value---after that, the lags are generated using the good data, so what you have is correct.
Re: Aruoba Diebold Scotti Real-Time Factor Model
Thank you for the clarification!
It may be worth mentioning that even though the original data for the EMP1 is slightly imprecise (contrary to what I previously claimed, this does not relate to IJC1 and GDP1), using it (which is what I did) does not preclude one from replicating the original results from the paper (Figure 1). This is because the discrepancies between lagged EMP0 and current EMP1 are not that large to affect the final result.
It may be worth mentioning that even though the original data for the EMP1 is slightly imprecise (contrary to what I previously claimed, this does not relate to IJC1 and GDP1), using it (which is what I did) does not preclude one from replicating the original results from the paper (Figure 1). This is because the discrepancies between lagged EMP0 and current EMP1 are not that large to affect the final result.
Last bumped by TomDoan on Wed Jun 11, 2025 9:44 am.