Practical Dynamic Programming in Ljungqvist – Sargent (2004) Presented by Edson Silveira Sobrinho for Dynamic Macro class University of Houston Economics.

Slides:



Advertisements
Similar presentations
Chapter 14 : Economic Growth
Advertisements

The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case.
Numerical Solution of Linear Equations
Markov Decision Process
1 Transportation problem The transportation problem seeks the determination of a minimum cost transportation plan for a single commodity from a number.
Computational Methods for Management and Economics Carla Gomes Module 8b The transportation simplex method.
Decision Theoretic Planning
MATH 685/ CSI 700/ OR 682 Lecture Notes
Numerical Algorithms Matrix multiplication
Solving Dynamic Stochastic General Equilibrium Models Eric Zwick ’07 Swarthmore College, Department of Mathematics & Statistics References Boyd and Smith.
Classification and Prediction: Regression Via Gradient Descent Optimization Bamshad Mobasher DePaul University.
Markov Decision Processes
Infinite Horizon Problems
Planning under Uncertainty
Linear Algebraic Equations
Function Optimization Newton’s Method. Conjugate Gradients
Special Matrices and Gauss-Siedel
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 99 Chapter 4 The Simplex Method.
Special Matrices and Gauss-Siedel
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Optimal Fixed-Size Controllers for Decentralized POMDPs Christopher Amato Daniel.
Algorithms For Inverse Reinforcement Learning Presented by Alp Sardağ.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
Department of Computer Science Undergraduate Events More
Mujahed AlDhaifallah (Term 342) Read Chapter 9 of the textbook
Easy Optimization Problems, Relaxation, Local Processing for a small subset of variables.
Chapter 4 The Simplex Method
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
Dynamic Programming Introduction to Algorithms Dynamic Programming CSE 680 Prof. Roger Crawfis.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
LINEAR PROGRAMMING SIMPLEX METHOD.
Decision Procedures An Algorithmic Point of View
MAKING COMPLEX DEClSlONS
1. The Simplex Method.
Chapter 6 Linear Programming: The Simplex Method
Simplex method (algebraic interpretation)
An introduction to the finite element method using MATLAB
Generalized and Bounded Policy Iteration for Finitely Nested Interactive POMDPs: Scaling Up Ekhlas Sonu, Prashant Doshi Dept. of Computer Science University.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.4 The student will be able to set up and solve linear programming problems.
Markov Decision Processes1 Definitions; Stationary policies; Value improvement algorithm, Policy improvement algorithm, and linear programming for discounted.
Computing Eigen Information for Small Matrices The eigen equation can be rearranged as follows: Ax = x  Ax = I n x  Ax - I n x = 0  (A - I n )x = 0.
1 Markov Decision Processes Infinite Horizon Problems Alan Fern * * Based in part on slides by Craig Boutilier and Daniel Weld.
Discrete Optimization Lecture #3 2008/3/41Shi-Chung Chang, NTUEE, GIIE, GICE Last Time 1.Algorithms and Complexity » Problems, algorithms, and complexity.
Chapter 6 Linear Programming: The Simplex Method Section 4 Maximization and Minimization with Problem Constraints.
1 Markov Decision Processes Infinite Horizon Problems Alan Fern * * Based in part on slides by Craig Boutilier and Daniel Weld.
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
1 Solving Infinite Horizon Stochastic Optimization Problems John R. Birge Northwestern University (joint work with Chris Donohue, Xiaodong Xu, and Gongyun.
Chapter 10 Advanced Topics in Linear Programming
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
Linear Systems Numerical Methods. 2 Jacobi Iterative Method Choose an initial guess (i.e. all zeros) and Iterate until the equality is satisfied. No guarantee.
Searching a Linear Subspace Lecture VI. Deriving Subspaces There are several ways to derive the nullspace matrix (or kernel matrix). ◦ The methodology.
Approximation Algorithms based on linear programming.
Markov Decision Processes
Chapter 10: Solving Linear Systems of Equations
Markov Decision Processes
Markov Decision Processes
Chap 3. The simplex method
Metode Eliminasi Pertemuan – 4, 5, 6 Mata Kuliah : Analisis Numerik
Numerical Analysis Lecture 16.
Numerical Analysis Lecture14.
Reinforcement Learning in MDPs by Lease-Square Policy Iteration
Numerical Analysis Lecture10.
CMSC 471 – Fall 2011 Class #25 – Tuesday, November 29
CS 416 Artificial Intelligence
Chapter 2. Simplex method
Simplex method (algebraic interpretation)
Numerical Analysis Lecture11.
Markov Decision Processes
Chapter 2. Simplex method
Markov Decision Processes
Presentation transcript:

Practical Dynamic Programming in Ljungqvist – Sargent (2004) Presented by Edson Silveira Sobrinho for Dynamic Macro class University of Houston Economics Department

Chapter 3 presents some computational methods for Dynamic programs of the form: Subject to: given x. The Euler Equation helps in a variety of cases. One can also start with a Vo and iterate until convergence. However, it may be impossible to solve analytically. Then we have to adopt some numerical approximations. Motivation First approach Second approach Conclusions The curse of dimensionality 2

First approach for obtaining numerical approximations: The first method replaces the original problem with another problem by forcing the state vector to live on a finite and discrete grid of points. Then applies discrete-state dynamic programming to this problem. Downside is that it requires a small number of discrete states. Guess what? Markov chains! 3 Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation Motivation First approach Second approach Conclusions

Set up: an infinitely lived household likes to consume one good, which it can acquire by using labor income (ws t ) or accumulated savings (a t ). s t is endowment of labor at time t. s i is endowment of labor in state i. m-state Markov chain with transition matrix P. Say m = 2, where s i = 0 (if unemployed) or s i = 1 (if employed). The wage w is fixed over time. The household can choose to hold a single asset in discrete amount a t where a t Є A is a grid [ a 1 < a 2 < … < a n ]. The asset bears a gross rate of return r fixed over time. 4 Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation Motivation First approach Second approach Conclusions

Household maximization problem (Eq ): Subject to : Assume that: 5 Motivation First approach Second approach Conclusions Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation

Bellman equation: Which is a matrix m x n (2 states of employment x n choices of a). Let a' and s' indicate next period's asset and state. v (a,s) is the optimal value of the objective function, starting from asset and employment state (a, s). A solution of this problem is a value function v (a, s) that satisfies the Bellman Equation and an associated policy function a' = g(a, s) mapping this period’s (a, s) pair into an optimal choice of assets to carry into next period. 6 Motivation First approach Second approach Conclusions Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation

For discrete-state space of small size, it is easy to solve the Bellman equation numerically by manipulating matrices. Here is how to write a computer program Define two n x 1 vectors v j, j=1,2, i.e. one vector for each employment state. Each row takes the value of v(i) for a given asset i. Let 1 be the n x 1 vector consisting entirely of ones 7 Motivation First approach Second approach Conclusions Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation

Define two n x n matrices Rj whose (i, h) element is (Eq ): This is the current period utility conditional on current asset i and next period asset h, for a given employment state j. That is, all the possible utilities that arise from combinations of choices of assets for this period and the next one. 8 Motivation First approach Second approach Conclusions Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation

Define an operator T ([v1, v2]) that maps a pair of vectors [v1, v2] into a pair of vectors [tv1, tv2] (Eq ) : LHS is a column vector n x 1 The term in the Max operator is n x n Matrix. Intuition: each element brings the lifetime utility for a given pair of asset choices for current and next period. For each row (say current asset), the agent chooses the column (next period's asset) that allows max lifetime utility. Current consumption comes from the budget constraint in R 1. Similarly, for unemployed state: 9 Motivation First approach Second approach Conclusions Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation

Compact notation (Eq ): Then the Bellman Equation can be viewed as: And can be solved as: The production dynamics 10 Motivation First approach Second approach Conclusions Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation

Back in Chapter 3 we saw the Howard Improvement Algorithm. The idea was to Pick a feasible policy, u = h 0 (x), and compute the value associated with operating forever with that policy. Next generate a new policy u = h j+1 (x) that solves the two-period problem. Then iterate. Now let there be a predetermined class M of (N × N) stochastic matrices P, which are the objects of choice. I think that we can associate each stochastic matrix P to a pair (a,a'). That's why we have n x n matrices P. So choosing P is like choosing (a,a'). 11 Motivation First approach Second approach Conclusions Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation

We can put the Bellman equation in the following form (Eq ): For B = T – I, find P n+1 such that (Eq ): Intuition: Pick a feasible policy function and use it to iterate. I believe the advantage of the algorithm is that it is easier to compute (compare Eq with 4.5.2): 12 Motivation First approach Second approach Conclusions Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation

Eq Eq Step 1. For an initial feasible policy function g j (k, j) for j = 1, form the r h matrices using an equation similar to (4.5.1), then use equation (4.5.2) to evaluate the vectors of values [v j 1, v j 2 ] implied by using that policy forever. Step 2. Use [v j 1, v j 2 ] as the terminal value vectors in equation (4.3.2), and perform one step on the Bellman equation to find a new policy function gj+1(k, s) for j + 1 = 2. Use this policy function, update j, and repeat step 1. Step 3. Iterate. 13 Motivation First approach Second approach Conclusions Discretization of state space Discrete-state dynamic programming Application of Howard Improvement algorithm Numerical implementation

Second approach for obtaining numerical approximations: Judd (1998) describes a method for iterating on the Bellman equation using a polynomial to approximate the value function and a numerical optimizer to perform the optimization at each iteration. We describe this method in the context of the Bellman equation for a particular problem. Model of optimal unemployment insurance as in chapter Motivation The model Implications for saving and growth Conclusions Motivation First approach Second approach Conclusions Polynomial approximations

A planner wants to provide incentives to an unemployed worker to search for a new job while also partially insuring the worker against bad luck in the search process. The planner seeks to deliver discounted expected utility V to an unemployed worker at minimum cost while providing proper incentives to search for work. Hopenhayn and Nicolini show that the minimum cost C(V) satisfies the Bellman equation (Eq ). 15 Motivation The model Implications for saving and growth Conclusions Motivation First approach Second approach Conclusions Polynomial approximations

The method uses a polynomial to approximate the i th iterate C i (V) of C(V). This polynomial is stored on the computer in terms of n + 1 coefficients. Then at each iteration, the Bellman equation is to be solved at a small number m >= n + 1 values of V. This procedure gives values of the i th iterate of the value function C i (V) at those particular V ’s. Then we interpolate to fill in the continuous function Ci(V). The minimum problem on the right side of equation (4.7.1) becomes a numerical minimizer (doable with simple algorithms in Matlab or Gauss). 16 Motivation The model Implications for saving and growth Conclusions Motivation First approach Second approach Conclusions Polynomial approximations

Algorithm summary: 1.Choose upper and lower bounds for V u [Vu, Vu] required to assure participation and a positive search effort, computed in chapter Choose a degree n for the approximator, a Chebyshev polynomial, and a number m >= n + 1 of nodes. 1.Generate the m zeros of the Chebyshev polynomial on the set [1,−1], given by (4.7.6). 1.By a change of scale, transform the z i ’s to corresponding points V l u in [Vu, Vu]. 17 Motivation The model Implications for saving and growth Conclusions Motivation First approach Second approach Conclusions Polynomial approximations

5.Choose initial values of the n+1 coefficients. Use these coefficients to define the function Ci(Vu) for iteration number i = 0. 6.Compute the function 5.For each point V l u, use a numerical minimization program to find C i+1 (V l u ). 6.Compute new values of the coefficients by using “least squares”. Return to step 5 and iterate to convergence. 18 Motivation The model Implications for saving and growth Conclusions Motivation First approach Second approach Conclusions Polynomial approximations

This chapter has described two of three standard methods for approximating solutions of dynamic programs numerically: discretizing the state space and using polynomials to approximate the value function. The next chapter describes the third method: making the problem have a quadratic return function and linear transition law. This will make solving a dynamic program easy by exploiting stochastic linear difference equations. 19 Motivation First approach Second approach Conclusions