Berkshire Hathaway (BRK.A 0.99%) (BRK.B 0.91%) stock hit a new all-time high on Thursday as investors flocked toward tried-and-true businesses that make money and have resistance to inflation and other market headwinds. Value investing is back in style, and that bodes well for Warren Buffett's investments. But value investing has been largely out of favor for several years.

Before this year, the Nasdaq Composite routinely crushed the S&P 500 and the Dow Jones Industrial Average. And that made Buffett's more traditional investing approach look less attractive than riskier growth-oriented strategies.

Here's why Berkshire Hathaway's business is doing so well and some lessons you can learn from Buffett's success.

Berkshire Hathaway CEO, Warren Buffett.

Image source: Getty Images.

The resurgence of value stocks

Between 1965 and 2021, Berkshire Hathaway produced an annual gain of 20.1% compared to the S&P 500 (with dividends) gain of 10.5%. Put another way, one dollar invested in the S&P 500 in 1964 would have turned into $30,209 by the end of 2021. But one dollar invested in Berkshire in 1964 would be worth $3.64 million.

The problem is that a lot of Berkshire's gains came early into the company's existence. And in fact, Berkshire Hathaway has underperformed the S&P 500 since the financial crisis. The chart below shows the performance of the S&P 500, including dividends, compared to Berkshire in the 13-year period from 2009 till the end of 2021.

BRK.B Total Return Level Chart

BRK.B Total Return Level data by YCharts.

The underperformance is largely due to massive marketwide gains from 2019 to the end of 2021 that were largely driven by tech stocks that Berkshire doesn't own. For example, Berkshire returned just an 11% gain in 2019 compared to 31.5% for the S&P 500 and a 2.4% gain in 2020 compared to 18.4% for the S&P 500. 

However, if we look at the 10-year chart, we'll see that Berkshire beat the market over that time frame -- not to mention it is crushing the market so far in 2022.

BRK.B Total Return Level Chart

BRK.B Total Return Level data by YCharts.

As of the time of this writing, Berkshire holds 907.6 million shares of Apple (AAPL 0.51%) stock, which is 45% of its public equity portfolio and worth $158 billion. Apple stock's strong performance has been a major factor in Berkshire keeping somewhat up with the broader indexes even as many of its other stocks have underperformed. But in 2022, Apple stock is down. And a big reason Berkshire stock is beating the market is due to strong performances from its consumer staple stocks, financial stocks, energy stocks, and industrial and material stocks that make up a big portion of its portfolio

Strong performances from other business units

Berkshire Hathaway gets a lot of attention for the stocks it owns. But as of March 24, the value of all of those public equity holdings is just $352.1 billion compared to Berkshire's total market cap of $778.3 billion. 

The majority of Berkshire Hathaway's value comes from its insurance, manufacturing, railroad, energy, and services businesses, as well as the value of the assets and real estate that these businesses own.

To get a better idea of Berkshire Hathaway's 2022 earnings, consider the following table:

Segment

2021 Net Earnings

Insurance-underwriting

$0.728 billion

Insurance – investment income

$4.087 billion

Railroads

$5.99 billion

Utilities and energy

$3.495 billion

Manufacturing, services, and retailing

$11.12 billion

Investment and derivative gains/losses

$62.34 billion

Other

$1.315 billion

Total net earnings attributable to Berkshire Hathaway shareholders

$89.795 billion

Data source: Berkshire Hathaway. 

Due to a great year in the stock market, Berkshire Hathaway made the majority of its earnings from its investment and derivative gains, which totaled 69% of total earnings, while 31% of total earnings came from its core business units.

Staying patient and keeping a sizable cash position

In 2021, Berkshire Hathaway retained a massive cash position and bought back a ton of its own stock. In hindsight, it was a brilliant strategy, given Berkshire Hathaway stock is now at its all-time high. The chart below shows how much cash and cash equivalents Berkshire ended 2021 with on its balance sheet -- and that's after buying back $27 billion in stock. Both its cash position and its stock buybacks were record highs for the company.

BRK.A Cash and Equivalents (Annual) Chart

BRK.A Cash and Equivalents (Annual) data by YCharts.

While growth stocks and cryptocurrency soared, Buffett kept his cool and exhibited his timeless lesson to "be fearful when others are greedy and greedy when others are fearful" by keeping a large cash position and not buying expensive stocks. Instead, he bought back his own stock, which he viewed as inexpensive, effectively doubling down on his best ideas. The large cash position allowed Berkshire to be able to buy quality businesses at good prices -- as evidenced by Berkshire's recent acquisition of Alleghany.

Tying it all together

Berkshire Hathaway's performance illustrates the power of a diversified portfolio that can capture upside from different sectors as well as limit downside risk. Apple stock was a bold bet for Buffett, who historically has avoided tech stocks. But the business makes sense, is relatively easy to understand, and isn't overvalued.

Today, value stocks and Buffett's other investments are working well in the short term. Not all of Berkshire's business units or stocks that it owns will work well all the time. Rather, it's all about understanding what you own and why you own it and sticking to your long-term investment thesis.