Repository navigation
Alpha Release | Iteration 3
Pre-release
Pre-release
Correlated Shock logic, Shock Processing, Extended Multivariate Shock infrastructure
This release iteration has a heavy focus on shock specifications and the much-needed multivariate distribution support.
Changes
- Introduced spec notation for multivariate shock arrays:
# Two uncorrelated shocks (2 univariate generators)
spec1 = {'g': shock_gen(...), 'z': shock_gen(...)}
# Two correlated shocks, one multi-var generator. Cov matrix built at sim-time
spec2 = {'g,z': shock_gen(...)}
# Spec1: expects {"sig_g, sig_z"} available in calibration config.
# Spec2: expects {"sig_g, "sig_z", "rho_gz" | "rho_zg"} available in calibration config.- Reformatted the multivariate distributions to accept a
covparameter for an$(n\times n)$ covariance matrix (distributions used to compute the matrix from supplied model parameters) - Added
_build_covtoSolvedModelto offload the matrix computations - Multivar distributions don't need/use a special generator signature.
abstract_shock_arrayhas beed restored as the true abstraction parent of all built-in shock generation due to multivar and univar shocks sharing signatures. - Added
_shock_unpacktoSolvedModelto parse and identify shock structure from specification input._shock_unpackis now the owner of all shock construction processes, returning a(idx, shock_arr)to thesimmethod. - Introduced
SymbolGetterDict; an extension on native dictionaries now used in the config. Allows using stringvarnames to index symbolic keys. (mySGD["var1"] == mySGD[sp.Symbol("var1")]). This lets users avoid converting config names to symbols in notebooks, etc. as long as they don't need the symbolic representations.