I am having a bit of trouble understanding how the welfare cost of business cycle works.

I attach two folders (BC_cost_1 and BC_cost_2) containing code that generate different welfare costs but I am not entirely sure why this is the case because they both have the same steady state values. The difference between the models in ‘BC_cost_1’ and ‘BC_cost_2’ is that in the former, the variable ‘ub’ evolves according to a rule but it is fixed in the latter. I am concerned because I am getting a negative business cycle cost in BC_cost_1’, and a positive cost in the other solely owing to this one variable (ub).

The calculation of the welfare cost happens in welfare.m between lines 5 to 13. In order to generate the welfare values, kindly please run the run.m file, and then welfare.m immediately after which then gives you the values for the business cycle cost.

The run.m file should run cycle_moments.mod and second_moments.m as it is set up. I placed identical ‘readme’ files in each folder which clarifies what each model file does.

The difference in BC costs appear to be driven by ‘correctionWelf’ – line 7 in welfare.m. But I don’t understand why this value is different given that they both have the same initial value of ‘Welf’ (welfare). This must be driven by the variable ‘ub’ but I am not sure how. Although the two models have the same steady states, I notice that they have different second moments which I also don’t understand. Is it because they react differently to technology shocks?

With identical steady states, welfare in steady state (without any shocks) will be identical. That is what you observe. But in stochastic economies, welfare is a higher order property. You need to go to second order. That is where the uncertainty correction kicks in. You need to look at “mean welfare”, not welfare in the steady state.

My issue is whether I have altered the welfare calculations (welfare.m in ‘model1412_forum’) correctly to reflect the additional term in the utility function.

I have attached the two versions. ‘Replicationcode_forum’ is has the welfare file (welfare.m) with utility function i). Lines 5-13 are concerned with the welfare cost of business cycle. Lines 25-41 calculate the percentage increase in consumption needed to make the household indifferent between not implementing a policy and implementing it.

Welfare.m in the second file uses utility function ii). The relevant file which calculates welfare is welfare.m. I would be very grateful for your help.