gEconpy.model.model.Model.steady_state#
- Model.steady_state(how='analytic', use_jac=True, use_hess=True, use_hessp=False, progressbar=True, optimizer_kwargs=None, verbose=True, bounds=None, fixed_values=None, jitter_x0=False, **updates)#
Solve for the deterministic steady state of the DSGE model.
A steady state is defined as the fixed point in the system of nonlinear equations that describe the model’s equilibrium. Given a system of model equations \(F(x_{t+1}, x_t, x_{t-1}, \varepsilon_t)\), the steady state is defined as a state vector \(\bar{x}\) such that
\[F(\bar{x}, \bar{x}, \bar{x}, 0) = 0\]where \(0\) is the zero vector. At the point \(\bar{x}\), the system will not change, absent an exogenous shock.
The steady state is a key concept in DSGE modeling, as it is the point around which the model is linearized.
- Parameters:
- how: str, one of [‘analytic’, ‘root’, ‘minimize’], default: ‘analytic’
Method to use to solve for the steady state. If
'analytic', the model is solved analytically using user-provided steady-state equations. This is only possible if the steady-state equations are fully defined. If'root', the steady state is solved using a root-finding algorithm. If'minimize', the steady state is solved by minimizing a squared error loss function.- use_jac: bool, default: True
Flag indicating whether to use the Jacobian of the error function when solving for the steady state. Ignored if
howis ‘analytic’.- use_hess: bool, default: False
Flag indicating whether to use the Hessian of the error function when solving for the steady state. Ignored if
howis not ‘minimize’- use_hessp: bool, default: True
Flag indicating whether to use the Hessian-vector product of the error function when solving for the steady state. This should be preferred over
use_hessif your chosen method supports it. For larger problems it is substantially more performant. Ignored ifhownot “minimize”.- progressbar: bool, default: True
Flag indicating whether to display a progress bar when solving for the steady state.
- optimizer_kwargs: dict, optional
Keyword arguments passed to either scipy.optimize.root or scipy.optimize.minimize, depending on the value of
how. Common argments include:- ‘method’: str,
The optimization method to use. Default is
'hybr'forhow = 'root'andtrust-krylovforhow = 'minimize'
- ‘maxiter’: int,
The maximum number of iterations to use. Default is 5000. This argument will be automatically renamed to match the argument expected by different optimizers (for example, the
'hybr'method usesmaxfev).
- verbose: bool, default True
If true, print a message about convergence (or not) to the console .
- bounds: dict, optional
Dictionary of bounds for the steady-state variables. The keys are the variable names and the values are tuples of the form (lower_bound, upper_bound). These are passed to the scipy.optimize.minimize function, see that docstring for more information.
- fixed_values: dict, optional
Dictionary of fixed values for the steady-state variables. The keys are the variable names and the values are the fixed values. These are not check for validity, and passing an inaccurate value may result in the system becoming unsolvable.
- jitter_x0: bool
Whether to apply some small N(0, 1e-4) jitter to the initial point
- **updates: float, optional
Parameter values at which to solve the steady state. Passed to self.parameters. If not provided, the default parameter values (those originally defined during model construction) are used.
- Returns:
- steady_state:
SteadyStateResults Dictionary of steady-state values
- steady_state: