1.3. First-order perturbation

1.3.1. The state vector

\[z_{t}\equiv\left[ \begin{array}{ccc} x_{t-1}^{\prime} & \sigma & \varepsilon_{t}^{\prime} \end{array} \right]^{\prime}\]

where \(\sigma\) is the perturbation parameter.

In some applications, agents have information on shocks \(k \geq 0\) periods ahead. The state vector under anticipated shocks (Maih, 2010; Juillard and Maih, 2010) is:

\[z_{t}\equiv\left[ \begin{array}{cccccc} x_{t-1}^{\prime} & \sigma & \varepsilon_{t}^{\prime} & \varepsilon_{t+1}^{\prime} & \cdots & \varepsilon_{t+k}^{\prime} \end{array} \right]^{\prime}\]

1.3.2. Solvers for the quadratic matrix polynomial

Constant-parameter case (and the Maih-Waggoner perturbation)

The algorithms for solving linear rational expectations models:

  • rise_1 – a Klein-like algorithm. Default.

  • sims – the Gensys algorithm of Sims (2002).

  • klein – the algorithm of Klein (2000).

  • AIM – see Anderson (2008).

  • cyclic_reduction – the cyclic-reduction algorithm.

Note

If there is a unique and stable solution in the Maih-Waggoner perturbation, these algorithms also work in the regime-switching case.

Regime-switching case

The algorithms for solving regime-switching linear rational expectations models:

  • mnk – Newton (Maih, 2015), explicitly forming Kronecker products.

  • mn – Newton (Maih, 2015) avoiding Kronecker products; more efficient on large systems.

  • fwz – Newton (Farmer, Waggoner and Zha, 2011).

  • dsge_udc – undetermined coefficients (Maih-Waggoner, 2018). Only with the Maih-Waggoner perturbation.

  • dsge_schur – Schur-based method (Maih-Waggoner, 2018). Returns the most stable solution; equivalent to rise_1 and the constant-parameter solvers when a unique stable solution exists. Only with the Maih-Waggoner perturbation.

  • dsge_groebner – Groebner-basis solver from computational algebraic geometry (Maih-Waggoner, 2018). When it works, finds all possible solutions.

  • mfi – functional iteration (Maih, 2015).

Note

All these regime-switching solvers can solve constant- parameter models even when there is no unique and stable solution.

See Solving for the diagnostic protocol when a solver returns retcode 21.

1.3.3. User-defined solver

A user-defined solver should be a function with signature:

[Tz_pb, Tsig, Te, retcode] = ...
    user_solver(Gplus01, A0, Aminus, B, Q, stst_, vargs{:});

Inputs:

  • Gplus01nd x nd x h x h array of forward-looking coefficient matrices multiplied by the transition probabilities.

  • A0nd x nd x h array of contemporaneous coefficient matrices.

  • Aminusnd x nd x h array of backward-looking coefficient matrices.

  • Bnd x nx x h array of shock coefficient matrices.

  • Qh x h transition matrix with Q(i,j) the probability of going from regime i to regime j.

  • stst_nd x h matrix whose columns are the steady state in each regime.

  • vargs – any additional arguments.

Outputs:

  • Tz_pbnd x nd x h array, impact of autoregressive terms.

  • Tsignd x nd matrix, impact of the perturbation parameter in each regime.

  • Tend x nx x h array, impact of shocks.

  • retcode0 if no problem, non-zero otherwise.