Investors greeted the first recession in 11 years with yet another stock surge that sent the Nasdaq composite to a record and lifted the Standard & Poor’s 500 index into positive territory for the year.

The tech-heavy Nasdaq stormed to a record 9,924.75, a 110-point, or 1.1 percent, gain on the day. The previous milestone, 9,817.18, was set in February.

The S&P 500 finished at 3,232.39, up nearly 1.2 percent, to erase its losses for the year. The S&P had been more than 30 percent in the hole three months ago. The Dow Jones industrial average also had a big day, jumping 461 points, or 1.7 percent, to close at 27,572.44. The Dow is on a six-day winning streak, its best since September.

U.S. stocks are on pace to post three straight months of gains on renewed optimism that the country is pushing out from its coronavirus stranglehold. The federal government has fed trillions into the economy to keep it from descending into a depression.

The stock gains come at a time when many indicators point to an economy that is wheezing from a once-in-a-century pandemic. On Monday, the National Bureau of Economic Research declared that the U.S. entered its first recession in nearly 11 years due to the “unprecedented magnitude of the decline and production, and its broad reach across the entire economy.”

Markets ignored the bad news.

“This appears to be the triumph of hope over experience,” said Michael Farr, president of Farr, Miller & Washington. “People are believing the win-win scenario, which means either the recovery happens and corporate earnings really do recover and go up. Or it means the government continues to add stimulus. In short, the market doesn’t believe these are problems that a couple more trillion from the federal government can’t solve.”

The U.S. economy added 2.5 million jobs in May, the Labor Department reported Friday, a shockingly positive reading. “This will go down in history as the biggest positive data shock for the markets and the economy,” said Mohamed El-Erian in an interview on Fox News Sunday.

The employment picture continues to brighten, with as many as 400,000 people returning to work Monday in New York City, once the epicenter of the U.S. coronavirus outbreak. The city is kicking off phase one of its reopening plan by allowing nonessential retailers, construction sites and manufacturing to resume operations.

Investors are also buoyed by a drumbeat of news over companies chasing cures for the coronavirus, which has killed more than 109,000 Americans.

Many longtime Wall Street hands were caught flat-footed by the broad stock market’s steep ascent over the past month. Many had put their faith in the “stay-at-home” technology stocks such as Amazon, Netflix, Microsoft and Zoom, that have powered much of the stock market in recent years. (Amazon founder Jeff Bezos owns The Washington Post.)

Hedge fund manager Stanley Druckenmiller told CNBC in an interview Monday that he was “humbled” that his personal investments have returned a mere 3 percent over the past month while the S&P turned in a 40 percent gain.

“Well I’ve been humbled many times in my career, and I’m sure I’ll be many times in the future. And the last three weeks certainly fits that category,” Druckenmiller said.

Many sectors that people had long given up for dead have broken out from their coronavirus coma. Airlines, cruise lines, oil companies, hotels, casinos and restaurants have all popped to the upside on the belief that people will resume their pre-covid lives sooner rather than later.

The Nasdaq 100, an index of the biggest nonfinancial stocks, has hit a record on big advances by American Airlines, United Airlines, Wynn Resorts, Marriott International and Liberty Global. Aerospace giant Boeing has staged a remarkable recovery, closing up 12.30 percent Monday at $230.50 as it led the Dow. The company’s shares were selling at less than $100 in March

Investors are still concerned that a fall surge from the coronavirus could slow what many hope will be a strong second-half of the year for the U.S. economy.

Investors are waiting to hear Wednesday from the Federal Reserve, which will issue an updated policy statement and its first economic projections of 2020.

“The jobs report raised some eyebrows that a fast rebound could ultimately end the stimulus trade a lot sooner than anyone expected,” Ed Moya, an analyst with OANDA, wrote in commentary Monday. “One report however should not trigger a change with Fed guidance."

Oil prices edged downward Monday, with Brent crude, the international benchmark, trading down 1.1 percent at $41.84 a barrel. Over the weekend, OPEC and its allies agreed to extend production cuts through July to keep oil supplies from ballooning while the world gets back in motion.