Every few years, Wall Street produces a “can’t miss” IPO. Investors line up hoping to be part of the next big thing. With excitement continuing to build around the SpaceX initial public offering, many investors are already dreaming of getting in on what some are calling a once-in-a-generation opportunity.

For SpaceX, the timing couldn’t be better. Public interest in space exploration has been reignited by recent lunar missions, and the approaching celebration of America’s 250th birthday has sparked a renewed sense of patriotism and pride in American innovation and achievement.

Yet when it comes to IPOs, history suggests the average investor is often better served waiting several months before buying. The problem is not that these companies are bad businesses. Rather, the excitement surrounding the offering often pushes the initial stock price well above what the underlying business can justify.

One of the most famous examples of IPO disappointment was Facebook’s public offering. At the time, Facebook was already the dominant social media platform in the world, with hundreds of millions of users and seemingly unlimited growth potential. Investor excitement was enormous, and the company went public on May 18, 2012, at $38 per share, valuing the business at more than $100 billion.

However, concerns about its ability to monetize mobile users and the lofty expectations built into the stock price quickly drove shares lower. Within four months, Facebook had fallen to less than $18 per share, wiping out more than half of its market value and leaving many early investors disappointed. In fact, it took more than a year for the stock to get back to its original IPO price.

Yet the story did not end there. As the company successfully expanded its advertising business and adapted to the mobile era, it eventually became one of the most successful investments of the past decade. The lesson was clear: Facebook turned out to be a great company, but for many investors, it was initially a poor IPO investment.

Poor early performance can also be seen in other recent high-profile offerings such as Uber, Twitter, DoorDash, Robinhood, and Coinbase. Even Amazon, now considered one of the greatest investments of all time, illustrates how volatility can punish investors. While Amazon performed well after its IPO, it lost more than 90 percent of its value during the dot-com crash that followed, before recovering and rewarding patient shareholders.

One reason I believe many highly anticipated IPOs struggle after going public is that much of the real money has already been made before ordinary investors ever get a chance to buy in. Venture capital firms, company founders, and early investors often purchase their shares when the company is still small and relatively unknown.

By the time the stock reaches the public market, media attention and the fear of missing out often drive prices much higher as investors rush to get a piece of the action. In many cases, the IPO becomes an opportunity for those early investors to begin cashing in on years of growth, while new investors are left paying a much higher price.

Only time will tell whether SpaceX follows this same pattern. However, many of the ingredients that have preceded disappointing IPO performances in the past are clearly present: enormous media attention, sky-high expectations, a charismatic founder, and passionate investors eager to buy at almost any price.

SpaceX may ultimately become the next great success story or it may be the latest example of IPO hype getting ahead of reality. Either way, investors would be wise to remember that a great company does not automatically make for a great investment.

(Past performance is no guarantee of future results. The advice is general in nature and not intended for specific situations)