How to buy stocks on the brink of a bear market - CNBC