I hope someone may help me with the following question. I intend to calculate the ex-ante lifetime utility at time t. Before t, the economy has TFP which has a smaller volatility where at t the volatility increases once for all. Thus the agent should have a transition period. I could write the problem in a recursive form, that is, I can express the ex-ante lifetime utility as the value function v=u+beta*v(+1). Basically if I understand the common method of Dynare, I should compute the theoretical mean of v considering transition dynamics.

I don’t if I can do it using dynare. Or maybe you have a better idea to measure the ex-ante lifetime utility.

Welfare is a function of the relevant state variables. All you need to know is the value of the state variables when the unexpected change happens. You need to plug in the value of these states into the new decision rules. In your case, the agent will be at the mean given the lower TFP volatility. The states will converge to the mean given the higher volatility. This transition is reflected in the value for welfare using the decision rules given higher TFP volatility, but evaluated at the states reflecting lower volatility.

I think I understand what you said. But when I tried to realize the procedures, I found another question: I should input the values at the states indicating the mean with lower volatility at the initval block and should not type “steady”. The steady state computation was triggered as well by the command stoch_simul as the guide said. But these steady state values were different from what I computed from the model equations in steady state. I wonder if it means I did wrongly.

is the wrong place to put these initial conditions. It might have to go into
histval
depending on what you are trying to do (see the manual). But it might be easier to just use the

simult_

function to get the desired welfare value given the states

I’m sorry, Johannes! I didn’t notice your reply at that time. I did try by myself an approach, yet now I think it went wrong. I wonder if “function to get the desired welfare value given the states” you mentioned has been developed by someone.

Because we wanted to evaluate welfare conditional on being in steady state without shocks. But you can adapt that code to use any initial state and any shock matrix.

I see. Let me summarize the whole question and the solution in my mind. Since I intend to calculate the ex-ante lifetime utility at t when the TFP volatility increases permanently, I need to first express the ex-ante lifetime utility as a recursive form. Then I compute the decision rule. Next I use the function “simult_” after I input the initial state as the mean given the lower TFP volatility. I should set the shock matrix as in oo_.exo_simul to get a time series of lifetime utility. Finally I take the mean of the time series to get a conditional mean.

Correct! But anyhow, I will apply the 3rd order approximation which does not generate theoretical means. I plan to compute conditional welfare along different paths and then aggregate all values to produce unconditional welfare. How do you like it?

By the way, I also tried the command histval. The codes turn out to work, but the result is different from the function simult_.

This is tricky. There are issues with the unit root you will have in your volatility measure of the shock is permanent and the question of using pruning if you want to simulate.

I‘m not sure if I have got your point. Do you say the same thing as “they often
generate explosive sample paths even when the corresponding linearized solution is stable” from Andreasen, Fernandez-Villaverde and Rubio-Ramirez (2017)? If so, perhaps I can study their accompanied codes.