This past year has really brought home the need for a diversified portfolio. After the market crashed last spring, it was brought back by tech and growth stocks whose valuations soared. Now, as we begin to emerge from the pandemic, value stocks are outperforming growth stocks.

What this tells you is that portfolio diversification is your friend, especially in these volatile markets. It also tells you that if you don't have any good value stocks in your portfolio, you should consider adding some. One great option is Goldman Sachs (GS 3.30%), which is up 23% year to date. Here's a look at why this might be the value stock for you.

Woman looking thoughtful

Image source: Getty Images.

Big bank theory

Goldman Sachs, one of the nation's largest investment banks, is unlike most of its banking peers in that it didn't take a major hit last year during the pandemic. In fact, its stock price was up 20% in 2020, a year when most banks were in negative territory. It continued to post strong gains right through the downturn. The company saw earnings per share rise 17.6% to $24.74 for the year, while revenue was up 22% to $44.5 billion.

There are a few reasons why Goldman Sachs outperformed last year. One is that it didn't have to set aside a huge amount of money for anticipated credit losses, as its consumer banking division is much smaller than its major rivals, like Bank of America. Goldman Sachs set aside about $3 billion for the year, while Bank of America allocated $11 billion.

Beyond that, Goldman Sachs had a big year in two of its other business lines -- investment banking and global markets, which is its institutional trading arm. The investment banking business had a strong year, with the most mergers and acquisitions (M&A) deals of any U.S. firm, along with a record level of equity underwriting and near-record revenue in debt underwriting. The global markets arm saw a 43% increase in revenue to $21.2 billion -- its highest total in 10 years. This came primarily from the volatility and high trade volume in the equity markets.

Even its smallest businesses -- asset management and consumer and wealth management -- saw revenue growth. The consumer banking division also saw gains for the year, driven by 62% deposit growth on its Marcus digital banking platform and higher credit balances on its first-ever credit card, the Apple Card. Furthermore, Goldman Sachs also launched a transaction banking business in 2020, providing banking services to corporations and financial institutions. This should continue to diversify its revenue stream.

A great value

For all its growth, Goldman Sachs is still a great value stock. It was up over 20% last year and is up 23% year to date as of April 5, yet it is still undervalued. It has a price-to-earnings (P/E) ratio of 13.2 and a forward P/E ratio of 11 based on its projected earnings for the next 12 months. It also has a price-to-book ratio of 1.32, which means its price is relatively low compared to its assets on the books.

What this means is that Goldman Sachs should have a long run still ahead of it. In the fourth-quarter earnings report, officials said the firm came into the year with a near-record backlog of investment banking deals. On top of that, 2021 is poised to be a huge year for M&A activity, as the first quarter set a record for global M&A deals. As the leader in this space, Goldman Sachs should benefit greatly, and it has been selected to handle one of the biggest IPOs of the year, Robinhood.

As we emerge from the recession, Goldman Sachs will be well-positioned for both near-term and long-term growth. It has market-leading positions in two of its business lines and growth expectations in its asset management and consumer and wealth management segments. It also has lots of cash -- about $156 billion, up from $133 billion at the end of 2019 -- and a solid return on equity of about 11%. With its low valuation and excellent earnings potential, Goldman Sachs is a value stock to consider.