Hi all,

I am currently estimating a model from 1960q1 to 2019q4 with a set of shocks A.

I want then to use the estimated model to filter variables and decompose shocks using data from 2020q1 to 2024q2. Specifically, the model includes some extra unobserved shocks and additional observables in this latter sample. Call this set of shocks B, of which A is a strict subset. Note that all the B\A shocks are set to zero in the estimation period. These extra observables are set to zero for the estimation period and NaN from then onwards, as the goal of the procedure is to estimate their values post-estimation.

So far, I was trying to do this as follows:

- Write a .mod file for estimation with the A set of shocks, using data in the 1960q1 to 2019q4 period (‘code A’)
- Write a second .mod file with the B set of shocks, which loads the estimated parameters and reads 1960q1-2024q2 data to smooth variables and perform shock decompositions (‘code B’)

I noticed that the shock decompositions would generate some weird trends for some of the smoothed endogenous variables coming out of the code with the B set of shocks. I then noticed that these smoothed variables looked nothing like the smoothed variables coming out from the code A file. Even when I tried to restrict the calib_smoothed to 1960q1-2019q4, I get different series for the smoothed variables, even though these extra observables and shocks are all supposed to be zero during the estimation period. Thus my procedure is not valid.

My goal is to be able to perform shock decompositions using code B but “imposing” the smoothed values that are obtained with code A for the earlier part of the sample. Is there an easy way to do this using .mod files? Thank you!

Edit: I guess what I am asking for, more succintly, is the following: is there any way to make something like “histval” work with calib_smoother and shock_decomposition? I.e., impose initial values for all the state variables to these functions. Thank you.

Edit2: What I want is very similar to what Johannes is suggesting in this post. Is there an easy way to implement this?