Last year was a good one for banks, including two of the largest in the country: Bank of America (BAC 0.22%) and Goldman Sachs (GS 1.82%). Both of these behemoths put up market-beating numbers as Bank of America's stock returned 42.9% in 2019, while Goldman Sachs was not far behind with a return of 37.6% last year. 

Both of these companies bested the S&P 500 and the average return in the financial sector. It's doubtful that these two stocks will see that type of growth in 2020, but they should both be solid performers.

Conditions remain pretty favorable for bank stocks with stable interest rates, a friendly regulatory environment, increased mergers and acquisition activity, solid consumer spending trends, a detente in the U.S.-China trade war, and a still growing economy. 

But beyond the macro environment, there are key details and differences between these two that investors should understand when determining which is a better buy

Bank of America tower

IMAGE SOURCE: GETTY IMAGES.

Different models

Bank of America and Goldman Sachs have one big thing in common: their size. They are two the biggest banks in the country. Bank of America has about $2.4 trillion in assets under management while Goldman Sachs has about $1 trillion.

But they make their money in different ways. Bank of America is more focused on consumer banking and lending, while Goldman Sachs has long been more focused on non-consumer operations.  

Goldman Sachs gets about 40% of its revenue from institutional client services, which largely involves conducting trades for big financial institutions. It also generates about 20% each in investment banking and investment management. The other 20% of revenues comes from lending to corporations and consumers and investing.

By contrast, Bank of America generates most of its revenue, about 42%, in the consumer banking space from traditional banking and lending. Another 22% comes from global banking, while roughly 21% of revenue is from wealth and investment management.  Goldman Sachs' bread-and-butter, institutional services or as Bank of America calls it, global markets, makes up just 16% of revenues.

Both companies remain good investment options, but Goldman Sachs may provide investors with greater longer-term upside. Here's why.

Goldman transformation

Though it's very early in the year, Goldman Sachs has been the better performer so far -- up nearly 8% year-to-date -- while Bank of America is up about 1%.

Goldman Sachs has gotten a boost in recent weeks with some analyst upgrades, citing the transformation it is undergoing under the leadership of CEO David Solomon.

Solomon is working to pivot the company from its institutional roots toward more consumer-oriented banking, through some innovative new revenue streams like its digital banking platform, Marcus, and its new Apple Card, a digital credit card created by Apple and issued by Goldman Sachs. It is the company's first credit card.

The transformation is reflected in how Goldman Sachs has rearranged its business segments. Instead of investing and lending, investment banking, institutional client services, and investment management, the new business segments (as of Jan. 7) are investment banking, global markets, asset management, and consumer and wealth management. Officials said this better represents how the firm is now managed, and will drive greater accountability.

The bottom line is, both companies are attractively valued with low P/E ratios and are well-managed. Bank of America should continue to provide solid, steady returns for investors, but Goldman Sachs could prove to have longer-term growth potential as it carves out a new path forward.