Markets are falling, but there’s an opportunity for investors. Here’s what they should do