What makes the perfect portfolio? Well, maybe one with the following stocks:

  • Wal-Mart (NYSE:WMT)
  • PepsiCo (NYSE:PEP)
  • Cisco Systems (NASDAQ:CSCO)
  • Intuit (NASDAQ:INTU)
  • Apple (NASDAQ:AAPL)
  • Yahoo! (NASDAQ:YHOO)

Why do I pick these? Truth be told, they're just six of many that came to mind, and most people would be best off owning more than six stocks. But bear with me.

I chose these for a bunch of reasons: They've all had great runs in the stock market, making many investors rich. They're companies I admire. Some have played a big part in America's economic past, while others are major players in its future, and some straddle both camps. They have strong brands, making it hard for others to compete with them. They have serious competitive advantages, too, such as sheer size, and most have robust profit margins.

It's all in the timing
But you know -- this isn't enough. Timing plays a critical role in anyone's portfolio. You and I might have the same portfolio of the above stocks, but if I've owned them for just a year and you bought them a decade ago, the picture will differ quite a bit. Let's see how this portfolio would have fared if you owned it from the end of December 1996 to the end of December 2006 versus just owning it during all of 2006. Here are the compound annual growth rates for the 10-year period and the gain in 2006:

Company

1996 to 2006

2006

Wal-Mart

16%

0%

PepsiCo

10%

8%

Cisco Systems

14%

60%

Intuit

19%

15%

Apple

32%

18%

Yahoo!

43%

(35%)

A lesson to draw from this is that it isn't enough to park your money in the "right" stocks, the stocks you believe in. You need to stash them in your portfolio at the right time. In 2006, the S&P 500 index advanced nearly 16%. This basket of stocks underperformed the S&P. On the other hand, in the 10-year period above, the index averaged 8% growth, lagging the basket.

Of course, no one knows ahead of time exactly when the best times are to invest in any company. Still, a smart investor does his or her best to determine the right times, and the right time is often this: a long time. Over longer periods, strong, growing companies tend to perform well. The right time also includes various discrete periods, which become apparent in retrospect, but which take some skill to estimate ahead of time. For example, check out these returns for Intel (NASDAQ:INTC) over various periods:

Total gain

Average annual gain

Dec. 1986 - Dec. 2006

4,812%

21%

Dec. 1986 - Dec. 1996

3,656%

44%

Dec. 1989 - Dec. 1999

3,790%

44%

Dec. 1992 - Dec. 2002

486%

19%

Dec. 1996 - Dec. 2006

31%

3%

Clearly, if you'd invested in it 10 years ago, you wouldn't have fared so well (3%) (though the future is paramount, and if you aim to hold it for another 10 years, you might still do very well overall). If you'd invested in it 20 years ago, you'd have done rather well indeed (21%), but two intervening 10-year periods offered much higher growth rates (44%). Your level of happiness in having Intel in your portfolio would likely have differed widely, depending on when you put that stock in it.

So how would you have known when to invest in such a stock? Well, perhaps by luck -- that certainly is a factor on occasion for many investors. Other than that, though, it wouldn't have been enough to just spot hefty profit margins, or a strong earnings growth rate. Such measures can decline over time. Ideally, you'd have wanted to be well-versed in the company's industry and familiar with its competitors and emerging technologies, and you'd have wanted to have a strong grasp of Intel's competitive advantages, operational risks, and future promise. You'd also have been looking out for a good price at which to buy into the company. All this research can't guarantee any kind of return, but it can significantly increase your odds of doing well.

Get guidance
That's all easier said than done, though. If you're not confident in your ability to find such promising companies at the right time, look for some trusted advisors. One resource I use is our Motley Fool Stock Advisor newsletter, which recommends two promising companies each month. Over five years, its average recommendation has beaten the S&P 500 by a resounding 64% to 26%. A free, no-obligation 30-day trial will give you full access to all recommendations and past issues.

Regardless, when you envision your perfect portfolio, don't just look at the quality of the company. Think about the stock's price, as well, and whether this is a good time to jump aboard. When in doubt, focus on the long term! A growing company may falter over the short run, but in the long run, it usually fares well.

Here's to a more perfect portfolio!

Selena Maranjian owns shares of Wal-Mart and PepsiCo. Wal-Mart and Intel are Motley Fool Inside Value recommendations. Yahoo! is a Stock Advisor pick. The Motley Fool is Fools writing for Fools.