Stock market optimism is so yesterday.

Wall Street suffered a brutal morning Wednesday after the yield on the 10-year Treasury note briefly dipped below the yield of the 2-year note — the first time it’s done so since 2005. So-called yield curve inversions have historically been a sign that a recession is on the horizon but the timing hasn’t always been clear.

But recession worries were enough to send the Dow Jones Industrial Average down more than 650 points — or, 2.5 percent — on the move in yields. Both the S&P 500 and Nasdaq were also off more than 2.5 percent.

“The yield curves are all crying timber that a recession is almost a reality and investors are tripping over themselves to get out of the way as economic recession hurts corporate earnings and stocks can drop as much as 20 percent,” Chris Rupkey, chief financial economist at MUFG Union Bank, said in a note Wednesday.

Wednesday’s drop comes after markets rallied Tuesday on the sudden decision by the Trump Administration to delay tariffs on cell phones, laptops and other gift items to support a healthy holiday shopping season.

“We’re doing this for the Christmas season,” Trump told reporters on Tuesday, referring to the three month delay on tariffs that were supposed to take effect Sept. 1.

But while the stock market rallied Tuesday, bonds were still under pressure and the stock market was quick to revert to its volatile trend.

“After the one-day upside wonders, the dominant trend then re-asserts itself as we are seeing today,” Donald Selkin, chief market strategist at Newbridge Securities, told The Post.

Still, others cautioned that while the inverted yield curve almost always comes ahead of a recession, it doesn’t say how soon an economic downturn is.

“The yield curve inverting is a worrisome sign, but don’t forget it isn’t the best timing signal, as a recession doesn’t start for an average of 21 months after the initial inversion,” Ryan Detrick, Senior Market Strategist for LPL Financial, said in a note.

“Given the continued strong employment picture and healthy US consumer, there could still be time for this economic cycle to have plenty of life left,” Detrick added.