This paper analyzes how the risks of nominal and inflation-indexed Treasury bonds vary with the presence of supply and demand shocks through the lens of a small-scale New Keynesian model with habit formation preferences, where investors become more risk averse following adverse economic shocks. We calibrate the model separately for the time periods 1979.Q4-2001.Q1 and 2001.Q2-2019.Q4. For the 1980s calibration, volatile supply shocks raise inflation and the Fed responds by raising interest rates, leading to a recession and simultaneous drops in nominal bond and stock prices. For the 2000s calibration, volatile demand shocks lower the output gap and raise interest rates at the same time, leading to simultaneous increases in nominal and real bond prices and a stock market downturn. The model matches equity Sharpe ratios and stock return predictability through habit formation preferences. Partially backward-looking inflation expectations by price-setters are important to match predictability of bond excess returns as in Campbell and Shiller (1991). We find that the high risks of nominal Treasury bonds in the 1980s were the result of a “perfect storm” of volatile supply shocks and a non-inertial monetary policy rule.