Stocks rose on Thursday, building on a strong June rally, as tech shares rebounded from losses in the previous session.

The Dow Jones Industrial Average climbed 126 points as Disney shares outperformed. The S&P 500 gained 0.4%, led by the energy and tech sectors. The Nasdaq Composite advanced 0.5%.

Chipmakers rebounded after posting sharp losses in the previous session, boosting tech shares. The VanEck Vectors Semiconductor ETF (SMH) climbed 0.5%. Applied Materials and Micron Technology rose 0.7% and 0.8%, respectively. Apple shares traded 0.4% higher. On Wednesday, the tech sector snapped a six-day winning streak.

Disney shares contributed to the gains, rising more than 1% after an analyst at Morgan Stanley raised his price target on the stock to $160 per share from $135. The analyst cited the company’s new streaming service, noting it could give its global subscriber numbers a boost.

The major indexes posted small losses in each of the previous two sessions as a rally to start off June took a pause. The major indexes were all up more than 4% for the month, however, after notching sharp losses in May.

“Markets yet again showed some minor weakness [on Wednesday], but yet failed to decline sufficiently to think a top had been put in,” Mark Newton, managing member at Newton Advisors, said in a note. These declines are “inconclusive proof of anything more than just a minor stalling.”

Still, lingering trade tensions kept investors on edge. Expectations that trade officials from the U.S. and China will clinch a deal on the sidelines of a G-20 meeting in Osaka on June 28-29 have been fading in recent days.

President Donald Trump, who has said he still has plans to meet with Chinese President Xi Jinping later this month, has repeatedly threatened to escalate an already months-long trade war by putting tariffs on almost all of the remaining Chinese imports that are not already impacted by U.S. charges.

Oil prices, meanwhile, got a boost amid reports of a tanker incident in the Gulf of Oman. U.S. crude prices traded 3.4% higher at $52.86 per barrel. The jump comes a day after oil slipped to its lowest level in five months amid continued increases in U.S. crude stockpiles and concerns about lower demand growth.

The move higher in oil boosted energy shares. The Energy Select Sector SPDR Fund (XLE) jumped more than 1%. Diamondback Energy and National Oilwell Varcop were the best performers within the fund, rising more than 2.5% each.

CNBC

By Ed Moya