You are on page 1of 3

Macroeconomics. Master APE. Notes on Hamiltonian.

TA: Eric Monnet

How to use to Hamiltonian for simple dynamic optimization.

These short notes only show you how to write the Hamiltonian, derive FOC and the growth
rate of consumption (Euler equation) in usual continuous dynamic optimization problems. They
are sucient for this purpose. See your classnotes, the Appendix in Barro &Sala-i-Martin, or
Acemoglu (2009) chp.7 (especially p.254-255) for more details on the foundations of this technique and the link with the intertemporal Lagrangian. You can also have a look at Cass and
Shell (1976), Introduction to Hamiltonian Dynamics in Economics, Journal of Economic Theory.
1- Set up the Hamiltonian

Imagine the following Neoclassical growth problem :


Z
maxc(t) =

e(n)t u(c(t))dt

s.t :
k = f (k(t)) c(t) ( + n)k(t)
t <+

The Hamiltonian applies to every period and is denoted :


H = e(n)t u(c) + [f (k) c ( + n)k]

Setting H is very easy : just write the utility function with the discount factor ahead and then
assign a multiplier to every constraint (as with the Langrangian, cf Barro & Sala-i-Martin for
the equivalence between multipliers). Thus, you will have n multipliers if you have n constraints.
The multipliers ( in this model) are also called co-state variables since it is associated to the
constraint of the accumulation of the state variable. Here, c is the control (decision) variable
and k is the state variable.
You can also set a Hamiltonian in a dierent way, without taking into account the discount factor
:
= u(c) + [f (k) c ( + n)k]
H

. These two Hamiltonians are obviously related through H = e(n)t H with = e(n)t .
is
H is called the present value Hamiltonian since it includes the discount of the future, and H
called the current value Hamiltonian.
2- Obtaining FOCs

The FOCs are very easy to remember, but they dier between current and present value Hamiltonian. It is very important to distinguish between control, co-state, and state variables, since
1

Macroeconomics. Master APE. Notes on Hamiltonian. TA: Eric Monnet

you can have several variables of each kind.

Control variables

For any control variable x, we have :


H
=0
x

and

H
=0
x

Co-state variables

For any co-state variable 1 , and state variable y we have :


H
= y

and

H
= y

State variables

For any co-state variable , state variable y , and discount rate r we have :
H
=
y

and

H
= r
y
Example

Hence, for the problem dened above, we have the following FOCs :
H
= e(n)t u0 (c) = 0
c
H
= [f 0 (k) ( + n)] =
k
H
= f (k) c ( + n)k = k

1 note

that co-state variables are not the same for

and

Macroeconomics. Master APE. Notes on Hamiltonian. TA: Eric Monnet

or

H
= u0 (c) = 0
c

H
= [f 0 (k) ( + n)] = ( n)
k

H
= f (k) c ( + n)k = k

3- Solving the system of FOCs

Contrary to the discrete case with intertemporal Lagrangian, you have to modify a little bit the
FOCs before nding a close expression of the growth rate of the control variables (equivalent
to the Euler equation).But there is a trick that makes the analysis very easy and that you can
apply when you are facing this kind of problem.
I do it here for the present value Hamiltonian. First solve the FOC in c and take the logarithm :
log = ( n)t + logu0 (c)

Then take the derivative with respect to time and we arrive at :

u00 (c)
= ( n) + 0 .c

u (c)

Then use the FOC in k and divide by c on both sides :


c
u00 (c)
= 0 .(1/c)[f 0 (k) ]
c
u (c)

This general form can be easily simplied for example for CRRA utility function with as the
coecient of risk aversion.
1
c
= [f 0 (k) ]
c

Check that you are able to nd the same result with the current value Hamiltonian. The answer
is in Acemoglu's textbook p.294 - 295, or in the slides n 15 and 16 in lectures 5 and 6 (Neoclassical growth) on Acemoglu's website. You must know how to obtain this result in every dynamic
optimization problem in continuous time.
However, note that when the accumulation equation is in general form (contrary to this example), you will need to integrate the 1st FOC and then apply the Transversality condition, as in
the textbook p.295-297 (slides n 19 to 23).
3- Transversality condition

As explained in class, you have the following transversality condition for this problem :
lim [e(n)t (t)k(t)] = 0

that is the limit of discount rate costate variable state variable when t tends to innity is 0.
3

You might also like