Image credit: Getty Images

Picking the right stocks for your nest egg while you're in your 40s can make a huge difference in providing a financially comfortable retirement. With anywhere between two and three decades to go until you call it quits on the working world, you should be looking for stocks that share two key traits: dominance and optionality in their fields, and the potential to pay a dividend in the future.

Most financial experts would argue that paying a dividend now is more important, and that's certainly not a bad stance to take. However, I think the most relevant companies -- and the ones most rewarding to shareholders -- come 2041 have yet to start paying dividends. Owning a piece of Facebook (META -0.09%), Alphabet (GOOG -0.21%) (GOOGL -0.30%), or Amazon (AMZN -0.16%) can help ensure both capital gains and the potential for dividend payments...come retirement time.

What the heck is optionality?

Dominance within a field is pretty easy to understand, but what in the world does optionality mean? Before I answer that, let's firmly establish that all three of these companies are dominant.

  • Alphabet's Google owns 75% of the global desktop search market share, and an astounding 92% of mobile search globally, according to Net Market Share.
  • Facebook's monthly active users has now eclipsed 1.75 billion people, or likely over 50% of all people with regular Internet access!
  • It may be hard to believe, but e-commerce accounts for just 8.4% of all U.S. sales. There's lots of room for growth, and Amazon is capturing the lion's share of it. According to Forrester Research, Amazon captured 60% of all e-commerce growth in 2015.

But let's get to that second part: optionality. In short, companies that embrace optionality realize the pace of change in the world is accelerating. The ability to know what will be relevant tomorrow has diminished, and only those that are light on their feet and able to adapt will survive.

The ideal mode for addressing this uncertainty is -- quite simply -- a trial and error approach. Companies that embrace learning via small failures will be the most relevant tomorrow. By accepting the pain of non-fatal errors, companies can expose themselves to ideas that can spawn entire new industries.

Consider that Amazon started out only selling books. Then it moved to media. Then it added merchandise. Then it added an e-reader. From there it has moved on to groceries, tablets, and now -- the real cash cow -- cloud hosting. Along the way, founder and CEO Jeff Bezos has embraced trial and error, and it has proved enormously valuable for shareholders.

Last year, Google changed its name to Alphabet to emphasize its stance on optionality (Alpha-bet). While the advertising dollars from Google still make up almost all of the company's sales, its moonshot projects -- including Nest, Calico, and driverless cars -- have the potential to create huge new businesses, while their failures will not render Alphabet dead in the water.

Facebook hasn't taken quite as dramatic a stance on optionality but it still has lots of ways to remain relevant in the future. When the company went public, it had just its namesake platform. But that has expanded rapidly to four uber-popular services -- Facebook, Instagram, Messenger, and WhatsApp -- and Oculus VR has the potential to join the list in the coming years.

But optionality isn't enough

While I am confident all three have the type of optionality in their DNA that's necessary to remain relevant for decades to come, that alone isn't enough to recommend buying shares for a 40-something's nest egg. The second piece comes from dividend-paying potential.

While none of these three currently offers a payout, it wouldn't surprise me at all if they started doing so between now and when you decide to retire. But by getting in now, the actual yield you'll be getting on your purchase price will be much higher than if you waited.

For example, let's assume you buy Facebook now at $120. It starts paying a $5 dividend ten years from now. Because the stock has appreciated so much (it's worth $500 in 2026), its yield is only 1%. But since you bought at $120, you're getting a 4.2% yield on your original purchase price.

By looking at the growing cash hoard of Alphabet and Facebook, it's not hard to see how a dividend could easily be in the offing.

Data source: SEC filings. Growing Cash Hoards At...Create column charts

I'll be the first to admit that -- right now -- Amazon doesn't seem nearly as likely to offer a dividend. Facebook and Alphabet have seen phenomenal growth in their cash hoards, and neither sports any significant long-term debt. Amazon's growth has been far more tepid, and it has $8.2 billion in debt to boot.

That being said, this is simply part of Jeff Bezos' long-term strategy. By the time he's done building his moat around Amazon -- if that time ever comes -- he will have such operating leverage that I don't think it would take long at all to extinguish the company's debt and start raking in free cash flow at levels we haven't seen the company accomplish...yet.

That's why I think anyone in their 40s who is trying to build out a winning nest egg  would be wise to include all three players in their portfolio. And lest you think these are empty words, my skin is in the game: these three combine to form 45% of my real-life holdings!