It's been a humbling year for the stock market. As of July 12, the three major indexes -- the S&P 500, Nasdaq Composite, and Dow Jones -- are down over 20%, 28%, and 15%, respectively. Bear markets are not new to Wall Street; they've happened in the past, and you can bet they'll continue to occur in the future.

However, as an investor, the one thing you don't want to do during bear markets is panic. Instead, use this time to your advantage. Here's how I'm preparing for better days in the stock market.

Someone smiling while holding a phone.

image source: Getty Images.

Going discount shopping

If you believe in the long-term potential of a stock, you shouldn't be deterred by short-term price drops. If anything, you can view this as a chance to grab some of your favorite investments at a discount, and potentially lower your cost basis. The cost basis is the average price you've paid per share of a particular stock, and it eventually determines how much you profit (or lose) from selling. If you bought 10 shares at $100, 10 shares at $150, and 10 shares at $200, your cost basis would be $150.

When you invest in a particular stock, you should be prepared to hold it for the long haul. Warren Buffett once said, "If you aren't willing to own a stock for 10  years, don't even think about owning it for 10 minutes."

With this in mind, if you had invested in a stock while it was at $200, seeing it at $150 should be bargain time for you -- especially if nothing fundamentally changed about the business. Value investing involves finding stocks trading lower than their intrinsic value, and bear markets present a great opportunity to do just that.

Increasing my positions in the major indexes

The one thing you don't want to do during bear markets is stop investing, because it usually ends up being counterproductive. Rather, you should be investing in the broader market as a whole instead of focusing on single companies that might not be able to weather the storm and see brighter days. Although specific companies might not survive tough economic times and market downturns, the stock market as a whole (usually measured using the major indexes) has historically bounced back from bear markets. 

In the past few decades alone, the three major indexes have survived some of the most trying economic conditions in U.S. history. They've bounced back from Black Monday (1987), the dot-com bubble collapse (late 1990s), the Great Recession (2008-2009), and the pandemic (2020-2021), and there's no reason to think they won't recover from the current bear market.

Diversification is one of the key pillars of investing, and it becomes even more important during down periods. You never want your portfolio's success (or failure) to rely on too few companies; instead, put your money in the broader stock market and trust that there's sunshine after the rain.