The stock market does not directly influence rates, but is a very good indicator on where rates may be going. I have mentioned in the past that bad news in the economy normally means rates will be decreasing. This is not always true, but most of the time it is.
How the stock markets play a role in how much discretionary income investors have. When markets are going up, some investors feel more comfortable pulling money out of stocks to be used elsewhere, or selling high.
Many investors diversify their investments by moving money into bonds that are considered a safer investment with guaranteed rates of return.
The bond market has a significant influence on mortgage rates. Mortgage lenders create mortgage-backed securities by packaging groups of loans together. These are then sold to investors on bond markets.
The bond market is strongest when a lot of money is flowing in; this drives interest rates lower. When lenders are paying lower interest rates to bond buyers, lenders can offer lower interest rates to home buyers.
Another correlation between stock markets, bond markets and mortgage rates. Another time that money moves from stock markets to bond markets is when fear grips the economy. This is a better measure than money moving for diversification, but diversification is also closely linked to economic fears.
Fear drives more money into government-backed bonds than into mortgage-backed bonds.
Still, the bottom line is that when money flows into bonds, interest rates can be expected to go down.
So, bad headline news and bad economic news leads to lower interest rates because more money is available to borrow.