Stocks rocketed higher on Tuesday as the fears over rate hikes that have plagued Wall Street for nearly a week began to fade. 

The S&P 500 was up 1.4%, the Dow Jones Industrial Average gained 1.2%, and the Nasdaq climbed 2%.

The tech sector led markets higher on Tuesday. Major tech giants including Apple (AAPL - Get Report) , Alphabet (GOOGL - Get Report) , Microsoft (MSFT - Get Report) , Facebook (FB - Get Report)  and Alibaba (BABA - Get Report) climbed, while the Technology Select Sector SPDR ETF (XLK - Get Report) rose 1.8%. 

Alphabet, Apple and Facebook are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells AAPLGOOGL or FB? Learn more now.

Markets have been under pressure since last Wednesday when minutes from the Fed's April meeting shattered the perception that the central bank wouldn't be ready to raise rates until later this year. Few expected another rate hike as early as the summer.

Talk of a June rate hike continued on Tuesday, though. Philadelphia Fed President Patrick Harker joined the chorus, arguing that the central bank could raise rate two or three times this year.

"Although I cannot give you a definitive path for how policy will evolve, I can easily see the possibility of two or three rate hikes over the remainder of the year," Harker told an audience in Philadelphia on Monday. "If the data comes in and it's not that consistent with my view of the strength in the economy, then I would pause, but otherwise, I think a June rate increase is appropriate."

A rate hike in June now has a roughly 30% probability, according to CME Group, after starting the month with odds of less than 10%. The Federal Open Market Committee's next meeting is June 14-15.

New home sales surged 16.6% to a seasonally adjusted annual pace of 619,000 in April as builders increased construction to meet demand. Analysts expected an annual pace of 525,000. The reading marked the biggest increase in 24 years. The median price of new homes picked up 7.8% to $321,000 as supply remains constrained.

"Monthly new home sales are a notoriously volatile series, so we are reluctant to make much of monthly movements," said Kevin Cummins, U.S. economist at UBS Investment Bank. "However, even smoothing through the monthly volatility it does appear the trend is moving steadily upward into the key spring selling season."

Monsanto (MON)  climbed in afternoon trading after it announced that Bayer's (BAYRY) bid was too low, though it was open to continued negotiations. The U.S.-based agricultural company said the bid undervalues Monsanto and does not adequately address regulatory risks. 

DSW (DSW) slumped after reporting a smaller-than-expected first-quarter profit and reducing its full-year outlook on weaker shoe sales. The shoes and accessories retailer blamed a "challenging retail environment." DSW predicts a full-year sales decline between 1% to 2%. 

Best Buy (BBY - Get Report) fell 8% after forecasting a weaker-than-expected second quarter and announcing the departure of Chief Financial Officer Sharon McCollam, effective June 14. The electronics retailer expects second-quarter earnings between 38 cents and 42 cents a share, short consensus of 50 cents. Best Buy also expects full-year sales and earnings to come in flat for the year.

AutoZone (AZO) was slightly higher despite a disappointing third quarter tied to rough weather in Midwestern, Middle Atlantic, and Northeastern states. The auto-parts retailer reported a 4% sales increase to $2.59 billion, though revenue fell short of consensus of $2.65 billion. Same-store sales rose 2% in the third quarter, compared to 2.3% in the year-ago period.

Toll Brothers (TOL - Get Report) gained 8% after posting a better-than-expected second quarter. Profit-per-share rose to 51 cents from 37 cents in the year-ago quarter, topping estimates of 46 cents. Revenue surged 31% to $1.12 billion. Toll Brothers has benefited from a robust housing sector which has seen resilient construction growth despite a downturn elsewhere in the economy.

Western Digital (WDC - Get Report) was upgraded to outperform from market perform with a $50 price target, Cowen analysts said on Tuesday. The firm said expectations are low and the company is expanding its total addressable market.

Deere & Co. (DE - Get Report) was upgraded to outperform from market perform with a $96 price target at BMO Capital. Analysts said the company is underowned and is attractively valued.

Johnson Controls (JCI - Get Report) was upgraded to outperform from neutral with a $50 price target at Credit Suisse. The firm said the move was a valuation call as the market is giving little value to an Adient spin and Tyco synergies.