US stocks rise as investors digest 2nd-quarter earnings beats