To the casual observer, Tuesday might have seemed like a calm day for the stock market. Market participants watched as major indexes stayed close to unchanged throughout most of the day. In the end, the pessimists took the day, with the Dow Jones Industrial Average (DJINDICES:^DJI), S&P 500 (SNPINDEX:^GSPC), and Nasdaq Composite (NASDAQINDEX:^IXIC) all giving up ground.

Index

Percentage Change (Decline)

Point Change

Dow

(0.07%)

(23)

S&P 500

(0.15%)

(6)

Nasdaq Composite

(0.07%)

(10)

Data source: Yahoo! Finance.

Lurking below the surface of this quiet day on Wall Street, however, were concerns about some of the hottest areas of the market. Calls of a stock market bubble have gotten a lot more common, and even some of Wall Street's finest are starting to look for reversals of fortune for favored stocks. Below, we'll look more closely at why some people are predicting that a bubble could burst -- and what you should do to end up ahead no matter what happens.

Blowing bubbles on Wall Street

You can always find someone willing to say that we're in a stock market bubble. It's a common retort for investors who can't understand why a certain stock is doing as well as it is, and it doesn't always have a strong basis in fact.

Person wearing suit holding pin in front of bubble with stock chart inside.

Image source: Getty Images.

Lately, though, calls of a bubble have gotten louder. For many, the catalyst was the rampant bull market in late 2020, which defied the dire economic conditions during the worst of the COVID-19 pandemic and instead sent stocks inexorably higher. That apparent disconnect made many question whether markets truly reflect the health of the broader economy.

Now, major investment companies are getting in on the act. Goldman Sachs (NYSE:GS) earlier this week stopped short of saying that the entire market is in a bubble, despite pointing out that common metrics like earnings and book value multiples are near the high end of historical ranges. However, Goldman did point to more than three dozen stocks it cited as being potentially "frothy." Those bubble stocks included:

Again, Goldman didn't say these stocks would crash right away. But it suggested that returns could be lower than normal over the next 12 months.

How to get through a stock market bubble

Goldman's disclaimers suggest the right course of action for fighting against the possibility of a stock market bubble. The key is ensuring that you have a long-term mindset rather than one that's driven by short-term movements. For many, that could require some adjustments in philosophy.

The first step is to make sure that the stocks in your portfolio are there because you have confidence in their long-term business prospects. It's easy to get caught up in the hype and take a flyer on a speculative stock. But if you have legitimate concerns of a bubble, the last thing you want is to own investments that you don't really believe in. Those will be the first you panic-sell at a loss if a bubble comes.

By contrast, if you own a stock because you think the business will perform well in the long run, then make notes explaining why you still think it's worth owning even at high levels. That way, if share prices do fall, you'll be able to check in and reassure yourself of why you decided to hold on.

Second, check to see if you have enough money set aside for your immediate financial needs. If a stock market bubble bursts, it makes it extremely costly to raise cash for living expenses. Few things are more difficult than taking losses on a stock that was trading up at a big gain just days or weeks before. By ensuring you have ample cash levels on hand, you can avoid that difficult decision.

Last, start making a list of high-quality stocks that you'd like to buy if they were somewhat cheaper, and try to save a little extra cash in preparation to invest in them if the market heads sharply lower. When a true stock market bubble bursts, it usually sends share prices of strong companies down, along with weaker companies that didn't deserve their high valuations. Frightened traders panic-sell them all. But you can be more discriminating and pick up great bargains on the cheap.

You'll make it through

Frothy stock markets can be just as scary as falling ones. But the answer to how to handle them is the same: Have a good long-term investing strategy and stick to it. You'll be glad you did.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.