There were a lot more tricks than treats for investors this October as the market suffered its worst month since 2011.

The S&P 500 plunged 6.9 percent in October as investors were spooked by tariffs, geopolitical uncertainty and a lack of love for tech. It was the index’s worst month since September 2011 and the worst October since the 2008 financial crisis, when the index plunged 16.9 percent.

“October is living up to its rep,” Howard Silverblatt, S&P Dow Jones indexes senior index analyst, told The Post.

The month is notorious for volatility dating back to the crash of 1929, Black Monday in 1987 and the sell-off during the 2008 financial crisis.

This time, worries of a global slowdown and renewed tariff tensions were the catalysts that had investors rushing toward the exits.

“People were looking for an excuse to sell, and tariffs made a great excuse,” said Brian Belski, chief investment strategist at BMO Capital Markets.

For all the fear over the last few weeks, analysts noted that the fundamentals of the economy and market remain strong. Unemployment is low, confidence is at an 18-year high and nearly 80 percent of companies that reported earnings so far this quarter beat expectations.

“The fundamentals are good. Balance sheets are good,” Silverblatt said. “What we’re seeing is profit-taking and reallocations.”

Tech stocks were among the hardest hit in October’s bloodbath as the so-called FAANG stocks — consisting of Facebook, Apple, Amazon, Netflix and Google parent Alphabet — lost their bite.

Amazon was the worst hit in the group, shedding 20.2 percent in October as investors worried about weaker-than-expected holiday projections. Netflix was the next laggard, plunging 19.3 percent for the month due to its cash burn.

But the battered tech stocks — which had been high performers for much of the year — may be a sign that the bloodletting in equities will soon stop.

“When you take out leaders, you know you’re getting close to bottom,” Belski said.