When the Federal Reserve (Fed) raises interest rates, it impacts many parts of the economy, including the stock market. Shrinking the money supply helps to keep the lid on inflation, a primary concern of the Fed. It also makes it more expensive to borrow money, causing consumers and businesses to cut back on spending. This, in turn, can lead to a reduction in the valuation of companies and their stocks as their cost of doing business goes up while profits decline.
Taken together, these factors can make the stock market less attractive to investors. So when the Fed raises interest rates, most investors expect stock prices to decline. However, historical data shows a decline in stock prices during rate hike cycles to be the exception rather than the rule. In most cases both stocks and bonds perform well during the year leading up to a rate hike cycle and the year after.