What happened

Markel Corp. (MKL 0.34%) had a good year in 2022, all things considered, as the financial stock was up 6.77% last year, according to S&P Global Market Intelligence

That is far better than any of the major indexes, as the S&P 500 was down 19.4% last year, the Dow Jones Industrial Average dropped 8.8% in 2022, and the Nasdaq Composite was down 33.1% last year.

So what

Markel Corp. is often referred to as a baby Berkshire because of its similarity to the Berkshire Hathaway business model. Like Warren Buffett's company, Markel has been a steady long-term performer. In fact, Markel outperformed Berkshire Hathaway last year, as the latter returned about 4.1% in 2022.

Markel has three primary businesses, including a stock portfolio of public companies, much like Berkshire Hathaway. It also owns stakes in private investments through its Markel Ventures arm. Its largest business is insurance, as it specializes in reinsurance and specialty insurance, specifically E&S (excess and surplus) lines. 

So, what is it about Markel's business model that allowed it to outperform in a bear market? As Co-CEO Thomas Gayner said on the first-quarter earnings call, Markel is "designed to succeed even if not all three [businesses] are firing." Last year, the insurance business and Markel Ventures were both firing, with solid year-over-year revenue gains, offsetting losses in its investment portfolio. 

Through the first nine months of 2022, Markel generated an 18% year-over-year revenue increase in earned premiums in its insurance business to $5.5 billion and a 31% revenue increase in Markel Ventures to $3.5 billion, offsetting a $2.2 billion loss in the investment portfolio. The insurance business has a combined ratio of 91% through the first nine months, the same as the previous year.

Now what

Like Berkshire Hathaway, which added Markel to its investment portfolio in 2022, it should be noted, Markel is built to weather various market cycles. Over the past 10 years, it has posted an annualized return of 11.6%, which tops the S&P 500's 10.3% annualized return over that same period.

^SPX Chart

^SPX data by YCharts

It has a pretty fair valuation, with a forward price-to-earnings (P/E) ratio of 17, but it has a low PEG (P/E-to-growth) ratio of 0.93. That means it is undervalued based on its future five-year earnings potential.

Markel is one of those stocks that is just a solid long-term buy that you can count on in almost any market environment. Stay tuned for its fourth-quarter and year-end 2022 earnings report on Feb. 7.