Investing in any stock can be a maddening experience, especially for beginners. You click "buy," and you watch your brokerage statement. You're gleeful when your stock goes up and disappointed when it goes down.

When it comes to investing in IPO stocks -- or companies that have recently held their initial public offering and can be traded on the markets for the first time -- take that experience and multiply it by 1,000! It can be so disorienting that it's difficult to tell up from down.

That's because newly public stocks can be incredibly volatile. They can move up by 10% or more one day, and down by an equal amount the next. We'll get into why that's the case below -- but it can be a harrowing experience.

In 2012, Fool Eric Bleeker wrote about a person who emailed him about investing her entire life savings -- $40,000 originally slated for a down payment on a house -- in Facebook's IPO in May 2012. His verdict on the move: "That's insane."

The letters I,P, and O with arrows pointing to them.

Image source: Getty Images.

He's not wrong. Investing your entire life savings in a single IPO is not rational or smart. But at the time, Eric's article was prescient. Shares of Facebook fell 53% by September 2012, and the investor had lost half her life savings.

A modern-day tragedy, right?

Well, the thing about the stock market is that -- until you sell your shares -- there's always tomorrow. Over the next six years, shares jumped 1,130%! That investment -- worth just $19,000 in September 2012 -- clocked in at more than $230,000 by July 2018. Forget a down payment; that optimistic investor could now pay for the whole house!

A modern-day success story, right?

Hopefully, this helps you see that when we talk about "how" to invest in IPO stocks, "with caution" and "with eyes wide open" are the best answers.

What is an IPO?

The easiest way to understand an IPO is to highlight an imaginary company trying to make a new machine. Let's pretend this new machine is a teleportation device. Obviously, it's a very exciting development.

The woman who came up with the technology for the device had been testing it in a university lab for years. When she finally thought she'd perfected it, she decided it was time to bring it to the masses. But the road to that goal was long and winding.

In general, the process went like this:

  • She secured her patents to protect the intellectual property.
  • She presented her idea to trusted friends with ties to the business community.
  • Through these ties, she found the first employees of her teleportation company -- a new CEO, CFO, and COO. She would function as the chief technology officer.
  • The company got an official moniker: Star Trek Enterprise.
  • This team of four then went to venture capital (VC) funds all over the world. They asked for money to manufacture and test large teleportation devices. (It's an expensive process.) In return for the money, they gave these VCs ownership of a modest percentage of Star Trek Enterprise.
  • Over time, Star Trek Enterprise grew. It expanded to 100 employees and developed its first marketable teleportation device. During that time, there were other rounds of fundraising to help make ends meet, while Star Trek Enterprise had yet to make a single sale.
  • The first teleportation device was a huge hit -- it allowed small packages to be delivered right to your house instantly. They have been selling like hotcakes.

Now that Star Trek Enterprise is a smash hit, it prepares for an IPO. The company works with a bank to offer shares on the New York Stock Exchange under the ticker BEAM. The process can be prolonged. The bank and the company often go on an "IPO roadshow" to tout the soon-to-be-available stock. After talking with potential investors, the bank and Star Trek Enterprise determine a valuation and the number of shares to issue.

And they aren't limited to listing on the New York Stock Exchange. Nasdaq is the other popular option in the U.S. If the company chooses to, it could also list its shares abroad, like on Shanghai or Hong Kong Stock Exchange, or -- closer to home -- on the Toronto Stock Exchange.

When the IPO eventually arrives, management usually appears on the floor of the stock exchange and rings the opening bell. Because the roadshow has built up the requisite excitement, there's usually strong demand for shares, which can send them soaring within hours. Anyone with a brokerage account can buy a share of BEAM and own a part of it. But usually, it's better to wait. We'll explain why below.

Why do companies go public?

There are three big reasons companies decide to go public.

  1. The first is a matter of prestige. Over the decades, taking your company public is a signal to the business world that you've "made it." It is a badge of honor akin to winning a Nobel or graduating as the valedictorian.
  2. The second is a matter of rewarding those who helped you early on. Those VC funds that poured money into Star Trek Enterprise weren't totally altruistic. They want to see nice returns on their investment. The problem is that when a company is privately held, it's very difficult to find a buyer and determine a price at which to sell your stake. When a company goes public, those early investors have a chance to finally cash in. Their initial investment in the company is converted into shares, and those shares can then be sold on the open market.
  3. The third is a simple matter of funding. By offering shares on the public market, companies gain access to instant, non-debt-related capital. The private markets have changed considerably over the past 20 years -- with tons of VC capital being available to privately held companies. This was unthinkable in years past.

But even today, there are companies that need access to that capital, like Tesla (NASDAQ:TSLA), which makes electric vehicles. It costs tens of billions of dollars to build gigafactories and manufacture cars of the future. Without the ability to conduct secondary offerings (in which a company issues new shares after already being public), such companies would be forced to take on debt.

By avoiding debt, the company chooses to dilute existing shareholders -- there are more shares for the same underlying company, meaning you own less of it. But that seems more prudent, as taking on lots of debt can make a company fragile and force it to spend an outsized portion of cash on debt interest in the future.

Why are IPO stocks so volatile?

The late Benjamin Graham, known as the Father of Value Investing, wrote about stocks in the 1930s in the shadow of the Great Depression. At the time, most Americans didn't understand the stock market, believing it to be nothing more than a rigged gambling machine to benefit Wall Street.

Not so, thought Graham. Yes, an enormous stock market crash kicked off the Great Depression. And sure, daily movements in the stock market seem to happen for no reason whatsoever. But the key is to change the timeline upon which you view such moves. Graham said:

In the short run, the market is a voting machine but in the long run, it is a weighing machine.

What does this mean exactly? Over the short term, a stock's movement has a lot to do with fickle things like investor attitudes and popularity. There's a limited number of shares of a company available. If everyone wants a piece of a company, the demand for those shares drives up the price.

This explains why IPO stocks pop, or go way up in value, on their first day. Pent-up demand to own a slice of a company leads shares to skyrocket. Beyond Meat (NASDAQ:BYND) is the perfect example. The company has 46 million shares total, but it only offered 9.6 million in its IPO. In other words, only 20% of the company was available to the public.

Limited supply and huge demand caused the stock to quadruple in price before the company ever released a quarterly report. Think about that: There was no new information for the public that wasn't in the prospectus (the really long document the company provided to investors before going public). And yet shares increased 300% in little more than a month! That's what a voting machine looks like.

But over time, supply and demand will even out. Those investors excited about the vegan craze will move on to something else -- or new vegan-focused companies that hit the market, thus cannibalizing interest in Beyond Meat. That doesn't mean shares will tank when that happens. Instead, it just means the company's stock will trade based on business results rather than FOMO (fear of missing out) on the next big stock.

Can I buy pre-IPO shares, or do I have to wait until the first day of trading?

It's not usually possible for individual investors like you and me to buy shares at their initial offering price. When a company goes public, it works with investment bankers to take care of the details. Those bankers buy up shares. Sometimes, the shares are offered to the bank's top-tier clients at a cheaper price than what's offered to the public. Because IPO stocks often experience a huge pop on the first day, these clients earn quick and easy returns -- making them more loyal to that bank.

One exception to the rule is when a company decides to do a direct listing instead of an IPO. In circumstances such as these, the company doesn't raise any funds by making its shares available on the public market. Instead, it just provides public information on the company and allows insiders who privately own shares to trade their stake in the public market. When that happens, whatever price you can get on the first day of trading is determined by the market -- not an investment bank. For more information about direct listings, read about how Slack (NYSE:WORK) took the direct listing route.

An overview of the IPO landscape

We are witnessing an influx of high-value IPOs. There are two reasons for this.

First, we are currently in the tenth year of the longest bull market in history. Between March 9, 2009, and July 1, 2019, the S&P 500 has returned an astounding 437% to investors. In plain English, that means that investors are excited about their investments and willing to continue paying top dollar for them.

That matters because if a company goes public, it wants to raise as much money as it possibly can. If it goes public in the middle of a bear market -- when everyone is feeling pessimistic -- it won't get as much money for what it's offering. But if it goes public now, there's a window of opportunity. Companies have no idea how long that window will be open, so they are rushing to enter the fray.

The second reason behind why today's IPOs have such lofty valuations has to do with a paradigm change in how companies fund themselves in their earlier stages. There's a lot more VC money to go around right now. According to Crunch Base, the total volume of VC dollars invested globally has tripled since 2014 alone -- to more than $320 billion in 2018.

Going public brings a higher level of scrutiny to the company and adds pressure on executives to deliver returns over the short term. This is a major incentive to stay private for longer. Why go public if you already have the money you need?

Eventually, those early VC investors want a way to cash in, and the company going public is the logical solution. Because those companies have had so many years to grow while remaining private, they are debuting on the market at much higher valuations.

What are key metrics to watch in an IPO?

In general, there are four broad areas to investigate when looking at a company nearing IPO:

  • What kind of sustainable competitive advantage -- or moat -- does the company have?
  • What do the financial statements for the company demonstrate?
  • Who is running the company and how?
  • What does the valuation look like?

We'll tackle these four in order below, using as an example a company that recently went public: PagerDuty.

Does the company have a moat?

Perhaps the most important variable to measure in any investment is a company's sustainable competitive advantage -- or moat. Without a moat, business success can be just as much a blessing as a curse. If the competition sees you doing really well, they'll make a good-enough copy of your product or service for less and steal your business away in a capitalist phenomenon known as commoditization.

While there are no hard-and-fast rules, there are four basic moats a company can have.

  1. Network effects: Each additional user of a service/product makes it more valuable for all the other users.
  2. High switching costs: While users have the option of switching to a competitor, doing so would be costly -- financially, logistically, and emotionally.
  3. Low-cost production: If one company can offer a service/product for consistently less than the competition, it will always win business.
  4. Intangible assets: This includes things like brand value, patents, and government protection.

What is PagerDuty's business? It collects all of the signals (data) that a company's apps and servers send it, find areas that need attention immediately (read: a company website is down), and notifies the exact person needed to fix the problem. This is an oversimplification to be sure, but it gives you a good idea.

PagerDuty benefits from two key moats. The first is high switching costs. When a company uses PagerDuty's solutions, the solutions learn from the experience. Perhaps during the first website outage, PagerDuty notifies too many parties. It learns from that action and makes sure to do better next time.

Switching to another provider would not only introduce the need to retrain employees, but it would mean the loss of any operational fine-tuning that had been achieved through the process of refining the response to problems.

One of the best ways to monitor if high switching costs exist is to monitor the company's dollar-based net retention rate (DBNR), which measures the amount of sales that a cohort of customers pays from one year to the next. The key is that this filters out the effect of new customers.

If the DBNR is at or near 100%, the company is holding onto existing customers. If it is well above 100%, it is not only holding onto those customers but seeing them add new services over time. That means PagerDuty is embedding itself ever deeper in the DNA of its clients.

Chart showing dollar-based net retention at PagerDuty

Data source: SEC filings.

But there's a secondary moat worth mentioning, too. PagerDuty uses artificial intelligence (AI) and machine learning (ML) to become better at detecting problems.

On the most fundamental level, the more data PagerDuty can feed to its AI and ML, the more accurate it will be. That means that each incremental customer addition makes PagerDuty more valuable to existing customers -- even though it might not appear that way on the surface.

The end result is a small but growing moat in the form of network effects that create a meaningful barrier against upstart competition.

Does the company have financial fortitude?

Next, we want to know the financial situation of the IPO company. Specifically, what would happen if the company ran into serious trouble -- either micro (i.e., there's a problem specific to the company, such as with sales) or macro (i.e., there's a recession) in nature?

Companies that have lots of cash, not much debt, and healthy free cash flows can not only survive such times but actually emerge stronger. They do that by buying up their own shares when they're depressed, acquiring rivals, or simply lowering prices to drive out the competition and grab long-term market share.

Here's where PagerDuty stands in those respects.

Cash Debt Free Cash Flow
$338 million $0 ($17 million)

Data source: Yahoo! Finance.

This is a mixed bag. It's a huge deal that PagerDuty has zero long-term debt and a formidable war chest of more than $300 million. I would much rather a company have positive free cash flows. On free cash flows, this means that through the normal course of business, PagerDuty lost $14 million last year and spent an additional $3 million on capital expenditures.

But the fact that the past year's loss was "only" $17 million tells me that PagerDuty has plenty of time to become free cash flow positive before we have to start worrying. For instance, if it continued to lose $20 million per year indefinitely, PagerDuty could still fund operations for another 17 years with its nearly $340 million in cash.

Does management have skin in the game?

Next, learn about who is running the company. Founder-led companies tend to do the best because founders view their companies as existential extensions of themselves and are inherently incentivized to build something of lasting value.

While PagerDuty's key founder, Alex Solomon, is no longer PagerDuty's CEO, he is still very much involved. In fact, he left the CEO role to focus more on the product -- ceding control to the current CEO, Jennifer Tejada, while he took on the chief technology officer role. He also still serves on the company's board.

It's important to see how much stock insiders own of PagerDuty. The best way to do this is by going to a company's listing on the SEC's Edgar Database and searching for a DEF 14-A filing -- which reveals this information. Currently, all insiders combined own 13.8% of shares outstanding. That stake is worth $500 million at today's prices. That high level of ownership matters to me, because management has financial skin in the game: They will only succeed if we -- as shareholders -- succeed.

Finally, it's important to me that the company has a healthy culture. The real work is done by the rank-and-file employees. If they're happy, that's a good sign. Based on reviews at Glassdoor.com, PagerDuty does well here. Tejada has a 100% approval rating, and the company garners 4.6 stars out of 5.

How much would I pay for the IPO?

Finally, it's important to get an idea of what we're paying for. We do this by looking at a number of different valuation metrics and considering growth rates as well.

Because PagerDuty is not yet profitable on an accounting basis -- nor is it free cash flow positive -- it can be very difficult to value. Over the past 12 months, PagerDuty has pulled in $130 million in sales and is valued at $3.6 billion. That results in a price-to-sales ratio of 27.

That's expensive. To put it in perspective, the S&P 500 trades for 2.2 times sales. Of course, the companies in the S&P 500 are much larger and more mature businesses. That being said, PagerDuty is more than 10 times more expensive on a sales basis.

It's encouraging to see that PagerDuty is growing so fast. The aforementioned DBNR has been very high, and sales grew 49% during the company's first quarter of 2019.

Don't quibble too much when it comes to price since you're playing the long game. At the same time, though, don't "back up the truck" for such an expensive stock. When I bought shares of PagerDuty, I only allocated a small part of my portfolio to the stock, around 1% of my holdings.

In the end, I'm willing to largely ignore the fact that PagerDuty is so expensive because the company checks the other three boxes:

  • It has a meaningful and measurable moat.
  • There's zero long-term debt, lots of cash, and not much free cash flow loss.
  • The company has excellent leadership with skin in the game.

In the end, these four variables are the most important to evaluate with IPO stocks.

When to wait instead of buying an IPO stock

It's also important to note that there's no one forcing you to buy newly public stocks. These stocks -- unless they are bought out or go bankrupt -- will likely be tradeable on the public markets for years to come.

There are two broad areas where it makes more sense to wait until you've learned more about the company:

  1. If the company is in a brand-new market that has yet to take shape, especially if it could be affected by regulation. Right now, both the cannabis and cryptocurrency markets would be prime examples.
  2. If the company has lots of hype (think: Facebook when it went public), but you don't really understand how it makes money.

You can always add these stocks to your watch list, study them further, and add to them at a time when it makes more sense to you.

What are the 10 largest IPO stocks of 2019?

This year has seen a bevy of multibillion-dollar IPOs. The list below includes eight companies that have already gone public and two that are expected to go public before the year is over.

Company What It Does Current Valuation
Uber (NYSE:UBER) Ridesharing and delivery $74.7 billion
The We Company* Parent to shared-workspace company WeWork $47.0 billion**
Airbnb* Online lodging and events marketplace $38.0 billion**
Zoom Video (NASDAQ:ZM) Video teleconferencing $26.8 billion
Slack*** (NYSE:WORK) Messaging software $17.7 billion
Pinterest (NYSE:PINS) Visual idea discovery $14.3 billion
CrowdStrike (NASDAQ:CRWD) Cybersecurity $13.8 billion
Chewy (NYSE:CHWY) E-commerce pet food $13.1 billion
Beyond Meat (NASDAQ:BYND) Plant-based meat alternatives $10.3 billion

Data source: Yahoo! Finance. Valuations are accurate as of July 16, 2019. *Not yet public -- is expected to go public. **Valuations are based on estimates and private funding rounds. ***Technically not an IPO but a direct listing.

Some of these -- Airbnb, Beyond Meat, Pinterest, Lyft, and Uber -- are well known by most members of the American public. Others -- like Zoom Video and CrowdStrike -- have less of a following.

What are the top IPO stocks to buy now?

It's impossible to tell with 100% certainty which new stocks will be the big winners over the next three to five years, though we can try. I pored through the cohort of companies listing shares starting on January 1, 2017. Of those, I have picked five such companies that are top stocks to buy right now, none of which is included in the above list of big IPOs.

Company IPO Date What It Does
Okta (NASDAQ:OKTA) April 2017 Helps companies manage access to online documents
Roku (NASDAQ:ROKU) September 2017 Offers a single platform for all of your streaming services
MongoDB (NASDAQ:MDB) September 2017 Provides database and search capabilities for companies
Zuora (NYSE:ZUO) April 2018 Manages billing solutions for subscription-based companies
PagerDuty (NYSE:PD) April 2019 Helps respond to technical outages on websites and servers

My conviction in these five stocks isn't just empty words, since I own all five in my personal portfolio. Combined, they currently account for more than 10% of my real-life holdings.

We've already covered why I think PagerDuty is such a promising IPO, but to read more about the other IPO stocks to buy today, click here.

A final word on IPO stocks

When you invest in companies that have been public for a long time, you have a much longer track record on which to base your decisions. The market is also much more of a weighing machine than a voting machine. That's why such companies deserve a huge allocation in most portfolios.

That said, IPOs can be very exciting to invest in. And if you do your homework, you can end up owning a piece of a great business at a price that, 10 years later, looks like a steal.

It's worth investigating -- cautiously and with eyes wide open.