One reason the yield curve also works as a recession indicator is because the Fed is so bad at sticking the landing. Almost every hiking cycle in living memory has ended up causing a recession. On the other hand, if you sold stocks every time the Fed started hiking, you’d miss out on years of growth. As the chart below shows, it’s when the Fed ends hiking that growth stops.