Q: How do you invest to end up with a billion dollars?
A: Start with two billion dollars, and invest it in this market.

(Rim shot!)

Investors likely won't laugh as hard at that joke as they might have a few years ago, when stocks were still finding a way to appreciate year after year. After a brutal year that's left many portfolios down 30%, 40%, 50%, or more, many investors may be throwing up their hands in surrender. In October alone, investors withdrew $72 billion from stock funds.

Watching the erratic ticks of the market indexes, or trying to follow along with the perpetually disagreeing folks shouting over one another on CNBC, may make the process of investing seem overwhelmingly daunting. If that's how you're feeling, now may be the perfect time to take a step back from the madness and see what we can learn from the wealthiest folks around.

The billionaires' club
To begin with, when I say "the wealthiest folks around," I don't mean that guy down the street who just told you about the few thousand he made trading Japanese yen at night. No, I'm talking about the people that need at least 10 digits to talk about their wealth.

Though some folks such as George Soros, James Simons, and Steven Cohen have traded their way to massive wealth, they're pretty lonely among the world's billionaires. Most billionaires have gotten there another way -- ownership of a single great company. Among the top 15 billionaires, we've got Warren Buffett and Berkshire Hathaway (NYSE:BRK-A), Carlos Slim Helu and America Movil (NYSE:AMX), Bill Gates and Microsoft (NASDAQ:MSFT), and Larry Ellison and Oracle (NASDAQ:ORCL) -- just to name a few.

Hobnobbing with the members
Obviously, many of these billionaires' success lies in having a great business idea, guts, timing, and a little bit of luck. Michael Dell, for example, founded the predecessor to Dell (NASDAQ:DELL) in his college dorm in 1984. Dell was one of the first companies to successfully sell computers directly to consumers, which allowed Michael Dell to cut out the middleman -- and undercut his competitors' prices.

Fortunately, though, we can do something that these billionaires have done without needing our own billion-dollar business idea: We can own a great company for a long time. Michael Dell didn't get rich by trading in and out of Dell shares; he did it by owning a big piece of the company as it became a leader in PC sales. Likewise, it wasn't savvy options trading that helped Bill Gates score his enormous net worth -- it was owning a chunk of Microsoft and benefiting from its growth. And Sergey Brin and Larry Page? OK, I think you get the point.

But holding onto just any stock for a long time isn't optimal. Sergey and Larry aren't the proud owners of Billy Bob's Crab Shack and Automart; they lay claim to 18% of the shares of Google (NASDAQ:GOOG). To reap the rewards of owning a piece of a company for the long haul, you need to make sure that the company is worth owning for that duration.

So what are the shared characteristics of the companies mentioned above during their meteoric rises? They all had …

  • A sustainable competitive advantage that kept them at the forefront of their industries.
  • A shareholder-friendly management team that (preferably) owned a big piece of the company.
  • A solid balance sheet.
  • A business that pumped out cash.

Finding the future billionaires
Though the companies I've mentioned above should continue to perform solidly, they have already created massive wealth for both the founders and shareholders. In other words, Microsoft in the early or mid-'90s had a lot more growth opportunity ahead of it than the already-$170 billion Microsoft of today.

That's why the team at the Motley Fool Hidden Gems service is focused on small companies that investors can buy today and hang on to for years, so they can benefit as the company goes from challenger to champ. Here are two stock ideas, courtesy of the team.

Buffalo Wild Wings (NASDAQ:BWLD) is a fast-growing business that is chowing down on market share in the "chicken wings, beer, and sports bar" restaurant segment. The company is debt-free because its business generates buckets of free cash flow, which it plows back into building new restaurants. CEO Sally Smith has done a great job running the company since she took over in 1996; she owns almost $5 million in stock, and share dilution is minor.

Meanwhile, in the health-care industry, the team has tracked down Natus Medical, a market leader in newborn hearing screening that's steadily building its franchise in other areas of newborn health tests. The company has $67 million in net cash on its balance sheet, and management has a history of generating organic growth and making smart acquisitions.

The advisors at Motley Fool Hidden Gems think that both of these companies are high-quality businesses that will produce market-smashing returns for shareholders in the years to come. You can check out detailed write-ups on more of the stocks that the team has recommended to subscribers -- including a just-recommended cash-rich infrastructure player -- with a 30-day free guest pass.

Click here to learn more -- there's no obligation to subscribe.

Fool contributor Matt Koppenheffer does not own shares of any of the companies mentioned. Microsoft, Dell, and Berkshire Hathaway are Motley Fool Inside Value selections. Google is a Motley Fool Rule Breakers pick. Buffalo Wild Wings and Natus Medical are Motley Fool Hidden Gems picks. Berkshire Hathaway is a Motley Fool Stock Advisor recommendation. The Fool owns shares of Buffalo Wild Wings and Berkshire Hathaway. The Fool’s disclosure policy has never once been caught with its pants down. Of course, it doesn't actually wear pants …