Life-Cycle Economics With Macroeconomic Shocks