The shape of the yield curve used to be a pretty good economic forecaster.

In the past, when the yield on 10-year treasuries dipped below short-term rates, a recession beckoned. But that all changed during the recent credit boom.

The yield curve inverted two years ago, but that didn’t matter too much while hedge funds could borrow in yen and leverage risk spreads. That’s no longer possible.

Now a flattening yield curve is likely to be far more restrictive.

Banks, hedge funds and other more recondite credit providers, such as mortgage REITs (real estate investment trusts) and structured investment vehicles, are engaged in the same activity. They all borrow short and lend long. The wider the spread between long- and short-term rates, the greater are the potential profits.

When the incentive to provide credit is strong, the economy prospers. This also works in reverse. Lending is less remunerative when the yield curve is flat. When the curve flattens, credit growth slows.

After a series of Fed rate hikes, the yield curve inverted a couple of years ago. At the time, many economists predicted an imminent recession. They were wrong.

Hedge funds and others turned to borrowing in yen to finance their loans. There was also a profit to be made from the higher rates on mortgage securities, leveraged loans, CDOs and myriad other risky securities. When liquidity was abundant, these returns could be enhanced by piling on debt. As a result, the credit bubble continued to inflate into 2006 and beyond.

The recent turmoil in the markets largely reflects an unwinding of this massive carry trade. The collapse of two Bear Stearns hedge funds showed that leveraging credit spreads could be a risky business.

The sharp rise in the yen has made it dangerous to seek cheap funding in Tokyo. All this means that lenders are likely to pay more attention to the gap between short and long-term rates on risk-free government bonds.

As of Friday, three-month treasury bills yielded 4.74%, which is just 1 basis point less than 10-year treasuries. How about leveraging that spread?