gEconpy.model.model.Model#

class gEconpy.model.model.Model(variables, shocks, equations, steady_state_relationships, param_dict, hyper_param_dict, deterministic_dict, calib_dict, priors, f_params, f_ss_resid, f_ss, f_ss_error, f_ss_jac, f_ss_error_grad, f_ss_error_hess, f_ss_error_hessp, f_linearize, backend='numpy', is_linear=False)#

A Dynamic Stochastic General Equlibrium (DSGE) Model.

A Model is a container class for a DSGE model. It has two primary functions: to store all model primitives (variables, parameters, shocks, equations, etc.), and to store compiled functions used to solve the model.

Methods

Model.__init__(variables, shocks, equations, ...)

Container class for DSGE model primitives and compiled functions.

Model.get(name)

Get a model variable or parameter by name.

Model.linearize_model([order, ...])

Linearize the model around the deterministic steady state.

Model.parameters(**updates)

Compute the full set of free parameters for the model, including deterministic parameters.

Model.solve_model([solver, log_linearize, ...])

Solve for the linear approximation to the policy function via perturbation.

Model.steady_state([how, use_jac, use_hess, ...])

Solve for the deterministic steady state of the DSGE model.

Attributes

calibrated_params

List of calibrated parameters in the model, stored as Sympy ``Symbol``s.

deterministic_params

List of deterministic parameters in the model, stored as Sympy ``Symbol``s.

equations

List of equations in the model, stored as Sympy expressions.

hyper_params

List of hyperparameters in the model, stored as Sympy ``Symbol``s.

param_priors

Dictionary of prior distributions for the model parameters.

params

List of parameters in the model, stored as Sympy ``Symbol``s.

shock_priors

Dictionary of prior distributions for the model shocks.

shocks

List of shocks in the model, stored as Sympy symbols.

steady_state_relationships

List of model equations, evaluated at the deterministic steady state.

variables

List of variables in the model, stored as Sympy symbols.