Macroeconomic resilience in a DSGE model