When the expansion will end—and how to protect portfolios