Closed SebKrantz closed 1 year ago
Thanks Sebastian, glad to hear these have been helpful for you!
As long as you specify the quarterly variables using the endog_quarterly
argument, then the temporal aggregation structure that you're referring to is built-in to the state space model (accounting for this feature is why the endog_quarterly
value exists).
For monthly variables, the observation equation has the form:
$$y_{it}^M = \lambda_i ft + \varepsilon{it}$$
while for quarterly variables, it has the form:
$$y_{it}^Q = (\lambda_i ft + \varepsilon{it}) + 2 (\lambdai f{t-1} + \varepsilon_{it-1}) + 3 (\lambdai f{t-2} + \varepsilon_{it-2}) + 2 (\lambdai f{t-3} + \varepsilon_{it-3}) + (\lambdai f{t-4} + \varepsilon_{it-4})$$
You can confirm this by examining the "design" matrix $Z_t$ of the observation equation:
$$y_t = Z \alpha_t + \varepsilon_t$$
which you can find as results.model['design']
.
Final comment on the notebook: the FRED databases are no longer on amazon AWS, the base URL should be changed to:
Thanks for letting me know.
Thanks a lot for the swift response and clarification! My confusion was because the prediction of GDP is a monthly prediction, which made me think you are just returning $\tilde{y}_{it}^m = \lambda_i ft+\epsilon{it}$. I get now from your response that it is a monthly prediction of quarterly growth rates that is being returned. Since this is not very intuitive, it would be good to state this in the documentation for the DynamicFactorMQ
class.
Thanks, that is a good idea to note this in the documentation.
Dear Chad, thanks a lot for the excellent work of implementing these codes in Python. Regarding your example given in this notebook, you compute the quarterly forecast / nowcast from its unobserved monthly counterpart using
However, this does not correspond to the internal modelling a la Mariano and Murwasa (2003) or Banbura and Modugno (2014), where the quarterly series growth rate is a weighted average of the unobserved monthly series. I summarized this in this note here:
So, if you follow Banbura and Modugno (2014) as I presume, should not the quarterly forecast be obtained as:
Final comment on the notebook: the FRED databases are no longer on amazon AWS, the base URL should be changed to: