This year's slump in stocks was brought on by a few things, two of which have been sky-high inflationand fading global economic forecasts for the remainder of 2022 and 2023. The two are not mutually exclusive, though. Federal Reserve Chairman Jerome Powell has signaled that the Fed will be raising interest rates throughout the year to cool consumer demand.

The Federal Reserve has implemented interest rate hikes designed to rein in economic growth, partly explaining the muted macroeconomic forecasts. Not by design, however, is the record high inflation that countries around the globe are experiencing. Though inflation softened a bit in July, it has been persistently high this year, which could explain the rest of the pessimistic forecasts.

A toy bear and bull standing on a paper with a bar chart.

Image source: Getty Images.

Stocks have recovered a bit from their 2022 lows, but no one can predict precisely when the bear market will be over. Eventually, though, stocks will recover for good. When that time comes, investors who had the fortitude to buy during the bear market will be rewarded. Here are two stocks you'll be happy you own when the bear market is over.

Whirlpool

Household appliance maker Whirlpool (WHR -1.42%) is known for its Maytag, Kitchen Aid, and namesake branded refrigerators, washers, dryers, mixers, and dishwashers. The company also recently announced that it agreed to acquire InSinkErator, a maker of garbage disposal units that commands an almost unbelievable 70% market share.

About 15% of Whirlpool's sales come from newly constructed homes and another 30% comes from folks upgrading or making other discretionary home appliance purchases. A macroeconomic or housing slowdown would stifle sales from this category. However, those fears might already be reflected in the stock price, which is down 26% this year.

Where do the other 55% of sales come from? Replacement. Imagine your refrigerator goes on the fritz, your food is about to spoil, and your ice cream is melting. Or your washer breaks down, and your dirty laundry is spilling over. Folks in that situation would likely get on the phone with their landlord or local repair person immediately. If the appliance can't be fixed, you'll need a new one right away, regardless of the economic environment. Whirlpool's replacement business can allow the company to remain profitable even if business slows down in a bear market.

During its second-quarter earnings report, Whirlpool management acknowledged a slowdown in discretionary demand. In doing so, it reduced its full-year adjusted earnings per share guidance from between $24 and $26 to between $22 and $24. If discretionary and new construction sales slide, it could create pent-up demand during an eventual recovery. At that point, you'll be glad you bought shares before the bear market ended.

GrafTech International

GrafTech International (EAF -5.56%) is a lesser-known company that supplies electrodes to steel makers, and it has multiple long-term growth catalysts on the horizon. GrafTech is one of the world's largest producer of petroleum needle coke in the U.S. Needle coke is used in its electrodes to conduct massive amounts of electricity at very high temperatures to melt steel in electric arc steel plants. The commodity's price can be volatile and contribute to ups and downs in GrafTech's profits. But two undeniable megatrends could improve the price of needle coke for years to come.

The first is lithium-ion batteries used in electric vehicles (EVs). The batteries use graphite made from needle coke to improve their charge speed and capacity, two crucial selling points for electric vehicles. As car manufacturers work to reach their lofty EV production goals over the next decade, lithium-ion batteries will need more needle coke each year. That alone could apply upward pressure on needle coke prices. But there's more.

 Electric arc steel plants require less capital to build and require fewer ongoing expenses than traditional coal-burning plants. Given these factors, the electric arc furnace market is expected to grow by over 11% through 2025.

At this point, EV adoption is still in the early stages, and electric arc plants haven't grown enough to affect needle coke prices. So GrafTech is viewed by investors as a low-quality steel supplier with macroeconomic headwinds, and the stock is down 41% this year. When the bear market finally retreats and economic uncertainty abates, GrafTech stands ready to embrace the two huge trends.

Buy before the bear market is over

When the bear market finally subsides, the rewards will flow to the investors who put their short-term worries aside in favor of the long-term outlook. Whirlpool can profitably withstand a recession and earn opportunistic investors a handsome return down the road. GrafTech's stock will likely remain volatile until the bear market is officially buried and EV and electric arc trends are in full effect. Then the upside is enormous. Investors with long time horizons who can stomach whatever the market will throw at them in the short run should consider adding these two stocks to their portfolios.