Wall Street was a bloodbath Wednesday with the Dow Jones Industrial Average suffering its worst day of the year after investors freaked out over a geeky signal that a recession may be on the horizon.

Triggering the sell-off was the yield on the 10-year Treasury note dipping below the yield on the 2-year note. Such yield curve inversions have predicted all seven of the recessions that occurred over the last 50 years.

It was the first time the yield curve inversion happened since 2007 — just ahead of the Great Recession.

The rare sighting sent the Dow Jones Industrial Average into a tailspin,. The blue chip benchmark closed the day down 800.49 points — or 3.1 percent — to close at 25,479.42 — its worst day of 2019.

Both the S&P 500 and Nasdaq joined in Wednesday’s sell-off, falling 2.9 percent and 3.0 percent, respectively.

“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 Wednesday.

Of course, inverted yield curves aren’t a crystal ball formula for forecasting a downturn. While they have preceded all seven recessions of the last 50 years, they don’t indicate when a downturn strike or how deep it will be. The 2007 Great Recession, for example, was proceeded by an inverted yield curve two years before — in 2005.

And there has been at least one “false positive” — although it occurred in the mid-1960s before the last seven recessions, the first of which occurred in 1969, according to a Wells Fargo report released in April.

“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.

President Trump took to Twitter Wednesday to blame Federal Reserve chief Jerome Powell for the “crazy inverted yield curve,” saying the Fed needs to cut interest rates to spur borrowing.

“Our problem is with the Fed. Raised too much & too fast. Now too slow to cut…Spread is way too much as other countries say THANK YOU to clueless Jay Powell and the Federal Reserve,” Trump said in a series of tweets, bemoaning the “CRAZY INVERTED YIELD CURVE!”

The President’s trade war with China has been weighing on stocks in recent weeks, but the market rallied Tuesday after the Trump Administration delayed tariffs on cell phones, laptops and other gift items to support a healthy holiday shopping season.

Bonds have been under pressure, however, as risk-adverse investors have fled to them for safety — driving down yields.

“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.