The Dow Jones Industrials spiked 281.26 points to 31,318.94.
The S&P 500 strengthened 48.72 points, or 1.3%, to 3,893.30. The S&P 500, which sits about 20% off its record high, is looking for its first four-day winning streak since late March.
The NASDAQ Composite jumped 208.40 points, or 1.8%, to 11,570.25.
Energy stocks were leading the gains on Thursday, reversing some recent losses as oil prices rebounded. Chevron rose 2.5%, while Exxon jumped more than 3%.
Freeport-McMoRan gathered 6.6%, and Nucor rose 5%, as commodity stocks climbed.
Chipmakers were higher after South Korea’s Samsung posted an 11% jump in profit and 21% surge in revenue for the latest period on strong sales of memory chips. Shares of AMD surged 4% and Nvidia gained 3%.
Another notable mover was GameStop, which popped 10% after the video game retailer said a four-for-one stock split was approved by its board.
Solar stocks also outperformed, with Sunrun gaining 7%.
Meanwhile, Levi Strauss is set to report earnings Thursday after the bell. Many investors and strategists have pointed to the busy earnings calendar later this month as a key test for markets.
On the economic front, initial jobless claims and continuing claims both ticked up slightly last week. The U.S. trade deficit for May came in slightly higher than expected at $85.5 billion but was still down month over month.
The U.S. Labor Department’s official jobs report is due out on Friday.
Treasury prices dropped, bringing yields up to 3% from Wednesday’s 2.92%. Treasury prices and yields move in opposite directions.
Oil prices regained $5.52 to $104.05 U.S. a barrel.
Gold prices gained two dollars to $1,738.50 U.S. an ounce.