It's official: The stock market entered bear market territory a few months ago. And with the U.S. Federal Reserve poised to continue aggressively hiking interest in a fight against inflation, it's unclear when this bear market will end. 

At this point, it's too late to do anything in preparation. Nevertheless, there are still things you can do right now to help your investments weather the storm. Here are three things smart investors do to shore up their portfolios.

Two people look over their finances at the table.

Image source: Getty Images.

1. Resist the urge to chase the best-returning asset classes

If you're invested in stocks, there's a darn good chance you're sporting some hefty losses this year. You'd be in good company. The world's wealthiest people are, too, and their net worth has plummeted as a result. Even Warren Buffett, who prefers boring and predictable businesses, has reported significant declines. Berkshire Hathaway (BRK.A 0.58%) (BRK.B 0.38%) revealed its stock portfolio lost over $63 billion during the second quarter of 2022 alone (a 21% decline)!

By and large, stocks aren't a happy place during bear markets. Heck, even bonds haven't done so hot, bucking the old wisdom that these are "safe" (bond values fall when interest rates rise, although you'll get the principal value of the bond back if you hold it to maturity). But what has done well this year? Commodities (like agricultural products and mined materials), energy, and cold hard cash. We'll get to cash in a moment, but as for the stuff that's running higher this year, resist the urge to chase those returns.

That's because commodities and energy tend to be cyclical in nature, not steady and consistent performers. Granted, if you think inflation will continue to run higher for a few years, investing some of your portfolio in top commodity and energy companies might not be a terrible idea. Nevertheless, when it comes to the commodities themselves, investing after they've already surged in value might simply be setting up your portfolio for yet another plunge. For example, oil prices are sharply down from their highs earlier this year. Something similar has happened in previous bear markets -- a sharp increase in inflationary pressure can reverse course just as suddenly and unpredictably.

I'm not saying I expect oil to plunge further from here. However, the principle is this: Don't chase the hottest trend of the moment! If you're a long-term investor (you have at least a few years until retirement, or you're already in retirement and need your portfolio to last you at least a decade or two), the best move is doing nothing at all, or making just small adjustments.

2. Sell those stocks that have been "swimming naked"

Speaking of small adjustments, one of the things bear markets do is expose companies in poor financial health. Again we tap the Oracle of Omaha for some help: Buffett has said, "You don't find out who's been swimming naked until the tide goes out." The Fed is hiking interest rates and tightening the supply of cash, and this is the proverbial "tide going out" on easy money. Now that times are a bit harder, some businesses might not be in the strong position we once thought they held.  

But how do you tell who's "swimming naked"? Falling revenue and profitability aren't necessarily a red flag. Many of these businesses will be poised for a strong recovery. However, if falling sales and profits are paired with a weak balance sheet, that's another story. Companies that have lots of debt and little to no cash, for example, could be in trouble. 

In particular, check a business' recent statement of cash flows and calculate its free cash flow (operating income minus capital expenditures). Now compare that figure to how much cash and investments they have on their balance sheet. If a company is generating negative free cash flow at a rate that would deplete its coffers within a year or two, this company might be in dire straits. 

Be careful with this analysis, though. If a company is in serious financial condition, it's likely the stock has already tanked. At this stage, businesses have options that might unlock value for you, the shareholder -- they can raise more cash, or they can sell themselves to a competitor. So don't be too hasty to sell. 

Nevertheless, if the situation looks particularly bad (not for the stock price, but for the business itself), it may just be time to cut your losses and reallocate those funds to an industry peer that is in better shape to recover once the bear market ends.

3. Make sure you have the cash you need for the next year or two

Here's another reason you might sell a stock in your portfolio: You need cash within the next couple of years.

Now, don't get me wrong: The last time you want to sell a stock is after the market has crashed. That's why always maintaining a cash position -- or other very liquid assets like bonds that will mature within a year or two or CDs at a bank -- is especially important. This is true if you're young and have many years until retirement (get that emergency fund started!) or if you're already retired.

Nevertheless, if you find you might be needing a little more cash in the short term than you originally anticipated, raising some cash now could be a good idea. Bear markets can last longer than we expect. The average duration of a bear market is about 10 to 12 months, but that's just the average. Sometimes they can last longer.  

Start with selling those businesses you've lost faith in. An important word of caution here, though, is to avoid selling high-quality businesses just because having cash in the bank feels good at the moment. Those high-quality businesses are the ones that will help your portfolio eventually recover.

Whatever you do, don't panic

Bear markets are no fun. There can be some ugly days when the market falls by a steep percentage. It's also common for some upward momentum to be undone by unforeseen economic setbacks. This leads to strong emotions. Whatever you do, don't panic and act on those strong emotions. That can simply lay the groundwork for more pain and future regret.

Take courage, though. Bear markets don't last forever, and the end of a bear market is often called in hindsight -- after a robust recovery for the market and economy has already been made. Keep a level head, favor small adjustments over big and rash decisions, and stay focused on the long term.