gEconpy.model.model.stationary_covariance_matrix#
- gEconpy.model.model.stationary_covariance_matrix(model, T=None, R=None, shock_std_dict=None, shock_cov_matrix=None, shock_std=None, return_df=True, **solve_model_kwargs)#
Compute the stationary covariance matrix of the solved system.
Solution is found by solving the associated discrete lyapunov equation.
In order to construct the shock covariance matrix, exactly one of shock_dict, shock_cov_matrix, or shock_std should be provided.
- Parameters:
- model: Model
DSGE Model assoicated with T and R
- T: np.ndarray, optional
Transition matrix of the solved system. If None, this will be computed using the model’s
solve_modelmethod.- R: np.ndarray
Selection matrix of the solved system. If None, this will be computed using the model’s
solve_modelmethod.- shock_std_dict: dict, optional
A dictionary of shock sizes to be used to compute the stationary covariance matrix.
- shock_cov_matrix: array, optional
An (n_shocks, n_shocks) covariance matrix describing the exogenous shocks
- shock_std: float, optional
Standard deviation of all model shocks.
- return_df: bool
If True, return the covariance matrix as a DataFrame
- **solve_model_kwargs
Arguments forwarded to the
solve_modelmethod. Ignored if T and R are provided.
- Returns:
- Sigma:
np.ndarray|pd.DataFrame Stationary covariance matrix of the linearized model. Datatype depends on the variable of the
return_dfargument.
- Sigma: