With a little more than a month left in the year, Berkshire Hathaway (BRK.A 0.32%) (BRK.B -0.06%), the large conglomerate run by legendary investor Warren Buffett, looks to put the final touches on what could be a big win over the S&P 500, a broader benchmark for the market.

Berkshire's stock is up more than 3% this year, as of this writing, while the S&P 500 is down more than 17%. Winning this year would get Berkshire back on a two-year winning streak over the S&P 500, and Berkshire has regularly outperformed the market since 1965.

Will the Oracle of Omaha and Berkshire be able to continue this streak in 2023? Let's take a look.

Why Berkshire is winning

Berkshire eked out a small gain over the market in 2021, a year in which tech absolutely exploded. Berkshire did well because of the many stocks it owns in its large equities portfolio, including Apple, and strong performances in other businesses it operates.

Warren Buffett.

Image source: Motley Fool.

But when inflation came on strong in 2022 and the Federal Reserve had to quickly and intensely raise interest rates, investors ditched tech in a hurry. The Nasdaq Composite is down close to 30% this year. Investors flocked to safety, and Berkshire is certainly a name with a strong balance sheet and an incredibly experienced management team that is battle-tested.

Berkshire also operates several large businesses in sectors that performed well this year, such as energy and insurance. The company can also hedge rising interest rates to a certain extent because it has roughly $95 billion of U.S. Treasury bills and other fixed-income maturities, which saw their yields rise and resulted in increased investment income at the company.

What will 2023 come down to?

Obviously, there is still a lot of uncertainty about what will happen in 2023. Will there be a recession? Will there be a deep recession? Is the Fed almost done with its rate increases? Will inflation prove stickier than anticipated, forcing the Fed to stay hawkish?

It's a lot to try to figure out. The S&P 500 is full of a lot of big tech stocks that were really hammered this year, so if the Fed does indeed slow and eventually stop raising rates, then tech stocks may be able to rebound quickly.

It will also depend on whether there will be a recession next year and how significant said recession might be. Slower rate increases and an eventual stoppage, coupled with either no recession or a modest one, could give the edge to the S&P 500. Berkshire also benefits from a rise in the tech sector, but perhaps not as much as the broader market.

Then, of course, if there's a more significant recession and rate increases end up being larger than the market is currently expecting, I'd probably give the edge to Berkshire as a safe haven. The company has more than $105 billion of cash and cash equivalents and is prepared to weather the storm.

Here's what I'm picking

Ultimately, I like Berkshire in 2023, and not necessarily because I think it will definitely beat the market. Rather, I think Berkshire is better prepared to deal with a range of scenarios given the uncertainty in the air.

Even if conditions end up favoring tech, Berkshire could still do well. Furthermore, while the company currently trades at roughly 1.5 times its book value, toward the higher end of where it has traded historically, this doesn't strike me as a particularly demanding valuation when you consider its performance and its continued strong cash position.