The Nasdaq Composite .IXIC added 0.89 percent to 7,404.98. The Russell 2000 index of smaller-company stocks rose 3.08 points, or 0.2 percent, to 1,606.79.
The price of USA crude climbed back above $70 a barrel Wednesday, a day after the US moved to withdraw from a nuclear accord with Iran.
Exxon Mobil rose 2.4 percent. Oil futures have remained near their highest level since 2014 this week following the Trump administration's decision to re-impose sanctions Iran, the world's fifth-biggest oil producer. Brent crude, used to price worldwide oils, lost 35 cents to close at $77.12.
"Pre-market activity suggests a higher opening as WTI crude prices top $70 per barrel and Nestle-Starbuck deal offers a renewed enthusiasm", Peter Cardillo, chief market economist at Spartan Capital Securities in NY, wrote in a note. Occidental Petroleum gained 5.3 percent to $82.32.
TripAdvisor soared 20 percent after reporting higher earnings than analysts expected.
GAME ON: Electronic Arts led a technology sector rally, climbing 5.9 percent to $131.25 after the video game maker's most recent quarterly results beat forecasts. The move is Walmart's biggest acquisition yet and reflects the retailer's focus on growth opportunities as it tries to narrow the gap with Amazon.com.
Best dressed this week: Mira Rajput Kapoor and Kareena Kapoor Khan
To melt your heart even more, a newlywed Sonam made a decision to share an adorable wedding photograph with husband Anand . First up is Sonam Kapoor's look from the Mehandi night on May 6 where henna was applied at her hands and feet.
That is well above the long-term average of 64 percent and the average of 75 percent over the past four quarters.
The S&P 500 posted 25 new 52-week highs and seven new lows; the Nasdaq Composite recorded 124 new highs and 23 new lows.
WEAK SAUCE: Papa John's global dropped 4.36 percent to $56.17 after the pizza chain's first-quarter results fell short of analyst estimates.
Oil fell 2.7 percent Tuesday after CNN reported the USA would pull out of the Iran deal and allow sanctions to go forward, but that they could take months to go into effect. The yield on the 10-year Treasury rose to 3 percent from 2.98 percent late Tuesday. "It is the impact of the rates rising facing an expensive capital markets". Google's parent company, Alphabet, rose 2.9 percent and Bank of America also rose 2.6 percent.
CURRENCIES: The dollar rose to 109.67 yen from 109.02 on Tuesday. The euro strengthened to $1.1945 from $1.1927.
The Dow Jones industrials fell 51 points, or 0.2 percent, to 24,304.
The yield-sensitive utilities.SPLRCU and telecom services.SPLRCL were down about 0.7 percent each. Across the Korean Strait, the benchmark Kospi added 0.42%. Britain's FTSE 100 gained 0.3 percent.