Over the past year or more, the markets have been highly volatile. Some sectors that were hot last year, like technology, have cooled off in 2021, while sectors that were stone cold during the pandemic, like financials, have caught fire this year.

Short-term volatility can be nerve-wracking for investors, which is one of the reasons why an investor's focus should be on a long term. Ideally, you want good companies that are built to weather the ups and downs and produce consistent and relatively safe returns over three to five years or more. One good stock to own for the long run is Goldman Sachs (GS 0.03%).

A person who has multiple laptops, a phone, and computer screens up, doing research.

Image source: Getty Images.

Record-breaking performance

Goldman Sachs is known primarily as an investment bank, the second-largest in the world. But investment banking is only its second-biggest business; first is global markets, which is the institutional trading arm. After those two come asset management and consumer banking and wealth management.

The company is among the market leaders in investment banking and global markets. They both drove Goldman Sachs to a fantastic 2020 as the company had the most announced and completed mergers and acquisitions (M&A) of any firm in 2020, as well as record equity underwriting and the second-highest level ever of debt underwriting. As a result, in a down year for most financial companies, Goldman Sachs' stock price was up 17% in 2020.

The first quarter of 2021 was even better as Goldman Sachs had a record $17.7 billion in revenue, more than twice the revenue total from the first quarter of 2020. Net income was $6.8 billion, or $18.60 per share, also a record.

Investment banking generated $3.8 billion in revenue in the quarter, a record, led by the best quarter ever for equity underwriting. It remained No. 1 worldwide in announced and completed M&A for the quarter. Also, global markets took in $7.6 billion in revenue in the quarter, a 47% year over year increase driven by market volatility, which led to increased client activity. Global markets revenue was the most in a quarter since 2010.

These two markets tend to be cyclical, but as one of the largest players in both, Goldman Sachs performs great when they are hot, but still relatively well even in down markets. But with a record backlog and M&A activity heating up, there are no signs of things slowing down in the investment banking business over the next 12 to 18 months.

All signs say go

Goldman Sachs, under CEO David Solomon, has made it a goal to diversify the revenue stream beyond investment banking and global markets. There has indeed been progress, as the asset management business generated a record $4.6 billion in revenue in the quarter, while consumer banking and wealth management also had a record quarter with $1.7 billion in revenue.

Both of these businesses should see continued growth as the GDP is expected to grow the next two years at least, which is good for the markets these two businesses are in. Solomon said last fall that Goldman Sachs was interested in a potential acquisition in the asset management space to gain scale in a consolidating industry, and his firm has been linked to several different targets.

Also, its digital bank, Marcus, has shown growth and it recently expanded its offering with Marcus Invest, which gives Marcus customers access to investments with as little as a $1,000 investment. Next, it plans to roll out digital checking for Marcus, officials said on the first-quarter earnings call

With its market-leading strength, plans to grow its other businesses, and favorable market conditions ahead, Goldman Sachs is in a good position for long-term growth. Its financials are in great shape with an annualized return on tangible common equity of 32.9%, a 44% operating margin, and over $34 billion in operating cash flow. And its valuation remains relatively cheap, with a low price-to-earnings ratio of around 9 and a price-to-book ratio of 1.4.

All signs point to go with Goldman Sachs, not just this year (although it is up 41% year to date at Wednesday's prices), but for the long term.