[IrisToolbox] for Macroeconomic Modeling
Simulating nonlinear models
jaromir.benes@iris-toolbox.com
System of nonlinear equations with model-consistent expectations
System of \(n\) nonlinear conditional-expectations equations
-
Vector of \(n\) variables: \(x_t = \left[ x_t^1, \, \dots, x_t^n \right]'\)
-
Vector of \(s\) shocks: \(\epsilon_t = \left[ \epsilon_t^1, \, \dots, \epsilon_t^s \right]'\)
-
Vector of \(p\) parameters: \(\theta_t = \left[ \theta_t^1, \, \dots, \theta_t^p \right]'\)
-
Conditional expectations of shocks: \(\E{t-1} \left[x_t\right] = \E{t-2} \left[x_t\right] = \cdots = 0\)
-
Conditional higher moments: \(\E{t-1}\left[ \epsilon_t\, \epsilon_t{}' \right] = \E{t-2}\left[ \epsilon_t\, \epsilon_t{}' \right] = \cdots = \Omega, \dots\)
Methods for nonlinear simulations
Characteristics | Local approximation | Global approximation | Stacked time |
---|---|---|---|
Solution form | Function | Function | Sequence |
Explicit terminal | ✖︎ | ✖︎ | ✔︎ |
Global nonlinearities | ✖︎ | ✔︎ | ✔︎ |
Stochastic nonlinearities | ✔︎ | ✔︎ | ✖︎ |
Automated design | ✔︎ | ✖︎ | ✔︎ |
Large scale models | ✔︎ | ✖︎ | ✔︎ |
Computational load | Increasing | Large | Manageable |
Local approximation methods
Non-stochastic steady state
- A "fixed point" calculated under the following "non-stochastic" assumptions
- Stationary steady state: characterized by a single number, \(\bar x\)
- Steady growth path with a constant difference: characterized by two numbers, \(\bar x_t\) and \(\Delta \bar x\), at a particular yet arbitrary snapshot along the path
- Steady growth path with a constant rate of change: characterized by \(\bar x_t\) and \(\delta \bar x\), after logarithm, conceptually the same as the constant difference case
- A noteworth special case: unit root process with zero difference/rate of change – flat in steady state but not stationary (not pinned down to a fixed number)
Local approximation methods
Deviations from non-stochastic steady state
Vector of deviations from steady path
Find a function approximated around the nonstochastic steady state by terms up to a desired order, with coefficient matrices (solution matrices) \(A_0\), \(A_1\), \(A_2\), \(\dots\), \(B\)
that are consistent with the original system of equations up to a desired order
The coefficient matrices \(A_0, A_1, \ A_2,\ A_3, \ \dots, B_1, B_2,\ \dots\) dependent on
- the 1st, 2nd, ..., \(k\)-th order Taylor expansions of the original functions \(f_1,\ \dots,\ f_k\)
- model parameters \(\theta\)
The higher-order coefficient matrices \(A_2, A_3, \dots, B_2, B_3 \ \dots\) also dependent on
- the higher moments of shocks \(\Omega, \dots\)
Sequential calculation of local approximate solutions
-
Calculate non-stochastic steady state
-
Use generalized Schur decomposition to determine the first-order solution matrices
-
Based on steps 1 and 2, calculate second-order solution matrices
-
Based on steps 1, 2, and 3, calculate third-order solution matrices
Global approximation
Find a parametric policy ("solution") function \(g\)
consistent with the original system taking into account the expectations operator
The function \(g\) is a parameterized global approximation of the true function, e.g. parameterized sum of polynominals, function over a discrete grid of points, etc.
Policy function method versus parametrized expectations method
Stacked time
Find a sequence of numbers, \(x_1, \dots, x_T\) that comply with the original system of equations stacked \(T\) times underneath each other dropping the expectations operator
Initial condition \(x_{-1}\) given
Terminal condition \(x_{T+1}\) needs to be determined
Combining anticipated and unanticipated shocks in stacked time
By design, all shocks included within one particular simulation run are known/seen/anticipated throughout the simulation range
Simulating a combination of anticipated and unanticipated shocks means
- split the simulation range into sub-ranges by the occurrence of unanticipated shocks
- run each sub-range as a separate simulation, taking the end-points of the previous sub-range simulation as initial condition
- make sure you run a sufficient number of periods in each sub-simulation