1.4. First-order perturbation

1.4.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}\]

Here \(\varepsilon_{t+b}\) is what agents expect at \(t\) the shocks to be \(b\) periods later: page \(b+1\) of the announcements. Each shock has its own horizon (its solve_shock_horizon); its pages beyond that horizon are zero, and \(k\) is the largest horizon. The pages are revised every period. Their law, the risk terms it gives at higher orders and how the filter carries the pages are in How an announcement evolves: pages and revisions.

1.4.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 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.

Note

Under M with self-consistent expansion points (solve_perturbation_type='m', see Solving) the coupled quadratic is solved repeatedly, at evaluation points that move with the rest points of the switching economy; the solver selected here is used for each inner solve, warm-started from the previous one.

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

1.4.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:

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

  • A0 – nd x nd x h array of contemporaneous coefficient matrices.

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

  • B – passed empty ([]). The solver does not need the shock coefficients: RISE computes the impact of the shocks from the solution after the call.

  • Q – h 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_pb – nd x nd x h array, impact of autoregressive terms.

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

  • Te – ignored (return []): the impact of the shocks is computed by RISE from Tz_pb.

  • retcode – 0 if no problem, non-zero otherwise. A solver that finds several solutions stacks them in the fourth dimension of Tz_pb and returns one code for each; only those with code 0 are kept.