Major US stock indexes closed higher on Tuesday, recovering from three straight sessions of losses. The tech-focused Nasdaq Composite rose by 1.3% to 25,837.21, the S&P 500 gained 0.9% to 7,509.20, and the Dow Jones Industrial Average finished up 0.7% at 52,224.64. This rebound was largely attributed to a significant surge in semiconductor stocks, with the Philadelphia SE Semiconductor Index rallying 5.2%.

Chipmakers and data storage firms saw substantial gains. The Roundhill Memory ETF (DRAM) climbed 11%, with individual stocks like Micron (MU), SK Hynix (SKHY), Sandisk (SNDK), Western Digital (WDC), and Seagate Technology (STX) jumping between 11% and 14%. The iShares Semiconductor ETF (SOXX) added 5.5%, as Advanced Micro Devices (AMD), Intel (INTC), and Marvell Technology (MRVL) advanced between 6% and 9%. Intel shares were particularly boosted by news that it will manufacture Fortinet's next generation of cybersecurity chips. In the AI space, Nebius Group (NBIS) jumped 19% after Nvidia (NVDA) announced a more than 9% stake in the Dutch AI infrastructure firm.

Oil prices also rose significantly, reaching their highest levels in over a month. West Texas Intermediate (WTI) futures were up 2.1% at $85 a barrel, and Brent crude futures climbed 2.5% to around $91.50 a barrel. This increase was driven by the tenth consecutive day of US strikes on Iranian infrastructure. The 10-year Treasury yield rose to 4.63%, up over three basis points from Monday's close. Gold futures were up 1.8% to $4,090 an ounce, and Bitcoin traded around $66,500. The US dollar index also increased by 0.2% to 101.18.

In corporate news, 3M (MMM) surged more than 7% to pace the Dow after lifting its full-year profit forecast. Hasbro (HAS) advanced 9% after raising its annual revenue and profit forecasts, citing strong demand for its digital gaming and "Magic: The Gathering" products, which topped $500 million in revenue. General Motors (GM) rose 5% after beating analyst expectations for profit and revenue. Conversely, Danaher (DHR) led S&P 500 decliners with an 11% drop despite topping earnings expectations, due to a weaker-than-expected forecast for summer revenue growth. Defense contractor Northrop Grumman (NOC) and Halliburton (HAL) fell 2.5% and 5.5%, respectively.