What are some good stocks to buy for the new year? You might want to take a look at some of the stocks Warren Buffett has bought for Berkshire Hathaway's (BRK.A 1.18%) (BRK.B 1.30%) portfolio. When one of the greatest investors of all time likes certain stocks, those companies are worth checking out.

Buffett has bought 19 stocks in 2022, including buying back shares of Berkshire Hathaway. These three are the best bets for 2023, in my view.

1. Occidental Petroleum

I expect that oil stocks will perform well in 2023, just as they have this year. Occidental Petroleum (OXY 0.89%) stands out as one that Buffett seems to think will keep up its winning ways. He has built a big position in the oil and gas producer and continued buying Occidental shares in the third quarter of 2022.

If oil prices rise, Occidental stock should rise as well. The U.S. Energy Information Administration projects that Brent crude prices will average $92 per barrel next year. That's roughly 15% higher than the current Brent price.

But there's another potential tailwind Occidental investors shouldn't ignore. Buffett seems very likely to continue aggressively buying the stock. In August, Berkshire obtained regulatory approval to acquire up to 50% of Occidental. The giant conglomerate's stake in Oxy currently stands at 21.4%. The more Berkshire adds to its position in the oil stock, the more it's likely to rise.

Even if these factors don't provide catalysts for Occidental next year, the stock could still deliver solid gains over the long run. The company is making a big bet on carbon capture and storage, a market the company believes will be a multitrillion-dollar opportunity down the road.

2. McKesson

When Berkshire first revealed that it had initiated a new position in McKesson (MCK 1.16%), in the first quarter, I thought it was a great pick. McKesson certainly has performed well for Buffett, soaring more than 50% this year (and with a big chunk of its gains coming after the first quarter).

I think McKesson is still a good stock -- the factors behind the strong performance in 2022 should carry over into 2023.

In particular, the demand for the healthcare services that McKesson provides isn't likely to be hurt by macroeconomic headwinds. CEO Brian Tyler noted in the latest quarterly conference call that the company hasn't been affected all that much by the economic challenges. He added that "this is similar to what we have observed in past economic cycles."

As a result of this resilience, McKesson is viewed as a safe-haven stock by many investors. With the probability of a recession in 2023 quite high, my view is that the stock will continue to attract investors' money because of its stability and solid growth prospects.

3. Markel

I nearly went with Berkshire Hathaway itself as my third pick among the stocks Buffett has bought this year. Instead, I chose the "Baby Berkshire" -- Markel (MKL 1.43%).

The parallels between Markel and Berkshire are striking. Both have strong core insurance businesses. Both offer diversification and invest heavily in other businesses. Both are run by management with long-term mindsets. 

So why did I go with Markel over Berkshire? For one thing, its valuation is more attractive. Markel stock has also fared slightly better than Berkshire this year while the overall market experienced turmoil.

I also think it's possible that we could see a stock market rebound later next year. Markel is much smaller than Berkshire. Wall Street thinks it has greater growth prospects over the next five years. My hunch is that if and when the market bounces back, Markel will be a Buffett stock you'll really want to own.