gEconpy.solvers.shared.o1_policy_function_adjoints#

gEconpy.solvers.shared.o1_policy_function_adjoints(A, B, C, T, T_bar)#

Compute the adjoint gradients to a matrix quadratic equation.

The matrix quadratic equation is of the form:

..math:

A + BT + CTT = 0

It is associated with the first order approximation to a DSGE policy function.

Parameters:
A: TensorVariable

Matrix of partial derivatives with respect to variables at t-1, evaluated at the steady-state

B: TensorVariable

Matrix of partial derivatives with respect to variables at t, evaluated at the steady-state

C: TensorVariable

Matrix of partial derivatives with respect to variables at t+1, evaluated at the steady-state

T: TensorVariable

Solved policy function matrix, such that \(X_t = T X_{t-1}\)

T_bar: TensorVariable

Backward sensitivity of a scalar loss function with respect to the solved policy function T

Returns:
adjoints: list of TensorVariable
A_bar: TensorVariable

Adjoint of A

B_bar: TensorVariable

Adjoint of B

C_bar: TensorVariable

Adjoint of C