This is the reason why the relationship between stocks and bonds can give indication about the market sentiment and especially market sentiment changes.
The chart below shows SPY with the 20+ year treasury bonds TLT. Below the chart the correlation coefficient shows that stocks and bonds most of the times are negatively correlated. As you can see the smart money started to rotate money out of stocks into bonds ahead of a possible market correction. This gives a higher probability that a market correction will happen in the near future.