Stocks closed higher on Wall Street Tuesday, extending the market’s recent winning streak after another strong showing by technology companies.

The S&P 500 rose 0.4% and is on pace for its third straight monthly gain. The Nasdaq composite, which is heavily weighted with technology stocks, climbed to an all-time high for the second day in a row. Bond yields rose, another sign of increasing confidence in the economy.

Health care stocks and companies that rely on consumer spending were also among the big gainers, while safe-play sectors like real estate and utilities stocks fell.

Investors have been focused on the prospects for an economic recovery as more businesses reopen after being shut down due to the coronavirus pandemic. Encouraging economic data, including retail sales and hiring, have helped stoke optimism that the recession will be relatively short-lived.

Plus, Wall Street has grown confident that the Federal Reserve and Congress are prepared to continue providing a historic amount of support to the market and economy, said Sam Stovall, chief investment strategist at CFRA.

“All of the negative news has basically been built into share prices,” Stovall said. “If we are to stumble, then the Fed and Congress are likely to step in to put a fiscal and monetary floor underneath the economy and the markets. And now, with the likelihood that the economy will not be shutting down entirely should we end up with a second wave, the market is basically saying it’s ‘onward and upward.’”

The S&P 500 rose 13.43 points to 3,131.29. The Dow Jones Industrial Average gained 131.14 points, or 0.5%, to 26,156.10. The Nasdaq climbed 74.89 points, or 0.7%, to 10,131.37. The index has only fallen twice so far in June. The Russell 2000 index of small company stocks picked up 5.81 points, or 0.4%, to 1,439.34.

The market has continued to climb, despite bouts of volatility, even as a rise in new coronvairus cases in the U.S. and other countries clouds the prospects for an economic recovery.

The World Health Organization said over the weekend that the pandemic is still in its ascendancy. The U.S., which is seeing rapid increases in cases across the South and West, has the most infections and deaths by far in the world, with 2.3 million cases and over 120,000 confirmed virus-related deaths, according to a tally by Johns Hopkins University.

On Tuesday, Federal health officials told Congress to brace for a second wave of coronavirus infections in the fall and winter of this year.

While the virus remains a concern as businesses reopen, new cases aren’t yet that concerning, said Jason Draho, head of Americas asset allocation at UBS Global Wealth Management.

“Right now, that’s something to monitor, but when you look at the underlying data, it’s all still at levels that are not too concerning as opposed to where we were back in March and April,” he said.

Investors have been placing more weight on economic data releases that suggest economies that have reopened are making strides to emerge from a deep recession.

On Tuesday, the Commerce Department said sales of new U.S. homes jumped 16.6% in May to an annual rate of 676,000, exceeding Wall Street’s forecasts.

Further updates on the U.S. economy are expected toward the end of this week, when the government will issue data on consumer spending, weekly unemployment aid applications and durable goods orders.

The yield on the 10-year Treasury note rose to 0.72% from 0.70% late Monday. It tends to move with investors’ expectations for the economy and inflation.

Benchmark U.S. crude oil fell 9 cents to settle at $40.37 a barrel. Brent crude, the international standard, dropped 45 cents to close at 0.5% to $42.63 per barrel.

The market rally followed solid gains in Europe, where indexes marched higher after some encouraging economic data. France’s CAC 40 gained 1.4%, while Germany’s DAX rallied 2.1%. Britain’s FTSE 100 rose 1.2%.

Asian markets overcame some early turbulence caused by reported comments by White House trade adviser Peter Navarro that appeared to suggest the U.S. trade deal with China was in trouble. President Donald Trump later said the agreement was still on.