Warren Buffett has done it again.

With just three weeks left in 2022, Buffett's Berkshire Hathaway (BRK.A -0.67%) (BRK.B -0.70%) is set to beat the S&P 500 by a wide margin. As you can see from the chart below, Buffett's conglomerate is in positive territory for the year, while the S&P is down nearly 20%.

BRK.B Chart

BRK.B data by YCharts

Buffett has a track record of outperforming in bear markets. He has historically employed a low-risk, value-investing mindset, finding high-quality companies that are trading at a fair value, which has paid off especially in down markets.

Not surprisingly, investors are playing close attention to Buffett's moves and studying his philosophy in this uncertain market environment. As we get set to turn the page on 2022, here are three ways you can invest like Buffett in 2023.

Berkshire Hathaway CEO Warren Buffett.

Image source: Motley Fool.

1. Be greedy when others are fearful

Buffett's best-known aphorism may also be his most useful. The Oracle of Omaha is known for advising investors to be "greedy when others are fearful, and fearful when others are greedy."

In other words, investors should be aware of market sentiment, and that the best times to buy a stock are often when it is least in favor. For newer investors, especially, it's easy to get caught up in the prevailing market trends, but the best way to find success is to go against the flow.

There's plenty of opportunity to apply that philosophy in today's market as a number of stocks have fallen sharply over the last year, especially in the tech sector, where pandemic tailwinds have faded and recessionary and inflationary headwinds have mounted.

One such stock is Shopify (SHOP -1.19%), which is down 78% from its all-time high last year even as the stock has bounced off of its lows in recent weeks.

Shopify stock may be down, but this is not a broken company by any means. It just reported 21% revenue growth in constant currency over the Black Friday/Cyber Monday weekend, and the company still dominates the e-commerce software industry, despite the challenges it's faced.

As the economy rebounds, Shopify's growth should accelerate, making it look oversold at today's prices.

2. Buy dividend stocks

It's no secret either that Warren Buffett is a fan of dividend stocks. While not all of Berkshire's holdings pay dividends, the vast majority do, including all of its top 10 holdings. Dividends give Berkshire money to reinvest in Buffett's favorite stocks and to make outright acquisitions, but there's another reason Buffett favors income stocks.

Dividend-payers tend to outperform non-dividend payers, especially in bear markets. Many dividend stocks are defensive by nature, meaning they outperform in down markets. Paying a dividend is a sign of profitability, and profitable companies tend to do a better job of withstanding recessions.

A high dividend yield also acts as a floor on the stock as yields go up as the stock price falls.

One intriguing dividend stock is Camping World Holdings (CWH -3.49%), the leading retailer of RVs. Camping World now sports an extremely high dividend yield of 10.4%, and its payout looks well funded. Investors may be skeptical of the business as RV sales tend to be highly cyclical, meaning sales could tumble in a recession. But if the downturn is mild and Camping World skates through, investors are likely to be rewarded with both a fat dividend yield and appreciation in the stock price as the economy turns around.

3. Don't time the market

Buffett thinks it's impossible to consistently time the market, and it's useless to try. In fact, he has been adamant about not having an opinion about the market and other macroeconomic factors.

The Berkshire chief once said, "Charlie and I never have an opinion about the market because it wouldn't be any good and it might interfere with the opinions we have that are good," referring to Charlie Munger, Berkshire's vice chairman. Buffett has made similar comments about interest rates as well.

His point is that success in investing doesn't come from making accurate predictions about the direction of the market. It means buying high-quality stocks that are trading below intrinsic value, and the quote above shows that Buffett would prefer to spend his time making those decisions and analyzing businesses, rather than predicting the direction of the market.

Of course, every investor would like to get in at the absolute bottom, but that's not possible. You're better off dollar-cost averaging into your stocks, buying a bit at a time or at a regular interval.

While no one knows what the stock market will do in 2023, applying Buffett's principles should help you find success. Buy stocks that are oversold on irrational fear, add a few dividend payers, and invest steadily, rather than trying to time the market.