You are on page 1of 70

Macroeconomics II: Real Business Cycle model and

open economies

Dániel Baksa

ELTEcon

ELTEcon
Macroeconomics II
Outline for the next two weeks:
Dániel Baksa

Introduction
General equilibrium framework:
Review: RBC in
Trade balance and foreign debt accumulation closed economies
International business cycles: case of two large Households
Firms
economies, case of small and large economies Government
Equilibrium conditions
Connection between foreign/state debt and external
RBC in open
financing cost economies
Why do economies experience periodic crises, with Solving
severe drops in output and sudden stops in capital RBC/DSGE
models
inflows? Log-linearization
Steady-state
Applications: Simulating general equilibrium models in Solving
forward-looking model
MATLAB/IRIS toolbox Simulations
Technology shock
Government
expenditure shock
Premium shock

2
Macroeconomics II
!!!!!!!!!!!!!!!!!!!
Dániel Baksa

Introduction
Textbooks
Review: RBC in
Obstfeld, M & Rogoff, K (1996): Foundations of closed economies
Households
International Macroeconomics, Chapter 4 Firms
Government

Uribe, M & Schmitt-Grohé, S (2016): Lectures in Equilibrium conditions

RBC in open
Open Economy Macroeconomics, Chapter 4-5 economies

Carl E. Walsh (CW, 2003): Monetary Theory and Policy Solving


RBC/DSGE
models
Jordi Galı́ (JG, 2015): Monetary Policy, Inflation and Log-linearization
Steady-state
the Business Cycle: An Introduction to the New Solving
forward-looking model
Keynesian Framework and Its Applications Simulations
Technology shock
Government
expenditure shock
Premium shock

3
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies

Need one model to replicate most of the Households


Firms
Government
stylized facts... Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

4
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies

... and need a more user-friendly Households


Firms
Government
programming environment Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

5
Macroeconomics II
From the last lectures
Dániel Baksa

Introduction

Consumption is pro-cyclical, positively correlated with Review: RBC in


closed economies
GDP, persistent (solved) Households
Firms
Investment is pro-cyclical, volatility 2-3 times higher Government
Equilibrium conditions
than GDP, persistent (solved) RBC in open
economies
Export and import is pro-cyclical, positively correlated
Solving
and more volatile than GDP (have an idea how to do) RBC/DSGE
models
Trade-balance and current account counter-cyclical, and Log-linearization
Steady-state
persistent (partly solved, with OLG better) Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

6
Macroeconomics II
Plan for today and next week:
Dániel Baksa

1 Compare the closed and open-economy version of Introduction

RBC-models Review: RBC in


closed economies
2 Typical problem of RBC: fairly good standard Households
Firms
deviations, but bad autocorrelations Government
Equilibrium conditions
1 Improving autocorrelation with some short-cuts: RBC in open
1 Consumption habit economies

2 Tobin-Q Solving
RBC/DSGE
3 Extensions models
Log-linearization
1 Small and large economies Steady-state
Solving
2 Large and large economies forward-looking model

3 Growth in RBC-style framework Simulations


Technology shock
Government
expenditure shock
Premium shock

7
Macroeconomics II
Model in nutshell (1):
Dániel Baksa

Agents: households, firms and government


Introduction
Interest rates are endogenously change Review: RBC in
Household in small open or closed economy closed economies
Households
utility maximization on infinite horizon Firms
Government
accumulate capital with investment Equilibrium conditions

endogenous income: from capital and profit, transfers RBC in open


economies
from government
Solving
supply labor RBC/DSGE
models
pay taxes to the government Log-linearization

Fiscal policy Steady-state


Solving
forward-looking model
receive taxes from households Simulations
issue debt Technology shock
Government
finance own expenditures expenditure shock
Premium shock

8
Macroeconomics II
Model in nutshell (2):
Dániel Baksa

Firms in small open economy


Introduction
profit maximization (on infinite horizon) Review: RBC in
products for consumption and investment closed economies
Households
rents capital from households Firms
demand for labor Government
Equilibrium conditions
households own the firm, then the profit part of RBC in open
households’ income economies

Solving
Foreign economy: accepts savings or gives credit to the RBC/DSGE
models
domestic household and government, but not for fixed Log-linearization
Steady-state
rate Solving
forward-looking model
Or closed economy: domestic asset market should be in Simulations
equilibrium and real interest rate change accordingly Technology shock
Government
expenditure shock
Premium shock

9
Macroeconomics II
Model solution
Dániel Baksa

Introduction
1 Solving individual decision problem Review: RBC in
closed economies
2 Checking the market clearing conditions: all market Households
Firms
should be in equilibrium Government
Equilibrium conditions
3 Checking the sufficient number of equations and RBC in open
variables economies

Solving
4 Solving the system of forward-looking equations: RBC/DSGE
models
By simple model: easy iterative solution Log-linearization
Complex models needs numerical methods Steady-state
Solving
(Newton-algorithm or log-linearized solution) forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

10
Macroeconomics II
Model solution
Dániel Baksa

Introduction

Review: RBC in
closed economies
1 Solving individual decision problem Households
Firms
2 Checking the market clearing conditions (all market Government
Equilibrium conditions
should be in equilibrium) RBC in open
economies
3 Checking the sufficient number of equations and
Solving
variables RBC/DSGE
models
4 Solving the system of forward-looking equations Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

11
Macroeconomics II
Utility maximization:
Dániel Baksa

( ) Introduction
X 1−σ
Ct+n L1+η
Vt = E0 βn − Ψ t+n Review: RBC in
closed economies
1−σ 1+η Households
n=0 Firms
Government

and budget constraint: Equilibrium conditions

RBC in open
economies
profitt + wt Lt + rtK Kt−1 + (1 + rt−1 )Bt−1 = Ct Solving
RBC/DSGE
+ Bt + Invt + Taxt models
Log-linearization
Steady-state
where the capital accumulation: Solving
forward-looking model

Simulations
Kt = Invt + (1 − δ)Kt−1 Technology shock
Government
expenditure shock
Premium shock

12
Macroeconomics II
Bellman-equation
Dániel Baksa

Introduction

Review: RBC in
closed economies
Households

C 1−σ L1+η Firms

Vt (Kt−1 , Bt−1 ) = t −Ψ t + βEt Vt+1 (Kt , Bt ) Government


Equilibrium conditions
1−σ 1+η
RBC in open
+ λt (wt Lt + rtK Kt−1 + (1 + rt−1 )Bt−1 − Ct − Bt − Invt − Taxt ) economies

+ µt (Kt − Invt − (1 − δ)Kt−1 ) Solving


RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

13
Macroeconomics II
FOCs
Dániel Baksa

Introduction
∂Vt
: Ct−σ − λt = 0 Review: RBC in
closed economies
∂Ct Households
∂Vt Firms

: −ΨLηt + wt λt = 0 Government
Equilibrium conditions
∂Lt
RBC in open
∂Vt economies
: −λt − µt = 0
∂Invt Solving
RBC/DSGE
∂Vt models
: βEt VKt + µt = 0 Log-linearization
∂Kt Steady-state
Solving
∂Vt forward-looking model

: βEt VBt − λt = 0 Simulations


∂Bt Technology shock
Government
expenditure shock
Premium shock

14
Macroeconomics II
Envelope theorem
Dániel Baksa

Introduction

Review: RBC in
closed economies
VKt−1 = λt rtK − µt (1 − δ) Households
Firms
Government
VBt−1 = λt (1 + rt−1 ) Equilibrium conditions

RBC in open
economies
Stepping one period ahead:
Solving
RBC/DSGE
K
Et VKt = Et λt+1 rt+1 − Et µt+1 (1 − δ) models
Log-linearization
Steady-state
Et VBt = Et λt+1 (1 + rt ) Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

15
Macroeconomics II
Households optimization
Dániel Baksa

Introduction

Review: RBC in
closed economies
Households
ΨLηt = wt Ct−σ Firms
Government
−σ Equilibrium conditions
Ct+1 K
βEt (rt+1 + (1 − δ)) = 1 RBC in open
Ct−σ economies

−σ Solving
Ct+1 RBC/DSGE
βEt (1 + rt ) = 1 models
Ct−σ Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

16
Macroeconomics II
Production function:
Dániel Baksa

  θ
1 θ−1 1 θ−1 θ−1
Yt = At α Kt−1 + (1 − α) Lt
θ θ θ θ
Introduction

Review: RBC in
closed economies
If: Households
Firms
Government
θ −→ 0 Equilibrium conditions

RBC in open
economies
Yt = At min{αKt−1 ; (1 − α)Lt }
Solving
RBC/DSGE
models
θ −→ 1 Log-linearization
Steady-state
Solving
α
Yt = At Kt−1 L1−α
t
forward-looking model

Simulations
Technology shock
θ −→ ∞ Government
expenditure shock
Premium shock

Yt = At (Kt−1 + Lt )
17
Macroeconomics II
Profit maximization
Dániel Baksa

Introduction

Review: RBC in
closed economies
Households
Firms
Government
profitt = Yt − wt Lt − rtK Kt−1 + Equilibrium conditions

α RBC in open
L1−α

+ λt Yt − At Kt−1 t −→ max economies
Yt ,Lt ,Kt−1
Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

18
Macroeconomics II
Input demands
Dániel Baksa

Introduction

Review: RBC in
closed economies
Households
Firms
Yt Government
rtK = α Equilibrium conditions

Kt−1 RBC in open


economies
Yt
wt = (1 − α) Solving
Lt RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

19
Macroeconomics II
Government budget constraint
Dániel Baksa

Introduction

Review: RBC in
closed economies
Households
Firms
Government
Equilibrium conditions

RBC in open
Govt + (1 + rt−1 )Debtt−1 = Taxt + Debtt economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

20
Macroeconomics II
Model solution
Dániel Baksa

Introduction

Review: RBC in
closed economies
1 Solving individual decision problem Households
Firms
2 Checking the market clearing conditions (all Government
Equilibrium conditions
market should be in equilibrium) RBC in open
economies
3 Checking the sufficient number of equations and
Solving
variables RBC/DSGE
models
4 Solving the system of forward-looking equations Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

21
Macroeconomics II
Bonds market
Dániel Baksa

Introduction

Review: RBC in
closed economies
Households
Firms
Government
Equilibrium conditions

RBC in open
Bt = Debtt economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

22
Macroeconomics II
Aggregating budget constraint
Dániel Baksa

1 Households:

profitt + wt Lt + rtK Kt−1 + (1 + rt−1 )Bt−1 Introduction

= Ct + Bt + Invt + Taxt Review: RBC in


closed economies
Households
2 Plugging back profit: Firms
Government
Equilibrium conditions

Yt + (1 + rt−1 )Bt−1 = Ct + Bt + Invt + Taxt RBC in open


economies

Solving
3 Substituting out lump-sum tax: RBC/DSGE
models
Log-linearization
Yt + (1 + rt−1 )Bt−1 − (1 + rt−1 )Debtt−1 = Ct + Invt Steady-state
Solving
+ Govt + Bt − Debtt forward-looking model

Simulations
Technology shock
4 Bonds market equilibrium implies in closed economies: Government
expenditure shock
Premium shock

Yt = Ct + Invt + Govt

23
Macroeconomics II
Model solution
Dániel Baksa

Introduction

Review: RBC in
closed economies
1 Solving individual decision problem Households
Firms
2 Checking the market clearing conditions (all market Government
Equilibrium conditions
should be in equilibrium) RBC in open
economies
3 Checking the sufficient number of equations and
Solving
variables RBC/DSGE
models
4 Solving the system of forward-looking equations Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

24
Macroeconomics II
RBC in closed economy (1)
Dániel Baksa

1. Euler-equation
−σ
Ct+1 Introduction
βEt (1 + rt ) = 1
Ct−σ Review: RBC in
closed economies
Households
2. No-arbitrage condition: Firms
Government
Equilibrium conditions
−σ
Ct+1 K RBC in open
βEt (rt+1 + (1 − δ)) = 1 economies
Ct−σ
Solving
RBC/DSGE
3. Labor supply: models
Log-linearization
Steady-state

ΨLηt = wt Ct−σ Solving


forward-looking model

Simulations
Technology shock
4. Production function Government
expenditure shock
Premium shock
α
Yt = At Kt−1 L1−α
t

25
Macroeconomics II
RBC in closed economy (2)
Dániel Baksa

5. Capital demand:
Yt Introduction
rtK = α
Kt−1 Review: RBC in
closed economies
Households
6. Labor demand: Firms
Government
Equilibrium conditions
Yt
wt = (1 − α) RBC in open
Lt economies

Solving
RBC/DSGE
7. Market clearing: models
Log-linearization
Steady-state
Yt = Ct + Invt + Govt Solving
forward-looking model

Simulations
8. Capital accumulation Technology shock
Government
expenditure shock
Invt = Kt − (1 − δ)Kt−1 , Premium shock

26
Macroeconomics II
And two shocks:
Dániel Baksa

Introduction

Review: RBC in
9. Technology shock closed economies
Households
Firms

= (1 − ρA )A + ρA At−1 + εA
Government
At t Equilibrium conditions

RBC in open
economies
10. Government consumption shock
Solving
RBC/DSGE
Gov Gov
Govt = (1 − ρ )Gov + ρ Govt−1 + εGov
t
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

27
Macroeconomics II
Households:
Dániel Baksa

Assuming households take credits or cumulate savings


in foreign asset:
( )
X
n
1−σ
Ct+n L1+η
t+n
Introduction

Vt = E0 β −Ψ Review: RBC in
1−σ 1+η closed economies
n=0 Households
Firms

budget constraint: Government


Equilibrium conditions

RBC in open
profitt + wt Lt + rtK Kt−1 + Dt = Ct economies

Solving
+ Invt + Taxt + (1 + rt−1 )Dt−1 RBC/DSGE
models
Log-linearization
The real interest rate depends on the creditors pricing!! Steady-state
Solving
forward-looking model
The capital accumulation same as before: Simulations
Technology shock

Kt = Invt + (1 − δ)Kt−1 Government


expenditure shock
Premium shock

Otherwise this problem leads to the same behavioral


equations!
28
Macroeconomics II
Government budget constraint
Dániel Baksa

Introduction

Review: RBC in
closed economies
Households

The government take foreign bonds as well Firms


Government
Equilibrium conditions

RBC in open
Govt + (1 + rt−1 )Debtt−1 = Taxt + Debtt economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

29
Macroeconomics II
Bonds market
Dániel Baksa

Introduction

Review: RBC in
closed economies
Households
Now the households do not finance the government, both Firms
Government
takes credit from foreign asset market Equilibrium conditions

RBC in open

DtTotal = Debtt + Dt economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

30
Macroeconomics II
Aggregating budget constraint
Dániel Baksa
1 Households:
profitt + wt Lt + rtK Kt−1 + Dt
= Ct + (1 + rt−1 )Dt−1 + Invt + Taxt Introduction

Review: RBC in
2 Plugging back profit: closed economies
Households
Yt + Dt = Ct + (1 + rt−1 )Dt−1 + Invt + Taxt Firms
Government
Equilibrium conditions
3 Substituting out lump-sum tax:
RBC in open
economies
Yt + Dt + Debtt = Ct + Invt
Solving
+ Govt + (1 + rt−1 )Dt−1 + (1 + rt−1 )Debtt−1 RBC/DSGE
models
4 Bonds market equilibrium implies in closed economies: Log-linearization
Steady-state
Solving
Yt = Ct + Invt + Govt + TBt forward-looking model

Simulations
and Technology shock
Government
expenditure shock
TBt = − (Dt + Debtt − (1 + rt−1 )(Dt−1 + Debtt−1 )) Premium shock

− DtTotal − (1 + rt−1 )Dt−1


Total

=
Same problem as in previous lectures.
31
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies

Almost the same as we had in previous Households


Firms
Government

class ... Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

32
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies
Households
... but there the real interest rate was Firms
Government
constant Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

33
Macroeconomics II
Foreign asset holder
Dániel Baksa

Now the households do not finance the government, both


takes credit from foreign asset market
Introduction
 
DtTotal D Total Review: RBC in
χ ln −ln closed economies
e Premt
Yt Y
1 + rt = (1 + r ) e Households
Firms
Government
Equilibrium conditions

RBC in open
Domestic financing cost has an endogenous and economies

exogenous part Solving


RBC/DSGE
1 Growing foreign debt to GDP increase the financing models
costs, size of χ??? Log-linearization
Steady-state
Debate in the literature: Schmidt-Groh-Uribe use Solving
forward-looking model
unreasonable low value Simulations
others estimated much larger for emerging economies Technology shock
Government
2 Exogenous part can be used as a new shock by open expenditure shock
Premium shock
economies

34
Macroeconomics II
RBC in open economy (1)
Dániel Baksa

1. Euler-equation:
−σ
Ct+1
βEt (1 + rt ) = 1
Ct−σ Introduction

Review: RBC in
2. No-arbitrage condition: closed economies
Households
C −σ K Firms

βEt t+1 (rt+1 + (1 − δ)) = 1 Government

Ct−σ Equilibrium conditions

RBC in open
economies
3. Labor supply:
Solving
ΨLηt = wt Ct−σ RBC/DSGE
models
Log-linearization
Steady-state
4. Production function: Solving
forward-looking model
α
Yt = At Kt−1 L1−α
t Simulations
Technology shock
Government
5. Capital demand: expenditure shock
Premium shock

Yt
rtK = α
Kt−1
35
Macroeconomics II
RBC in open economy (2)
Dániel Baksa

6. Labor demand:
Yt
wt = (1 − α)
Lt Introduction

Review: RBC in
7. Market clearing: closed economies
Households
Firms
Yt = Ct + Invt + Govt + TBt Government
Equilibrium conditions

RBC in open
8. Foreign debt accumulation: economies

Solving
= − DtTotal − (1 + rt−1 )Dt−1
Total

TBt RBC/DSGE
models
Log-linearization
9. Capital accumulation: Steady-state
Solving
forward-looking model
Invt = Kt − (1 − δ)Kt−1 Simulations
Technology shock
Government
10. Interest rate: expenditure shock
Premium shock
 
DtTotal D Total
χ ln −ln
e Premt
Yt Y
1 + rt = (1 + r ) e
36
Macroeconomics II
And three shocks:
Dániel Baksa

11. Technology shock: Introduction

Review: RBC in
closed economies
At = (1 − ρA )A + ρA At−1 + εA
t Households
Firms
Government
Equilibrium conditions
12. Government consumption shock:
RBC in open
economies
Gov Gov
Govt = (1 − ρ )Gov + ρ Govt−1 + εGov
t Solving
RBC/DSGE
models
13. Premium shock: Log-linearization
Steady-state
Solving
forward-looking model
Premt = ρPrem Premt−1 + εPrem
t Simulations
Technology shock
Government
expenditure shock
Premium shock

37
Macroeconomics II
Model solution
Dániel Baksa

Introduction

Review: RBC in
closed economies
1 Solving individual decision problem Households
Firms
2 Checking the market clearing conditions (all market Government
Equilibrium conditions
should be in equilibrium) RBC in open
economies
3 Checking the sufficient number of equations and
Solving
variables RBC/DSGE
models
4 Solving the system of forward-looking equations Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

38
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies

How to solve the system of Households


Firms
Government
equations???? Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

39
Macroeconomics II
Two possible way:
Dániel Baksa

Introduction

Review: RBC in
closed economies
1 Non-linear solution with Dynare (later) Households
Firms
2 Linearized solution with Dynare or IRIS (now) Government
Equilibrium conditions
Advantage: easy to see the model core behaviour, fast RBC in open
economies
solution
Disadvantage: (in the beginning) painful Solving
RBC/DSGE
log-linearization models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

40
Macroeconomics II
Log-linearization (1): general steps
Dániel Baksa
Want to express all variables as a % or p.p. difference
from its steady-state level
So we need to calculate the steady-state as well!
Introduction
General solution with f (xt ) function Review: RBC in
closed economies
ln f (xt )
f (xt ) = e Households
Firms
Government
Equilibrium conditions
Express the first order Taylor approximation (around the RBC in open
steady-state) economies

Solving
RBC/DSGE
1 0
f (xt ) ≈ e ln f (x) + e ln f (x)
models
f (x)(xt − x) Log-linearization
f (x) Steady-state
Solving
1 0 xt − x forward-looking model
≈ e ln f (x) + e ln f (x) f (x)x Simulations
f (x) x Technology shock

1 Government

≈ e ln f (x) + e ln f (x) f 0 (x)x x̂t


expenditure shock
Premium shock
f (x)

where x̂t is the log-linearized value.


41
Macroeconomics II
Log-linearization (2): dirty tricks
Dániel Baksa

We express percentage deviations, but generally true


the log-differences good approximation for that:

f (xt , yt ) = xtα ytβ


Introduction

Review: RBC in
ln f (xt , yt ) = α ln xt + β ln yt closed economies
Households
Firms
Government
We can express the steady-state version of the equation Equilibrium conditions

above: RBC in open


economies

Solving
ln f (x, y ) = α ln x + β ln y RBC/DSGE
models
Log-linearization
And subtract it from the original: Steady-state
Solving
forward-looking model

f (xt , yt ) = xtα ytβ Simulations


Technology shock
ln f (xt , yt ) − ln f (x, y ) = α ln xt + β ln yt − α ln x − β ln y Government
expenditure shock

f (xt , yt ) ≈ αx̂t + β ŷt Premium shock

where x̂t = ln xt − ln x
42
Macroeconomics II
Log-linearization (3): dirty tricks
Dániel Baksa

Assume a linear equation


Introduction
zt = xt + yt
Review: RBC in
closed economies
The question: how the RHS components contribute to Households
Firms

the percentage change of the LHS Government


Equilibrium conditions

Need the steady-state weights for each components on RBC in open


economies
RHS Solving
RBC/DSGE
x y models
1 = + Log-linearization
z z Steady-state
Solving
forward-looking model
Using them for the weighted average: Simulations
Technology shock
x y Government
ẑt = x̂t + ŷt expenditure shock

z z Premium shock

43
Macroeconomics II
Log-linearization (4): dirty tricks
Dániel Baksa

Useful assumption:

ln(1 + rt ) ≈ rt
Introduction

if r is small and close to zero Review: RBC in


closed economies
Do not assume the same for rental fee!!! You should Households
Firms
log-linearize it! Government
Equilibrium conditions

If you have an AR(1) with steady-state, just rearrange RBC in open


economies
it!!!!
Solving
RBC/DSGE
xt = ρxt−1 + (1 − ρ)x + xεt models
Log-linearization

xt − x = ρ(xt−1 − x) + xεt Steady-state


Solving
forward-looking model
xt − x xt−1 − x
= ρ + εt Simulations
x x Technology shock
Government
x̂t = ρx̂t−1 + εt expenditure shock
Premium shock

You need to rescale the shock if the steady-state is not


1. 44
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies
If you can specify your own model think Households
Firms

ahead and choose such a functional form Government


Equilibrium conditions

where the log-linearized version is easy!!! RBC in open


economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

45
Macroeconomics II
Log-linearized model (1):
Dániel Baksa

Introduction
1
Cbt t+1 −
= Et Cd rt Review: RBC in
σ closed economies
1 rK Households
Cbt t+1 −
= Et Cd Et rbK Firms
σ r K + (1 − δ) t+1 Government
Equilibrium conditions

η Lbt + σ Cbt = wbt RBC in open


economies
Ybt = Abt + αKbt−1 + (1 − α)Lbt Solving
RBC/DSGE
rbtK = Ybt − Kbt−1 models
Log-linearization
w
bt = Ybt − Lbt Steady-state
Solving
C b Inv c Gov d TB c forward-looking model
Ybt = Ct + Inv t + Gov t + TB t Simulations
Y Y Y Y Technology shock
Government
expenditure shock
Premium shock

46
Macroeconomics II
Log-linearized model (2):
Dániel Baksa

D Total b Total (1 + r )D Total 


  Introduction
TB
ct = − Dt − b Total
rt−1 + D t−1
TB TB Review: RBC in
closed economies
\ Households
D Total
t Firms
b Total − Ybt
= D Government
t
Yt Equilibrium conditions

RBC in open
δ Inv
ct = Kbt − (1 − δ)Kbt−1 economies

D\ Total Solving
rt = χ t + Premt RBC/DSGE
Yt models
Log-linearization

Abt = ρA Abt−1 + εA Steady-state


b
t Solving
forward-looking model
Gov
d t−1 + εGov
Gov = ρ Gov
dt d
t Simulations
Technology shock
[t
Prem = ρPrem Prem
[ t−1 + εPrem
t
Government
expenditure shock
Premium shock

47
Macroeconomics II
Using the non-linear model:
Dániel Baksa

β(1 + r ) = 1
K Introduction
β(r + (1 − δ)) = 1
Review: RBC in
ΨLη = wC −σ closed economies
Households
Y = AK α L1−α Firms
Government
Y
rK
Equilibrium conditions
= α
K RBC in open
economies
Y
w = (1 − α) Solving
L RBC/DSGE
Y = C + Inv + Gov + TB models
Log-linearization
= − D Total − (1 + r )D Total

TB Steady-state
Solving
forward-looking model
Inv = K − (1 − δ)K Simulations
1+r = 1+r Technology shock
Government
expenditure shock
Premium shock
Where we exogenously give A, YG and D
Y ratios. β, σ,α,δ,η
are parameters.
48
Macroeconomics II
Steady-state: Calculations (1)
Dániel Baksa

1. Real interest rate comes from Euler-equation:


1
r= −1
β Introduction

Review: RBC in
closed economies
2. Rental fee from no-arbitrage condition: Households
Firms
Government
1
rK = −1+δ Equilibrium conditions

β RBC in open
economies

3. From capital demand equation and the production Solving


RBC/DSGE
function we can express capital to labor ratio: models
Log-linearization
Steady-state

AK α L1−α Solving
forward-looking model
rK = α
K Simulations
Technology shock
K
r = αAK α−1 L1−α Government
expenditure shock
1
 K  α−1 Premium shock
K r
=
L Aα
49
Macroeconomics II
Steady-state: Calculations (2)
Dániel Baksa

4. From labor demand equation with capital to labor ratio


we can express real wage: Introduction

Review: RBC in
AK α L1−α closed economies
w = (1 − α) Households

 L α Firms
Government
K Equilibrium conditions
w = (1 − α)A
L RBC in open
economies

Solving
5. Using again input demand functions and express capital RBC/DSGE
models
to GDP, labor to GDP ratios: Log-linearization
Steady-state
Solving
K α forward-looking model
=
Y rK Simulations
Technology shock
L 1−α Government
= expenditure shock
Y w Premium shock

50
Macroeconomics II
Steady-state: Calculations (3)
Dániel Baksa

6. From the capital to GDP ratio we can express


investment to GDP ratio as well: Introduction

Review: RBC in
Inv K closed economies
= δ Households
Y Y Firms
Government
Equilibrium conditions
7. From the market clearing condition we can express RBC in open
economies
consumption to GDP ratio since other terms are known:
Solving
RBC/DSGE
Y = C + Inv + Gov + TB models
Log-linearization
C Inv Gov TB Steady-state
1 = + + + Solving
Y Y Y Y forward-looking model

Simulations
C Inv Gov TB
= 1− − − Technology shock

Y Y Y Y Government
expenditure shock
Premium shock

51
Macroeconomics II
Steady-state: Calculations (4)
Dániel Baksa

8. We need to rearrange the labor supply equation and


Introduction
involve Y :
Review: RBC in
closed economies
η −σ
ΨL = wC Households
Firms
 −σ
L η η
 
C Government

Ψ Y = w Y −σ Equilibrium conditions

Y Y RBC in open
economies

8. Finally we can express the GDP level and the other Solving
RBC/DSGE
variables: models
Log-linearization
Steady-state
( 1
−σ ) η+σ Solving
C
w Y
forward-looking model

Y = L η
 Simulations
Ψ Y
Technology shock
Government
expenditure shock
Premium shock

52
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies
Households

Now put everything together ... Firms


Government
Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

53
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies
Households

Undetermined method of coefficients Firms


Government
Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

54
Macroeconomics II
’THE’ method (1)
Dániel Baksa

Actually we can write the linearized model in the following way:


Introduction

Review: RBC in
closed economies
Aξt = Bξt−1 + Et C ξt+1 + Dt , Households
Firms
  Government
C
ct Equilibrium conditions
 ..  RBC in open
.
 
εAt economies
  b
 
 K ct   Gov Solving
where ξt =   c  and t =  εt
 d 
. RBC/DSGE
 At  [
Prem models
  εt Log-linearization
 Gov
dt  Steady-state
Solving
\t
Prem forward-looking model

A, B, C and D matrices contain the coefficient of the Simulations


Technology shock
log-linearized model. Government
expenditure shock
Premium shock

55
Macroeconomics II
’THE’ method (2)
Dániel Baksa

We guess the solution of the forward-looking system in this


Introduction
form:
Review: RBC in
closed economies
ξt = Φξt−1 + Γt , Households
Firms
Government
Equilibrium conditions
where Φ and Γ matrices should be some combination of A, RBC in open
B and C . economies

Substitute out ξt and also use Et ξt+1 = Φξt . Solving


RBC/DSGE
models
Log-linearization
Aξt = Bξt−1 + C Φξt + Dt Steady-state
Solving
A(Φξt−1 + Γt ) = Bξt−1 + C Φ(Φξt−1 + Γt ) + Dt forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

56
Macroeconomics II
’THE’ method (3)
Dániel Baksa

If we rearrange: Introduction

Review: RBC in
closed economies
0 = (C Φ2 − AΦ + B)ξt−1 + (C ΦΓ + D − AΓ)t Households
Firms
Government

So this system of equation above should satisfies if and only Equilibrium conditions

RBC in open
if economies

Solving
C Φ2 − AΦ + B = 0 RBC/DSGE
models
Log-linearization
C ΦΓ + D − AΓ = 0 Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

57
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies
Households

How to calculate Φ???? Firms


Government
Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

58
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies

Many algorithm (e.g.: QZ) exists to get Households


Firms
Government

the correct Φ as fast as possible... Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

59
Macroeconomics II
My stupid (and slow) solution:
Dániel Baksa

We can find the correct Φ in iterative way:


Introduction
Φt = −[C Φt−1 − A]−1 B Review: RBC in
closed economies
Households
We need an initial Φ0 for the calculations. Firms
Government
But if we have a stable system (Blanchard-Kahn conditions Equilibrium conditions

RBC in open
are satisfied) then economies

Solving
lim Φt = lim −[C Φt−1 − A]−1 B RBC/DSGE
models
t−→∞ t−→∞
Log-linearization
Steady-state
Once we have the correct Φ we can express the rest: Solving
forward-looking model

Simulations
Γ = (A − C Φ)−1 D Technology shock
Government
expenditure shock
Premium shock

60
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies
Households

You: ’O.M.G.’ Firms


Government
Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

61
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies
Dynare and IRIS do the matrix Households
Firms

computation instead of you, but you Government


Equilibrium conditions

should understand the background!!!! RBC in open


economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

62
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies
Households

MATLAB and Dynare exercise Firms


Government
Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

63
Macroeconomics II
Technology shock: Closed vs open model (1)
Dániel Baksa

GDP (%) Consumption (%)


2 0.35 Introduction
Open RBC
1.5 Closed RBC 0.3
Review: RBC in
closed economies
1
Households
0.25
Firms
0.5
Government
0.2 Equilibrium conditions
0
RBC in open
-0.5 0.15 economies
0 10 20 30 40 0 10 20 30 40

Solving
Investment (%) TB to GDP (p.p.) RBC/DSGE
60 500
models
Log-linearization
40 0 Steady-state
Solving
20 -500 forward-looking model

Simulations
0 -1000 Technology shock
Government
expenditure shock
-20 -1500
0 10 20 30 40 0 10 20 30 40 Premium shock

64
Macroeconomics II
Technology shock: Closed vs open model (2)
Dániel Baksa

Real interest rate (p.p.) Rental fee (%)


0.04 1.5 Introduction
Open RBC
Closed RBC 1
Review: RBC in
0.02 closed economies
Households
0.5
Firms
0 Government
0 Equilibrium conditions

RBC in open
-0.02 -0.5 economies
0 10 20 30 40 0 10 20 30 40

Solving
Real wage (%) Labor (%) RBC/DSGE
1.5 0.4
models
Log-linearization
Steady-state
1 0.2
Solving
forward-looking model

0.5 0 Simulations
Technology shock
Government
expenditure shock
0 -0.2
0 10 20 30 40 0 10 20 30 40 Premium shock

65
Macroeconomics II
Gov. exp. shock: Closed vs open model (1)
Dániel Baksa

GDP (%) Consumption (%)


0.04 -0.02 Introduction
Open RBC
Closed RBC -0.03 Review: RBC in
0.02 closed economies
-0.04
Households
Firms
-0.05
0 Government
Equilibrium conditions
-0.06
RBC in open
-0.02 -0.07 economies
0 10 20 30 40 0 10 20 30 40

Solving
Investment (%) TB to GDP (p.p.) RBC/DSGE
1 10
models
0 Log-linearization
0.5 Steady-state
-10 Solving
0 forward-looking model
-20
Simulations
-0.5 Technology shock
-30
Government
expenditure shock
-1 -40
0 10 20 30 40 0 10 20 30 40 Premium shock

66
Macroeconomics II
Gov. exp. shock: Closed vs open model (2)
Dániel Baksa

#10 -3 Real interest rate (p.p.) Rental fee (%)


3 0.08 Introduction
Open RBC
Closed RBC 0.06
Review: RBC in
2 closed economies
Households
0.04
Firms
1 Government
0.02 Equilibrium conditions

RBC in open
0 0 economies
0 10 20 30 40 0 10 20 30 40

Solving
Real wage (%) Labor (%) RBC/DSGE
0 0.06
models
0.05 Log-linearization
-0.01 Steady-state
0.04 Solving
-0.02 forward-looking model
0.03
Simulations
-0.03 Technology shock
0.02
Government
expenditure shock
-0.04 0.01
0 10 20 30 40 0 10 20 30 40 Premium shock

67
Macroeconomics II
Premium shock: Closed vs open model (1)
Dániel Baksa

GDP (%) Consumption (%)


0.05 0 Introduction

0 -0.01
Review: RBC in
closed economies
Households
-0.05 -0.02
Firms
Government
-0.1 -0.03 Equilibrium conditions

RBC in open
-0.15 -0.04 economies
0 10 20 30 40 0 10 20 30 40

Solving
Investment (%) TB to GDP (p.p.) RBC/DSGE
5 300
models
Log-linearization
0 200 Steady-state
Solving
-5 100 forward-looking model

Simulations
-10 0 Technology shock
Government
expenditure shock
-15 -100
0 10 20 30 40 0 10 20 30 40 Premium shock

68
Macroeconomics II
Premium shock: Closed vs open model (2)
Dániel Baksa

#10 -3 Real interest rate (p.p.) Rental fee (%)


8 0.25 Introduction

6
0.2 Review: RBC in
closed economies
0.15
Households
4
Firms
0.1
Government
2 Equilibrium conditions
0.05
RBC in open
0 0 economies
0 10 20 30 40 0 10 20 30 40

Solving
Real wage (%) Labor (%) RBC/DSGE
0 0.03
models
-0.02 0.02 Log-linearization
Steady-state
-0.04 0.01 Solving
forward-looking model
-0.06 0
Simulations
-0.08 -0.01 Technology shock
Government
expenditure shock
-0.1 -0.02
0 10 20 30 40 0 10 20 30 40 Premium shock

69
Macroeconomics II

Dániel Baksa

Introduction

Review: RBC in
closed economies
Households

Thank you for your attention! Firms


Government
Equilibrium conditions

RBC in open
economies

Solving
RBC/DSGE
models
Log-linearization
Steady-state
Solving
forward-looking model

Simulations
Technology shock
Government
expenditure shock
Premium shock

70

You might also like