The key is to focus on companies with a strong competitive edge and a track record of growing earnings and cash flow.