In the Treasury market, shorter-term interest rates this week started to move above some longer-term rates.

That can be an early warning sign of a recession, as it was in 1990, 2001 and 2007, according to a study by Bespoke. The firm said that kind of bond market move may indicate that some of the more widely watched spreads could also soon flip, or invert, a precursor to a recession.

The 3-year Treasury yield Monday moved above the 5-year yield, and it was soon followed by the 2-year. The market most closely watches the spread between the 2-year and 10-year, as well as 3-month to 10-year spread, which is the one preferred by the Fed.

Source: Bespoke

Bespoke said in the last three recessions, the first inversion — between the 3-year and the 5-year came an average 26.3 months before the start of a recession, with a range between 17 and 38 months. In all three cases, the 3-month to 10-year yield curve inverted for the first time an average 89 days later, or between 19 and 173 days.

The 2-year yield Tuesday was just about 13 basis points away from the 10-year yield, while the 3-month yield was about 55 basis points from the 10-year. Bespoke noted that a move to inversion on the latter would require either a significant rally in the 10-year, or two more rate hikes from the Fed.

Paul Hickey, co-founder of Bespoke, said when the spread on the 3-month to 10-year is between 50 and 100 basis points, the stock market tends to perform well.

Source: Bespoke

"The flatter it gets, the worse it is for the market. Even worse for the market is when it's below 50 and already inverted," he said.

"When you get the worse performance is after it inverts and gets positive again, and that's when you really see the market weaken," Hickey said.