Investors love bull markets for obvious reasons. The market is filled with optimism. Portfolios often soar. And it's easy to chase after the market's biggest winners with the hope of catching some of the gains. But you don't have to wait around for a bull market to start to benefit from the it.

Instead, you can follow in the footsteps of billionaire investor Warren Buffett and prepare before things take off. At the helm of Berkshire Hathaway, Buffett's delivered compounded annual gains of 20% over 56 years. That's compared to about 10% for the S&P 500. Right now, as the market remains in the doldrums, is actually an ideal moment to behave like this star investor. So how does Buffett get ready for the next bull market? Let's find out.

It's time to get greedy

One of Buffett's most famous quotes sums up his attitude about investing in bear and bull markets. In his 1986 letter to shareholders, he wrote, Berkshire's goal is to be "fearful when others are greedy and to be greedy only when others are fearful."

It's clear that many are fearful during bear markets. And bear markets come before the much-anticipated bull markets. Buffett prepares for better times by snapping up stocks at great valuations. He isn't intimidated by declines. And he doesn't sit around and wait to catch stocks once they're already climbing.

In the third quarter of this year, for instance, Buffett initiated three new positions. He wasn't daunted by their price declines.

JEF Chart

JEF data by YCharts

He also added to five of his positions. All of them have seen their valuations drop since the start of the year. This may have scared some investors away. But it created the perfect buying opportunity for Buffett.

CVX PE Ratio Chart

CVX PE Ratio data by YCharts

You can follow Buffett's lead by bargain hunting in today's bear market. Look for some of the same things he looks for: companies with a strong balance sheet and those that have what it takes to grow earnings over time. Buffett isn't aiming for an overnight success story. And you don't have to either.

Earnings track records and solid prospects

Today, many companies with great earnings track records and solid prospects have declined. In some cases, higher inflation and general economic woes have weighed on earnings. In other cases, they've lost ground just because of negative market sentiment. You'll find examples across industries.

Home Depot (HD -1.65%) is a great example of a bargain stock right now. The company continues to grow earnings, and demand for its home improvement products remains high. And Home Depot has managed to limit the impact of inflation. Still, the shares have dropped 18% year to date. And the stock is trading for less than 20 times forward earnings estimates.

We don't know how long the current market downturn will last. And it's impossible to predict exactly when the next bull market will emerge. But we -- and Buffett -- know one thing. Today's troubles are temporary. And history shows us that bear markets are followed by bull markets.

All of this means the opportunity to pick up stocks dirt cheap won't last forever. Now is time to follow Buffett and go bargain hunting. It's key to carefully research stocks -- and not to be won over just by a big price drop. But if you study a company and its future prospects and are willing to hold on for the long term, you could be on your way to building wealth over the long term. Just like one of our favorite billionaire investors.