About the Author |
|
vii | |
Preface |
|
ix | |
Acknowledgments |
|
xi | |
|
|
|
|
1 | (1) |
|
|
1 | (24) |
|
|
1 | (1) |
|
|
2 | (1) |
|
|
2 | (1) |
|
1.2.4 Variables and Operations |
|
|
3 | (3) |
|
|
6 | (1) |
|
1.2.6 Multidimensional Arrays |
|
|
7 | (2) |
|
|
9 | (3) |
|
|
12 | (5) |
|
|
17 | (1) |
|
|
18 | (1) |
|
1.2.11 Working With Dates |
|
|
19 | (2) |
|
|
21 | (1) |
|
|
22 | (3) |
|
|
25 | (2) |
|
1.3.1 Julia's Type System |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
26 | (1) |
|
2 Basic Numerical Techniques |
|
|
|
|
27 | (1) |
|
|
27 | (6) |
|
|
28 | (3) |
|
|
31 | (1) |
|
2.2.3 Eigenvalues and Eigenvectors |
|
|
32 | (1) |
|
2.3 Interpolation and Curve Fitting |
|
|
33 | (8) |
|
2.3.1 Polynomial Interpolation |
|
|
33 | (2) |
|
2.3.2 Spline Interpolation |
|
|
35 | (1) |
|
|
36 | (1) |
|
2.3.4 Interpolation in Julia |
|
|
37 | (1) |
|
|
38 | (2) |
|
2.3.6 Curve Fitting In Julia |
|
|
40 | (1) |
|
2.4 Function Approximation |
|
|
41 | (9) |
|
2.4.1 Local Approximation |
|
|
41 | (1) |
|
2.4.2 Doing Approximations With Regression |
|
|
42 | (1) |
|
2.4.3 Orthogonal Polynomials |
|
|
42 | (1) |
|
2.4.4 Least Square Orthogonal Polynomials Approximation |
|
|
43 | (2) |
|
2.4.5 Chebyshev Approximation |
|
|
45 | (1) |
|
2.4.6 Shape-Preserving Approximation |
|
|
45 | (2) |
|
2.4.7 Multidimensional Approximations |
|
|
47 | (2) |
|
2.4.8 Doing Function Approximations in Julia |
|
|
49 | (1) |
|
2.5 Numerical Differentiation |
|
|
50 | (4) |
|
|
51 | (2) |
|
2.5.2 Richardson Extrapolation |
|
|
53 | (1) |
|
2.5.3 Using Interpolation to Approximate the Derivatives |
|
|
54 | (1) |
|
2.5.4 Numerical Differentiation in Julia |
|
|
54 | (1) |
|
2.6 Numerical Integration |
|
|
54 | (14) |
|
2.6.1 Newton-Cotes Methods |
|
|
55 | (1) |
|
|
56 | (1) |
|
2.6.3 Infinite Integration |
|
|
57 | (1) |
|
2.6.4 Gaussian Quadrature Methods |
|
|
58 | (3) |
|
2.6.5 Multivariate Integration |
|
|
61 | (1) |
|
2.6.6 Monte Carlo Integration |
|
|
62 | (2) |
|
2.6.7 Quasi Monte Carlo Integration |
|
|
64 | (1) |
|
2.6.8 Numerical Integration in Julia |
|
|
65 | (3) |
|
2.7 Root Finding and Nonlinear Equations |
|
|
68 | (8) |
|
2.7.1 The Bisection Method |
|
|
68 | (1) |
|
|
69 | (1) |
|
|
70 | (1) |
|
2.7.4 Quasi-Newton Methods |
|
|
70 | (1) |
|
2.7.5 Multivariate Methods |
|
|
71 | (2) |
|
2.7.6 Comparing Methods to Solve for Roots |
|
|
73 | (1) |
|
2.7.7 Solving for Roots of Polynomials |
|
|
74 | (1) |
|
2.7.8 Complementarity Problems in Julia |
|
|
74 | (2) |
|
2.7.9 Solving for Roots in Julia |
|
|
76 | (1) |
|
|
76 | (11) |
|
2.8.1 One-Dimensional Optimization |
|
|
77 | (2) |
|
2.8.2 Multidimensional Optimization |
|
|
79 | (2) |
|
2.8.3 The Nonlinear Least Square |
|
|
81 | (2) |
|
2.8.4 Constrained Optimization |
|
|
83 | (2) |
|
2.8.5 Optimization in Julia |
|
|
85 | (2) |
|
2.9 Computing the Accuracy of Approximations |
|
|
87 | (4) |
|
|
89 | (2) |
|
3 Solving and Simulating DSGE Models |
|
|
|
|
91 | (1) |
|
3.2 Deterministic Difference Equations |
|
|
91 | (8) |
|
3.2.1 First-Order Linear Equations |
|
|
91 | (1) |
|
|
92 | (1) |
|
3.2.3 Higher-Order Linear Equations |
|
|
92 | (4) |
|
3.2.4 Deterministic Linear Systems |
|
|
96 | (3) |
|
3.3 Stochastic Difference Equations |
|
|
99 | (6) |
|
3.3.1 Modeling the Rational Expectations |
|
|
99 | (1) |
|
3.3.2 First-Order Stochastic Linear Equations |
|
|
99 | (3) |
|
3.3.3 Multivariate Linear Rational Expectations Models |
|
|
102 | (1) |
|
3.3.4 The Blanchard-Kahn Approach |
|
|
102 | (1) |
|
|
103 | (1) |
|
|
103 | (2) |
|
3.4 Applications in Julia |
|
|
105 | (14) |
|
3.4.1 A Real Business Cycle Model |
|
|
105 | (7) |
|
3.4.2 A Basic New Keynesian Model |
|
|
112 | (4) |
|
3.4.3 DSGE Models in Julia |
|
|
116 | (1) |
|
|
117 | (2) |
|
|
|
|
119 | (1) |
|
4.2 Deterministic Dynamic Programming |
|
|
119 | (10) |
|
|
119 | (5) |
|
4.2.2 Numerical Algorithms and Applications |
|
|
124 | (5) |
|
4.3 Stochastic Dynamic Programming |
|
|
129 | (20) |
|
|
129 | (14) |
|
4.3.2 Numerical Algorithms and Applications |
|
|
143 | (6) |
|
4.4 Linear Quadratic Dynamic Programming |
|
|
149 | (10) |
|
4.4.1 The Deterministic Optimal Linear Regulator Problem |
|
|
149 | (6) |
|
4.4.2 The Stochastic Optimal Linear Regulator Problem |
|
|
155 | (2) |
|
|
157 | (2) |
|
5 Advanced Numerical Techniques |
|
|
|
|
159 | (1) |
|
|
159 | (15) |
|
5.2.1 The General Framework |
|
|
159 | (2) |
|
5.2.2 Solving DSGE Models With the Perturbation Method |
|
|
161 | (3) |
|
5.2.3 Applications in Julia |
|
|
164 | (10) |
|
5.3 Parameterized Expectations Algorithm |
|
|
174 | (5) |
|
|
174 | (1) |
|
5.3.2 An Example in Julia |
|
|
175 | (4) |
|
|
179 | (22) |
|
|
179 | (2) |
|
5.4.2 The Projection Method Algorithms and Applications |
|
|
181 | (19) |
|
|
200 | (1) |
|
6 Heterogeneous Agents Models |
|
|
|
|
201 | (1) |
|
6.2 Computing the Stationary Distribution |
|
|
201 | (14) |
|
|
201 | (1) |
|
6.2.2 The Stationary Equilibrium |
|
|
202 | (1) |
|
6.2.3 A General Algorithm |
|
|
203 | (1) |
|
|
204 | (11) |
|
6.3 Dynamics of the Distribution Function |
|
|
215 | (8) |
|
6.3.1 Introducing Dynamics in a Model Economy With Heterogeneous Agents |
|
|
215 | (4) |
|
6.3.2 Dynamic Heterogeneous Agents Models With Aggregate Uncertainty |
|
|
219 | (2) |
|
|
221 | (2) |
Index |
|
223 | |