US stocks end higher as investors digest earnings reports