Last year companies went public at a record pace. This year it seems like nobody wants to go public -- not as long as the market looks the way it does.

Investment banks are vital in helping companies go public and have seen a drastic drop in earnings after a record year in 2021. Morgan Stanley (MS 1.01%) is one company feeling the pressure, seeing its top and bottom lines shrink in its recent earnings report.

Investment banks have gotten beaten up this year, but I think they could be excellent stocks to buy in the coming months. Here's what I'm looking for to see if the worst is over for Morgan Stanley.

How Morgan Stanley makes money

Morgan Stanley provides financial services across different businesses. It manages clients' wealth and owns the E*Trade trading platform, which brings in commissions and fees.

However, its most significant business segment is institutional securities, where it provides companies with advice about going public and issuing or restructuring debt, earning fees in return. Last year, institutional securities generated 50% of Morgan Stanley's net revenue and 60% of its net income. 

Demand for investment banking has dried up

Through the first nine months of this year, investment banking activity has come to a screeching halt. According to S&P Global Market Intelligence data, the number of initial public offerings (IPOs) -- companies selling shares to the public for the first time -- was cut nearly in half. Globally, funds raised through IPOs fell by nearly 70%. 

If we focus on the U.S., the backdrop looks even worse. Since the start of the year, there have been 126 IPOs, an 81% decline from last year's record level. The total funds raised through U.S. IPOs fell by almost 92%. 

According to EY, a top accounting firm and financial services advisor, macroeconomic challenges and falling global equity prices are making many companies reluctant to go public. "Companies and investors continue to wait for a more stable and positive stock market sentiment before any sustained appetite for IPO activity reemerges," said EY Global IPO Leader Paul Go. 

Why IPOs and other deals matter for investment banks

IPOs are a significant component of investment banks' business, and when this slows, investors notice. That's because companies will pay a hefty fee to get an investment banker's expertise to help them raise money through equity or debt offerings.

Through the first three quarters of this year, Morgan Stanley's net revenue and net income were down 14% and 22%, respectively. Its investment banking revenue has plummeted, falling 49% from the same period last year. The only reason its earnings weren't worse is because of its diversified revenue streams

In the third quarter, Morgan Stanley's investment banking revenue fell 54% from last year. Its equity underwriting fees, or fees it earns from helping companies sell shares, fell 78% in the quarter compared to the previous year. Meanwhile, its advisory fees, which it makes for assisting companies with mergers and acquisitions, dropped 46% as fewer of these deals took place. 

People in a business environment shake hands at a conference table.

Image source: Getty Images.

Companies don't want to go public in an unfavorable market

Investment banking is a cyclical business that relies heavily on a stable economy and stock market. Currently, markets don't look great for a company going public or issuing debt.

Companies would rather wait it out for a better stock market than go public at a time when almost all stocks are taking a beating, particularly newly issued ones. Popular IPO stocks from the last couple of years, including Coinbase Global, Marqeta, SoFi, and Rivian Automotive, are down 80% or more from their peak prices last year.

Is the worst over for investment banks?

For investment banking to pick up, I'd like to see markets stabilize. Right now, there is a lot of volatility in the stock market because the Federal Reserve is aggressively raising interest rates to fight inflation. Investors are concerned that the Fed could push too far and cause a recession.

The worst may not be over for investment banks, especially if stock market volatility persists. I think the Fed would need to signal a stop to its aggressive rate hiking cycle for market conditions to look better for companies to go public.

Several companies, including Stripe, Klarna, Chime, and Reddit, are waiting for the right moment to do IPOs. For that reason, I think investment banks like Morgan Stanley and Goldman Sachs deserve a spot on your watch list and could become appealing "buys" when conditions improve.