Upbeat corporate earnings are giving stocks another burst of energy.