Estimating Macroeconomic Models of Financial Crises: An Endogenous Regime-Switching Approach · Study