The S&P 500 was up 0.47%, the Dow Jones Industrial Average gained 0.27%, and the Nasdaq added 1.12%.
The Dow was on track to score a new record high after securing its best close ever on Tuesday. The Dow has logged sixth straight record closes. Improving economic data, particularly in the labor market, and signs the earnings recession could have hit a bottom have inspired new highs on market.
The S&P 500 was also on its way to a new record close. The benchmark index closed at records on Monday.
Crude oil turned positive after the weekly release on U.S. stocks from the Energy Information Administration showed a decline. The EIA reported a drop of 2.3 million barrels of crude oil in the past week. Ballooning global supplies and production have pummeled crude prices since last year.
West Texas Intermediate settled up 0.65% to $44.94 a barrel on Wednesday, coming back from losses of nearly 2% earlier in the day.
Around one-tenth of companies in the S&P 500 have reported so far this season in what is expected to be another three-month period of shrinking earnings. The blended earnings estimate is expected to decline 4.3%, a slower decline than 5% in the first quarter.
Microsoft rallied to its best level in three months after reporting a better-than-expected quarter on the strength of sales in its cloud software unit. The tech giant reported fourth-quarter adjusted earnings of 69 cents a share, 11 cents above forecasts. Cloud revenue increased 7% to $6.7 billion, nearly one-third of total sales.
Morgan Stanley (MS) - Get Report added 1.5% after earnings beat reduced expectations. Profit declined in its second quarter to 75 cents a share, down a dime from a year earlier, as volatile market activity deterred investing. However, the weaker profit topped consensus of 59 cents.
Halliburton (HAL) - Get Report swung to an expected second-quarter loss on crude's decline over the past year. The oil-services provider reported an adjusted per-share loss of 14 cents, a nickel narrower than expected. The North American market has likely reached a bottom, though, and activity looks to be improving, CEO David Lesar said in a statement. The stock fell 1.4%.
Intuitive Surgical (ISRG) - Get Report jumped 5% after breezing past quarterly forecasts. The medical-tech developer earned an adjusted $5.62 a share, much higher than consensus of $4.99. Revenue of $670.1 million came in higher than an estimated $642 million.
United Continental (UAL) - Get Report rose slightly after exceeding analysts' estimates on its top- and bottom-lines. The airline earned $2.61 a share, 4 cents above estimates. Revenue fell 5.1% to $9.4 billion, narrowly beating estimates by $20 million.
Valeant (VRX) added 4% on two separate pieces of good news. First, the Food and Drug Administration advisory committee unanimously recommended approval of its psoriasis treatment. The FDA usually accepts the advice of the committee.
Second, the FDA approved constipation treatment Relistor, a dual effort from Progenics (PGNX) - Get Report and Valeant. Progenics licenses the treatment for opioid-related constipation to Valeant. Progenics shares spiked 22% in premarket trading.