NEW YORK (TheStreet) -- Stocks extended gains by mid-afternoon Wednesday, rebounding from Tuesday's selloff and undeterred by a higher dollar and lower oil. 

The S&P 500 was up 0.84%, the Dow Jones Industrial Average rose 0.68%, and the Nasdaq gained 1.3%.

Energy was the only S&P 500 sector not engaging in a broad rally after West Texas Intermediate crude settled at its lowest level since April 28. The commodity was under pressure as the U.S. dollar continued its run higher on signs the Federal Reserve will hike rates as key international markets such as the eurozone introduce their own monetary stimulus. West Texas Intermediate crude closed down 52 cents to $57.51 a barrel. 

High-momentum tech stocks were the best performers, getting caught up in a broad-based rally. Apple (AAPL), Microsoft (MSFT), Oracle (ORCL) and IBM (IBM) each added more than 1%, while the Technology SPDR ETF (XLK) climbed 1.1%.

Broadcom (BRCM) spiked 17% by mid-afternoon after The Wall Street Journal reported the company was in advanced talks to be bought by Avago Technologies (AVGO). Avago popped 6%. 

Markets finished in the red on Tuesday as signs of economic recovery from the housing sector and durable goods numbers exacerbated fears the Federal Reserve would hike rates sooner than expected. Click here for more.

Germany's DAX, France's CAC 40 and the FTSE 100 in London closed more than 1% higher after Greece's Prime Minister Alexis Tsipras said the country and its European creditors were close to a deal that would prove "positive for the Greek economy." The parties are reportedly at the stage of drafting a technical-level agreement, according to Reuters

If you liked this article you might like

Cramer: Dominoes Are in Play Today

Fedex, Apple Are on a Roll Explains Jim Cramer

Cramer: These Stocks Are Playing Catch-Up

Toshiba Reportedly Favoring Broadcom in Flash Business Sale

Bank Earnings Are at a Critical Turning Point: Cramer's 'Mad Money' Recap (Wednesday 4/12/17)