Investment bank and wealth management firm Morgan Stanley (MS -1.81%) actually fared pretty well this year when you consider the carnage in the market.

The stock price is down roughly 15% compared to the broader market's decline of more than 20% and the SPDR S&P Regional Banking ETF's nearly 21% decline. Investment banking has really been a struggle for the entire industry and difficult market conditions challenged the bank's investment management business.

But the bank continues to perform well in the down market and shows that it could be a very good stock to buy in 2023 for the long term.

Morgan Stanley has room for growth 

Through the first nine months of the year, Morgan Stanley generated a 16.6% return on tangible common equity (ROTCE), which is down from last year but still quite healthy when you think about the difficult year for some of its business lines.

Person smiling while at a desk.

Image source: Getty Images.

For instance, investment banking across the industry struggled due to the volatile market conditions and lower public and private valuations, which resulted in less underwriting activity for events such as initial public offerings. Total investment banking revenue at Morgan Stanley is down almost 50% through the first three quarters of the year compared to the same period in 2021. The good news is dealmaking is expected to bounce back next year, albeit slowly, as the Federal Reserve winds down its expected interest rate hikes.

Investment management revenue through the first three quarters of 2022 is also down 12% year over year, due to lower asset values, which brings down fees, and higher outflows as difficult market conditions led investors to place funds elsewhere.

But on the plus side, trading revenue fared very well. Equity trading revenue is flat year over year through the first nine months of the year, which is a good comparison to the strong year in 2021. Fixed-income trading revenue has surged 21% year over year.

Meanwhile, the company's wealth management division, which includes asset management, only saw revenue drop by 1% through the first three quarters thanks to rising interest rates. While lower asset values started to lead to lower asset management revenue, rising rates and higher loan balances boosted interest income on those loans.

The division also brought in nearly $65 billion of net new assets in the third quarter. While that's down considerably year over year, CFO Sharon Yeshaya said in the Q3 earnings call that it's quite remarkable in these choppy market conditions.

Morgan Stanley is well positioned for a challenging environment

Many experts and economists think 2023 could be a challenging year, which isn't always so great for banks because it can lead to outsize loan losses, which hurt earnings.

But less than 20% of Morgan Stanley's total assets are in loans and the bank has way more deposits than loans, which means plenty of liquidity. Morgan Stanley also has very healthy levels of regulatory capital with a common equity tier 1 (CET1) capital ratio -- which looks at a bank's core capital expressed as a percentage of risk-weighted assets -- of 14.8%. That's 1.5% above its regulatory requirement.

This allowed the bank to continue repurchasing shares this year, even as many of its peers had to slow or even temporarily pause repurchases due to regulatory capital requirements. With a dividend yield of almost 3.5% shareholders are also well compensated during times when the stock is in decline.

A more durable business

Several years ago, Morgan Stanley set out to create a more durable stream of earnings by bolstering its wealth management division. It achieved this through key acquisitions of E*Trade and Eaton Vance, which increased its earnings capacity.

The bank also continues to be a leader in trading and investment banking, businesses that will continue to perform well in the right environment.

Excess capital also enabled the bank to return plenty of capital to shareholders. I do not see its less than 13 times forward earnings as a demanding valuation long-term even if earnings don't perform as expected next year, which will be dependent on how the economy holds up.