One wonders about the extent to which this correlation is a self-fulfilling prophesy. If everyone gets skittish when indicators look too good and reduce investment, they end up causing the recession that they predict!
An inverted yield curve isn't a random indicator to look for to bet on a recession... rather, it is a sign that the market has bet on a recession. Whether or not the market betting on a recession causes a recession is another question, but it is the skittishness that causes the indicator - so any time you see an inverted yield curve, investors have already become skittish and reduced investment targeted at certain dates.