Page 1 of 1
Welfare cost of business cycles
Posted:
Tue Apr 01, 2014 9:39 am
by Philipp
Dear Dynare users,
I would like to calculate the Welfare cost of business cycles associated to a particular monetary regime, as it is done in "Stabilization Policy and the costs of dollarization" by Schmitt-Grohé and Uribe (2000), section 6, pages 17-18.
How do I have to implement
U((1-\xi)c,h)=E[U(c,h)]
in order to find \xi?
Suppose further that U(c,h)=\frac{c^{1-\sigma}}{1-\sigma}-\varphi\frac{n^{1+\nu}}{1+\nu}, I know that I have to take a second order approximation around the non-stochastic steady state. What I do not understand is how this can be implemented in Dynare. Where do I extract which information? Can this be done in an m. file outside of Dynare?
I'd appreciate a simple example code.
Best,
Philipp
Re: Welfare cost of business cycles
Posted:
Wed Apr 02, 2014 8:55 am
by jpfeifer
If you set order=2 and simulate a long enough time series, Dynare will provide you with E[U(c,h)]. Given that you know the functional form for utility as well as the steady state values for c and h, you can analytically solve
\frac{((1-\xi)*c_ss)^{1-\sigma}}{1-\sigma}-\varphi\frac{n_ss^{1+\nu}}{1+\nu}=E[U(c,h)]
for xi.
You might also be able to use theoretical moments, but there one would need to check whether second moments based on the first order approximation a la Kim/Kim/Schaumburg/Sims are sufficient.
Re: Welfare cost of business cycles
Posted:
Mon Apr 07, 2014 9:57 am
by Philipp
Dear jpfeifer,
first of all thank you very much for your response.
I have a follow up question though: What do you mean by "simulate a long enough time series, Dynare will provide you with E[U(c,h)]"? What is "long enough" and where is "E[U(c,h)]" stored?
Do I have to specify in my model block something like U=\frac{c^{1-\sigma}}{1-\sigma}+\theta\frac{n^{1+\nu}}{1+\nu} and Welfare = U + \beta*Welfare(+1)? I have seen this approach in some blog entries but I do not see the intuition here.
Best,
Philipp
Re: Welfare cost of business cycles
Posted:
Mon Apr 07, 2014 11:58 am
by jpfeifer
I was referring to the fact that by the law of large numbers a long simulation will converge to the expected value. For this to work, you need to define U(c,h), but you have a formula for that. The expected value will be stored in oo_.mean after simulation (set periods=100000, that should suffice).
Welfare = U + \beta*Welfare(+1) is used when you want to compare welfare instead of just the period utility. The U in your example is the felicity function while Welfare is the lifetime utility computed as the infinite discounted sum of per period utilities. In order to enter the infinite sum into the computer, it is written recursively as
- Code: Select all
Welfare = U + \beta*Welfare(+1)
Regarding the paper you cite, the way to implement your formula is given in equation (45). You know the parameters and Dynare will provide the variance of hat x_t.
Re: Welfare cost of business cycles
Posted:
Mon Apr 07, 2014 1:59 pm
by Philipp
Dear jpfeifer,
I understand now how to derive equation 45 in the paper and that I would measure welfare as the permanent relative change in consumption, \chi, that yields expected utility E[U(c,n)]. The first question here is then, where do I get the vector for the variance of hat x_t (which has the entries for variance of hat c_t and variance of hat n_t)?
Next, I must confess that there are several other things that confuse me:
- What exactly is the difference of conditional and unconditional welfare? All my models have the same non-stochastic steady state, i.e. the steady state is independent of monetary policy regime.
- Where is the difference in measuring welfare costs as
U((1-\xi)c,n)=E[U(c_t,n_t)]
and measuring it as
V_t^A=\mathbb{E}_t\sum_{t=0}^{\infty}\beta^tU(c_t^A,n_t^A) //regime A
V_t^B=\mathbb{E}_t\sum_{t=0}^{\infty}\beta^tU(c_t^B,n_t^B) //regime B
where the welfare cost \chi is then
V_t^B=\mathbb{E}_t\sum_{t=0}^{\infty}\beta^tU((1+\chi)c_t^A,n_t^A)?
Following the approach where I have Welfare = U + \beta*Welfare(+1). How do I specify U when my model is in logs, would it then read exp(Welfare) = exp(U) + \beta*exp(Welfare(+1))? or Welfare = exp(U) + \beta*Welfare(+1)?
I hope to get some clarification here, as you see I am quite lost in the trees...
Best wishes,
Philipp
Re: Welfare cost of business cycles
Posted:
Wed Apr 09, 2014 10:59 am
by jpfeifer
The variances are saved in oo_.variance.
For the difference between conditional and unconditional welfare, see Section 3.3 "The Welfare Measure" in Schmitt-Grohe/Uribe (2004) "OPTIMAL SIMPLE AND IMPLEMENTABLE MONETARY AND FISCAL RULES", NBER Working Paper 10253. It is important to look at this version of the paper and not later ones. In a nutshell, for one version you use the conditional expectations operator (given that you are in the determinstic steady state) and in the other one the unconditional one. This makes a difference because at higher order the system transitions from the deterministic steady state to the ergodic distribution. This transition is absent in the unconditional welfare measure as the expectation is taken over the ergodic distribution.
SGU (2001) "Stabilization Policy and the Costs of Dollarization" uses unconditional welfare.
For unconditional welfare, there is no difference between the two. The reason is linearity of the expectations operator. You want to compare unconditional lifetime utility in the steady state and under some policy. You have
\mathbb{E}\sum_{t=0}^{\infty}\beta^tU((1-\xi)\bar c,\bar n)=\mathbb{E}\sum_{t=0}^{\infty}\beta^tU(c_t,n_t)
This is
\sum_{t=0}^{\infty}\beta^t\mathbb{E}(U((1-\xi)\bar c,\bar n))=\sum_{t=0}^{\infty}\beta^t\mathbb{E}(U(c_t,n_t))
which is
1/(1-beta)*U((1-\xi)\bar c,\bar n)=1/(1-beta)*\mathbb{E}(U(c_t,n_t))
and thus
U((1-\xi)\bar c,\bar n)=\mathbb{E}(U(c_t,n_t))
Hence, it is sufficient to compare the felicity functions because everything is stationary. The \xi you compute would be the same. Things are different if you use recursive utility or conditional welfare.
As you are not interested in a log approximation to Welfare itself, only in one for consumption and labor, you can use either representation. For extracting xi, it does not matter whether your endogenous variable is log(Welfare) or Welfare itself (the same applies to U itself). But one warning: using a variable substitution with exp() implies that e.g. the argument of exp(U) is actually log(U) so that exp(log(U))=U. When doing this, you need to make sure that the original U which is now logged is not negative.
Re: Welfare cost of business cycles
Posted:
Wed Apr 09, 2014 11:57 am
by Philipp
Dear jpfeifer,
thank you for your elaborate response which clarifies things a lot.
I understand now the difference in unconditional and conditional welfare and should be able to compute the measures.
I will be back with a code hopefully soon.
Best and thank you very much,
Philipp
Re: Welfare cost of business cycles
Posted:
Tue Oct 13, 2015 11:32 pm
by brainking
jpfeifer, just to make sure I understand the difference between conditional and unconditional welfare. Conditional welfare calculates the discounted future period utilities when the system starts from the deterministic steady state. On the other hand, unconditional welfare calculation starts from the stochastic steady state?
In dynare, I write welfare recursively as
Welf = Util + beta*Welf(+1);
where Util is the period utility.
Then I ask dynare to solve the the model to 2nd order. The theoretical mean of Welf corresponds to the conditional welfare, right? Then how do I compute unconditional welfare in this case?
jpfeifer wrote:The variances are saved in oo_.variance.
For the difference between conditional and unconditional welfare, see Section 3.3 "The Welfare Measure" in Schmitt-Grohe/Uribe (2004) "OPTIMAL SIMPLE AND IMPLEMENTABLE MONETARY AND FISCAL RULES", NBER Working Paper 10253. It is important to look at this version of the paper and not later ones. In a nutshell, for one version you use the conditional expectations operator (given that you are in the determinstic steady state) and in the other one the unconditional one. This makes a difference because at higher order the system transitions from the deterministic steady state to the ergodic distribution. This transition is absent in the unconditional welfare measure as the expectation is taken over the ergodic distribution.
SGU (2001) "Stabilization Policy and the Costs of Dollarization" uses unconditional welfare.
For unconditional welfare, there is no difference between the two. The reason is linearity of the expectations operator. You want to compare unconditional lifetime utility in the steady state and under some policy. You have
\mathbb{E}\sum_{t=0}^{\infty}\beta^tU((1-\xi)\bar c,\bar n)=\mathbb{E}\sum_{t=0}^{\infty}\beta^tU(c_t,n_t)
This is
\sum_{t=0}^{\infty}\beta^t\mathbb{E}(U((1-\xi)\bar c,\bar n))=\sum_{t=0}^{\infty}\beta^t\mathbb{E}(U(c_t,n_t))
which is
1/(1-beta)*U((1-\xi)\bar c,\bar n)=1/(1-beta)*\mathbb{E}(U(c_t,n_t))
and thus
U((1-\xi)\bar c,\bar n)=\mathbb{E}(U(c_t,n_t))
Hence, it is sufficient to compare the felicity functions because everything is stationary. The \xi you compute would be the same. Things are different if you use recursive utility or conditional welfare.
As you are not interested in a log approximation to Welfare itself, only in one for consumption and labor, you can use either representation. For extracting xi, it does not matter whether your endogenous variable is log(Welfare) or Welfare itself (the same applies to U itself). But one warning: using a variable substitution with exp() implies that e.g. the argument of exp(U) is actually log(U) so that exp(log(U))=U. When doing this, you need to make sure that the original U which is now logged is not negative.
Re: Welfare cost of business cycles
Posted:
Wed Oct 19, 2016 9:16 am
by jojokre
brainking, there is another part of this forum where the question of unconditional vs. conditional welfare is adressed:
viewtopic.php?f=1&t=4837 From Michel's post there, I understand that the welfare you calculate with your approach (theoretical mean of welfare) is unconditional welfare. Conditional welfare you can obtain from running simulations.
Re: Welfare cost of business cycles
Posted:
Wed Oct 19, 2016 6:49 pm
by jpfeifer
The difference between conditional and unconditional welfare is not about the mean, it is about the conditioning set for the expectations operator. The mean aims at computing an expected value. That expected value can either be the unconditional expected value
- Code: Select all
E(Welfare)
or a conditional expected value, i.e. conditional on the information at time t.
- Code: Select all
E_t(Welfare)
The unconditional mean (as e.g. saved in
- Code: Select all
oo_.mean
) can be interpreted as integrating out initial conditions and future shocks. In contrast, the conditional mean will take the starting point in the state space at time t into account and only integrate over future shocks.
For that reason, the conditional welfare takes into account e.g. the amount of capital you have at time t when you want to compute conditional welfare. Taking the steady state as the conditioning set is a common choice, but only one of infinitely many potential choices at which to evaluate conditional welfare.
Re: Welfare cost of business cycles
Posted:
Thu Dec 01, 2016 4:35 pm
by valerio88
Dear Professor Pfeifer,
I read this post and other discussions on this topic but still there is something that is not clear to me. I would like to do a very simple exercise, that is to find the parameter of a policy rule that maximizes conditional expected welfare, defined as Welfare = U + \beta*Welfare(+1) where the condition is being in the deterministic steady state in the first period. Moreover, the parameter has no impact on the deterministic steady-state. I am using a 2nd order approximation and I am wondering how to find in Dynare the welfare that I have to maximize.
Maximizing the welfare ergodic mean (oo_.mean) is not correct because, as you say, this gives me the unconditional expected welfare. I think the right approach is to maximize the stochastic steady-state of welfare, where the stochastic steady state is defined as the point where the agents decide to stay in the absence of shocks, but taking into account the likelihood of future shocks: is this the method used in Schmitt-Grohe and Uribe (2004) "Optimal simple and implementable monetary and fiscal rules" and in many other papers?
If yes, is it correct to compute the stochastic steady state by i) using simult_ with a vector of zeros as the shock input starting from the deterministic steady state and ii) taking the last value of the output of simul_t ?
convergence_stoch_ss=simult_(oo_.steady_state,oo_.dr,zeros(T,n_shocks),order);
stoch_ss =convergence_stoch_ss(:,T);
Thank you very much, best wishes,
Valerio
Re: Welfare cost of business cycles
Posted:
Fri Dec 09, 2016 11:08 am
by jpfeifer
Dear Valerio, that would not be correct. Because when you simulate without shocks, you end up at the stochastic steady state, which is different from the deterministic one where you want to evaluate welfare (except for first order). At second order, the policy function for welfare (defined in the model recursively as W_t=U+beta*W(+1) or something similar) will have the form
y_t=y_bar + 0.25 *g_ss*sigma^2 + terms that depend on shocks and deviations from steady state (see section 4.13.4 of the manual)
In the deterministic steady state, these last terms are 0 because shocks are 0 and deviations from steady state are 0. What you are therefore left with is
y_t=y_bar + 0.25 *g_ss*sigma^2
which is related to, but not equal to the stochastic steady state. Thus, what you need to look at in this case is the steady state plus the uncertainty correction. Denoting Welfare with
- Code: Select all
W
you need to look at
- Code: Select all
W_pos=strmatch('y',M_.endo_names,'exact');
oo_.dr.ys(W_pos)+0.5*oo_.dr.ghs2(oo_.dr.inv_order_var(W_pos))
which is the
- Code: Select all
Constant
in the display of
- Code: Select all
POLICY AND TRANSITION FUNCTIONS
Re: Welfare cost of business cycles
Posted:
Fri Dec 09, 2016 2:38 pm
by valerio88
Thank you very much, now I got the point.
Anyway, I think it should be
oo_.dr.ys(W_pos)+0.5*oo_.dr.ghs2(oo_.dr.inv_order_var(W_pos))
if W_pos is the position in the declaration order.
Best wishes,
Valerio
Re: Welfare cost of business cycles
Posted:
Fri Dec 09, 2016 2:42 pm
by jpfeifer
Yes, my mistake. I fixed it above in my post as well.