content
1 Introduction
2 Introduction to Programming 17
2.1 Programming Techniques . . . . . . . . . . . . . . . . . . . . . 17
2.1.1 Writing Pseudocode . . . . . . . . . . . . . . . . . . . 17
2.1.2 First Steps in R . . . . . . . . . . . . . . . . . . . . . . 20
2.1.3 Functions and Conditional Execution . . . . . . . . . . 26
2.2 More R Programming . . . . . . . . . . . . . . . . . . . . . . 29
2.2.1 Loops and Repetition . . . . . . . . . . . . . . . . . . . 29
2.2.2 Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.2.3 More Features . . . . . . . . . . . . . . . . . . . . . . . 35
3 Mathematical Preliminaries 37
3.1 The Nuts and Bolts . . . . . . . . . . . . . . . . . . . . . . . . 37
3.1.1 Sets and Logic . . . . . . . . . . . . . . . . . . . . . . 37
3.1.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.1.3 Infinities . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.2 The Real Numbers . . . . . . . . . . . . . . . . . . . . . . . . 44
3.2.1 Real Sequences . . . . . . . . . . . . . . . . . . . . . . 45
3.2.2 Suprema and Infima . . . . . . . . . . . . . . . . . . . 49
3.2.3 Functions of a Real Variable . . . . . . . . . . . . . . . 52
1
Stochastic Economic Dynamics John Stachurski
4 Analysis in Metric Space 54
4.1 A First Look at Metric Space . . . . . . . . . . . . . . . . . . 54
4.1.1 Distances and Norms . . . . . . . . . . . . . . . . . . . 56
4.1.2 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.1.3 Open Sets, Closed Sets . . . . . . . . . . . . . . . . . . 61
4.2 Further Properties . . . . . . . . . . . . . . . . . . . . . . . . 64
4.2.1 Complete Sets, Compact Sets . . . . . . . . . . . . . . 65
4.2.2 Convergence of Functions . . . . . . . . . . . . . . . . 69
4.2.3 Introduction to Optimization . . . . . . . . . . . . . . 70
4.3 Fixed Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.3.1 Fixed Point Theorems . . . . . . . . . . . . . . . . . . 75
4.3.2 Application: RE Equilibria . . . . . . . . . . . . . . . . 81
5 Introduction to Dynamics 88
5.1 Deterministic Dynamical Systems . . . . . . . . . . . . . . . . 88
5.1.1 The Basic Model . . . . . . . . . . . . . . . . . . . . . 88
5.1.2 Chaotic Dynamic Systems . . . . . . . . . . . . . . . . 96
5.1.3 Equivalent Dynamics and Linearization . . . . . . . . . 100
5.2 Introduction to Dynamic Optimization . . . . . . . . . . . . . 102
5.2.1 The Sequential Approach . . . . . . . . . . . . . . . . . 102
5.2.2 Introduction to Dynamic Programming . . . . . . . . . 106
5.2.3 Dynamics of the Optimal Path . . . . . . . . . . . . . 107
6 Introduction to Markov Chains 110
6.1 Finite State Markov Chains . . . . . . . . . . . . . . . . . . . 110
6.1.1 Basics of Markov Chains . . . . . . . . . . . . . . . . . 110
6.1.2 Generating Markov Chains . . . . . . . . . . . . . . . . 113
6.1.3 Distribution Dynamics . . . . . . . . . . . . . . . . . . 117
July 21, 2006 Page 2 of 333
Stochastic Economic Dynamics John Stachurski
6.2 Further Topics for Finite State Chains . . . . . . . . . . . . . 122
6.2.1 Stability in the Finite Case . . . . . . . . . . . . . . . 122
6.2.2 Applications . . . . . . . . . . . . . . . . . . . . . . . . 130
6.2.3 Joint Distributions . . . . . . . . . . . . . . . . . . . . 135
6.3 Stochastic Difference Equations . . . . . . . . . . . . . . . . . 141
6.3.1 Basic Models and Simulation . . . . . . . . . . . . . . 141
6.3.2 The Commodity Pricing Model . . . . . . . . . . . . . 149
6.3.3 Distribution Dynamics . . . . . . . . . . . . . . . . . . 157
7 Measure and Integral 165
7.1 A Crash Course in Measure Theory . . . . . . . . . . . . . . . 165
7.1.1 Lebesgue Measure . . . . . . . . . . . . . . . . . . . . . 165
7.1.2 Lebesgue Measure in Rn . . . . . . . . . . . . . . . . . 170
7.1.3 More General Measures, Probabilities . . . . . . . . . . 171
7.2 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
7.2.1 The Lebesgue Integral on R . . . . . . . . . . . . . . . 176
7.2.2 The General Integral . . . . . . . . . . . . . . . . . . . 181
7.2.3 Finishing Touches . . . . . . . . . . . . . . . . . . . . . 187
7.3 Probability and Random Variables . . . . . . . . . . . . . . . 192
7.3.1 Random Variables . . . . . . . . . . . . . . . . . . . . 192
7.3.2 Distributions of Random Variables . . . . . . . . . . . 194
7.3.3 Densities . . . . . . . . . . . . . . . . . . . . . . . . . . 198
8 General State Markov Chains 201
8.1 Basic Constructions . . . . . . . . . . . . . . . . . . . . . . . . 201
8.1.1 Stochastic Kernels . . . . . . . . . . . . . . . . . . . . 201
8.1.2 Markov Kernels and SDEs . . . . . . . . . . . . . . . . 206
8.1.3 The Fundamental Recursion, Again . . . . . . . . . . . 209
July 21, 2006 Page 3 of 333
Stochastic Economic Dynamics John Stachurski
8.2 Further Theory . . . . . . . . . . . . . . . . . . . . . . . . . . 212
8.2.1 More Operators . . . . . . . . . . . . . . . . . . . . . . 212
8.2.2 Monotone Markov Chains. . . . . . . . . . . . . . . . . 215
8.2.3 Density Kernels . . . . . . . . . . . . . . . . . . . . . . 216
8.3 Advanced Theory . . . . . . . . . . . . . . . . . . . . . . . . . 220
8.3.1 Stochastic Processes . . . . . . . . . . . . . . . . . . . 220
8.3.2 Markov Chains as Stochastic Processes . . . . . . . . . 226
8.3.3 The iid Case . . . . . . . . . . . . . . . . . . . . . . . 232
9 Dynamics of General State MCs 237
9.1 Existence of Stationary Distributions . . . . . . . . . . . . . . 238
9.1.1 Existence for Feller Chains . . . . . . . . . . . . . . . . 239
9.1.2 Noncompact State Space . . . . . . . . . . . . . . . . . 243
9.1.3 Existence for Monotone Chains . . . . . . . . . . . . . 248
9.2 The Density Approach . . . . . . . . . . . . . . . . . . . . . . 248
9.2.1 Stationary Densities . . . . . . . . . . . . . . . . . . . 248
9.2.2 Stability in the Density Case . . . . . . . . . . . . . . . 256
9.2.3 Computing Stationary Densities . . . . . . . . . . . . . 259
9.3 Classical Theory of MCs . . . . . . . . . . . . . . . . . . . . . 261
9.3.1 Irreducibility . . . . . . . . . . . . . . . . . . . . . . . 262
9.3.2 Harris Recurrence . . . . . . . . . . . . . . . . . . . . . 262
9.3.3 Sample Path Properties . . . . . . . . . . . . . . . . . 262
10 Stochastic Dynamic Programming 263
10.1 Basic Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
10.1.1 Statement of the Problem . . . . . . . . . . . . . . . . 264
10.1.2 Control Policies . . . . . . . . . . . . . . . . . . . . . . 266
10.1.3 Optimality . . . . . . . . . . . . . . . . . . . . . . . . . 271
July 21, 2006 Page 4 of 333
Stochastic Economic Dynamics John Stachurski
10.2 Application: Optimal Growth . . . . . . . . . . . . . . . . . . 278
10.2.1 Optimality . . . . . . . . . . . . . . . . . . . . . . . . . 278
10.2.2 The Euler Equation . . . . . . . . . . . . . . . . . . . . 281
10.2.3 Dynamic Properties . . . . . . . . . . . . . . . . . . . . 287
11 More Stochastic Dynamic Programming 293
11.1 Extensions to the Theory . . . . . . . . . . . . . . . . . . . . . 293
11.1.1 Monotone Policy Rules . . . . . . . . . . . . . . . . . . 293
11.1.2 Unbounded Rewards . . . . . . . . . . . . . . . . . . . 298
11.2 Further Applications . . . . . . . . . . . . . . . . . . . . . . . 306
11.2.1 The Commodity Pricing Model . . . . . . . . . . . . . 306
11.2.2 Optimal Growth with Correlated Shocks . . . . . . . . 306
11.2.3 Asset Prices and Production . . . . . . . . . . . . . . . 307
12 Numerical Methods for Dynamic Programming 308
12.1 Algorithms and Methods . . . . . . . . . . . . . . . . . . . . . 308
12.1.1 Value Iteration . . . . . . . . . . . . . . . . . . . . . . 308
12.1.2 Policy Iteration . . . . . . . . . . . . . . . . . . . . . . 311
12.1.3 Policy Fuction Iteration . . . . . . . . . . . . . . . . . 314
12.2 Finite State/Action Models . . . . . . . . . . . . . . . . . . . 314
12.2.1 Set Up . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
12.2.2 Value Iteration . . . . . . . . . . . . . . . . . . . . . . 316
12.2.3 Policy Iteration . . . . . . . . . . . . . . . . . . . . . . 319
12.3 Continuous State/Action Models . . . . . . . . . . . . . . . . 322
12.3.1 Nonexpansive Function Approximators . . . . . . . . . 322
12.3.2 Fitted Value Iteration . . . . . . . . . . . . . . . . . . 322
12.3.3 Fitted Policy Function Iteration . . . . . . . . . . . . . 322
July 21, 2006 Page 5 of 333
Stochastic Economic Dynamics John Stachurski
A Appendix 323
A.1 Appendix to Chapter 4 . . . . . . . . . . . . . . . . . . . . . . 323
A.2 Appendix to Chapter 6 . . . . . . . . . . . . . . . . . . . . . . 324
A.3 Appendix to Chapter 11 . . . . . . . . . . . . . . . . . . . . . 325
July 21, 2006 Page 6 of 333