US stocks end bruising week near ‘bear market’ territory