U.S. stocks sold off on Tuesday with the S&P 500 and Dow suffering their biggest one-day declines in three weeks. A sharp increase in the dollar spurred global investors to dump riskier assets such as equities and commodities, while driving them into havens such as Treasurys.

The S&P 500 SPX, -1.11% closed off 21.86 points, or 1%, lower at 2,104.20, with all 10 main sectors declining. The Dow Jones Industrial Average DJIA, -0.87% dropped 190.48 points, or 1%, to 18,041.54, while the Nasdaq Composite Index COMP, -1.07% ended the session 56.61 points lower, or down 1.1%, at 5,032.75.

U.S. markets were closed for Memorial Day on Monday.

The dollar DXY, -0.06% rallied on the back of the inflation data on Friday and hawkish comments from Federal Reserve Chairwoman Janet Yellen, warning that a rate hike is still in the cards for 2015.

Oil and gold prices tumbled on the dollar’s move, while Treasurys rose, sending the yield on the 10-year note down 7 basis points to 2.14%. A spike in the CBOE Volatility index VIX, -2.38% , which measures implied volatility on the S&P 500, suggests investors are increasingly nervous about a possible pullback.

Charter-Time Warner Cable: Will FCC Give the Nod?

JJ Kinahan, chief strategist at TD Ameritrade, said a sudden spike in the dollar following remarks made Friday by Fed Chairwoman Janet Yellen continued to hit markets, damping earnings expectations from companies already struggling from falling revenues due to currency fluctuations.

But Kinahan stressed that the overall trend is still positive in the market. “The spike in the Vix means people are finally buying protection and also shifting into Treasuries again. But until we breach 2,100, Tuesday’s move is not a big deal,” he noted.

Colin Cieszynski, chief market strategist at CMC Markets, said speculation that rate hikes can come sooner are back.

“The Federal Reserve is data-dependent and with all the weaker data during the winter, investors had previously written off rate hikes this summer, but stronger data is shifting those expectations,” Cieszynski said.

Cieszynski also noted that seasonally the period between end of May and the next earnings season is usually weak for stock prices.

Positive readings on recent economic data, including a pick up in inflation and job gains, have stoked fears that an interest-rate hike may come sooner than anticipated, unnerving some investors. On Tuesday, a report on durable-goods orders showed signs of revival in business investment in April.

Also read: Signs of revival in business investment seen in April durable-goods report

U.S. house prices rose 0.9% in March to take the year-over-year advance to 5%, according to the S&P/Case-Shiller 20-city composite index released Tuesday. With seasonal adjustment, prices were up by 1%, the report said.

New-home sales climbed by more than expected, suggesting improvement in the housing market after sluggish winter months.

Separately, consumer confidence edged higher in May, also topping economists forecasts.

Fed speakers:The Federal Reserve could take a slower approach to raising interest rates if weaker-than-expected growth overseas affects the U.S. economy, Fed Vice Chairman Stanley Fischer said.

In a speech on Monday, Fischer also said he sees the Fed’s short-term rate at 3.25%-4% in three to four years.

Movers and shakers: Shares of Time Warner Cable Inc. US:TWC surged 7.3%, after Charter Communications Inc. CHTR, +0.79% said it w buy the cable-TV company for $55 billion in a cash-and-stock deal. Charter shares were up 2.5%.

Rival Cablevision Systems Corp. US:CVC and Comcast Corp. CMCSA, -0.70% also rose 3.5% and 1.2% respectively.

First Solar, Inc. FSLR, -3.51% share plunged 7.3% after RBC cut the rating to underperform from sector perform.

For more on the day’s notable movers, read Movers & Shakers column.

Other markets: European stock markets SXXP, -0.66% closed lower as investors continued to track developments in Greece’s bailout negotiations. The euro traded as low as $1.0877 on Tuesday, its lowest level since April 28, down from $1.0978 on Monday.

Asian markets closed mixed, while oil CLN25, and metals prices were hit by the dollar rally. Oil futures settled 2.8% lower at $58.03 a barrel, while gold prices dropped 1.4%, to settle at $1,186.90.