Perturbation#

linearize_model(variables, equations, shocks)

Compute the log-linearized Jacobian matrices of a DSGE model using pytensor autodiff.

check_bk_condition(A, B, C, D[, tol, ...])

Check the Blanchard-Kahn condition for the linearized system.

Helper Functions#

make_not_loglin_flags(variables, ...[, ...])

Determine which variables should not be log-linearized.

statespace_to_gEcon_representation(A, T, R, tol)

Decompose the full state-space solution into gEcon's state/jumper partition.

check_perturbation_solution(A, B, C, D, T, R)

Log the residual norms of a solved perturbation system.

Pytensor Ops#

check_bk_condition_pt(A, B, C, D, lead_var_idx)

Symbolic Blanchard-Kahn condition check using differentiable eigenvalues.