US stocks end sharply higher on strong earnings