gEconpy.model.perturbation.check_bk_condition#

gEconpy.model.perturbation.check_bk_condition(A, B, C, D, tol=1e-08, verbose=True, on_failure='ignore', return_value='dataframe')#

Check the Blanchard-Kahn condition for the linearized system.

Computes the generalized eigenvalues of the system in the Sims (2002) [1] form. Per Blanchard and Kahn (1980) [2], the number of unstable eigenvalues (modulus > 1) must equal the number of forward-looking variables for a unique stable solution to exist.

Parameters:
A, B, C, Dnp.ndarray

Jacobian matrices of the linearized DSGE system, evaluated at steady state.

tolfloat, default 1e-8

Tolerance below which numerical values are considered zero.

verbosebool, default True

Whether to log the result.

on_failure'raise' or 'ignore', default 'ignore'

Action to take if the condition is not satisfied.

return_value'dataframe', 'bool', or None, default 'dataframe'

What to return: a DataFrame of eigenvalues, a boolean, or nothing.

Returns:
resultpd.DataFrame, bool, or None

Depends on return_value:

  • 'dataframe': DataFrame with columns Modulus, Real, Imaginary.

  • 'bool': True if the Blanchard-Kahn condition is satisfied.

  • None: Nothing returned.

References

[1]

Sims, Christopher A. “Solving linear rational expectations models.” Computational Economics 20.1-2 (2002): 1-20.

[2]

Blanchard, O.J. and Kahn, C.M. “The solution of linear difference models under rational expectations.” Econometrica 48.5 (1980): 1305-1311.