For the better part of five years, I've had the privilege of running a public, real-money portfolio for The Motley Fool.

And for the better part of five years, the market has kicked my butt. While my portfolio returned 58.8%, the S&P 500 delivered 96.5%.

With our real-money portfolio program coming to an end, and my stocks having been sold, it's a good time to analyze exactly why I failed to beat the market.

Reason No. 1: My circle of incompetence
If I have a circle of competence, it's in the banking sector. It's the sector I've spent the most time studying, and it was the primary focus of my real-money portfolio.

So it's probably no surprise that of my 72 individual buys (which include re-buys), the nine picks that lost money were all non-banking picks. Or that the returns on my banking picks outperformed my non-banking picks 2:1. If you lump insurance companies AIG and Berkshire Hathaway in with the banks, the disparity gets even more pronounced.

My practical advice for you: You know it and I know it...sticking with the companies that you know best is best. 

Reason No. 2: Cash can kill
There's a very thin line between market timing (which doesn't work) and keeping dry powder (which can).

The former tries to determine whether the stock market is over- or undervalued and moves between stocks and cash accordingly; the latter keeps a store of cash around when you can't identify any great individual stock buys.

You can imagine how easy it is to use one to justify the other, especially when you keep track of the Shiller 10-year P/E ratio, as I do. Going back to the late 1800s, the average has been 16.6. Since I started my real-money portfolio, the Shiller P/E has pretty much been above 20 the whole time while the market has been moving up. Today it stands at 27. 

The way our real-money portfolios worked, we started out 100% in cash. Between slowly deploying my cash as I found worthy stocks and then holding about quarter of it in dry powder cash even after ramping up, my portfolio had a serious drag in an up market.

We won't get to see if I could have properly deployed my cash in a down market to make up for the cash drag in good times, but this serves as a good warning of the dangers of being in cash, no matter whether you call it market timing or dry powder.  

My practical advice for you: Remember that my real-money portfolio was a stock portfolio, not a portfolio that's allocated among asset classes like cash, bonds, real estate, and stocks. All portfolios should have some portion of cash or cash equivalents for an emergency fund, for shorter-term purchases, and/or for sleeping well at night. However, if you hold cash in the stock portion of your portfolio as dry powder, know that you're fighting against the long-term up-and-to-the-right march of stock market returns (including dividends!) while you wait. And no one can predict how long you'll be waiting.

Reason No. 3: Retail comeback stories
Maybe it's watching one too many Rocky movies, but I have traditionally been a sucker for comeback stories. Nowhere is that more apparent than in my purchases of RadioShack and Best Buy in early 2011. In each case, I thought the market was making too much of the "bricks-and-mortar stores are dead in a post-Amazon world" argument.

I used their impressive performances throughout the financial crisis as evidence.

In RadioShack's case, I was dead-wrong. I was catching a ride on the road to bankruptcy. I got out of the stock in late 2012 at an 84% loss.

In Best Buy's case, I was closer to wrong than to dead-wrong when I bought, but I made myself doubly wrong when I sold too early. 

Best Buy sits just a tad higher today than it was four years ago when I bought in ($34 vs. $32), but somewhere along the way I sold near $12, saying "It's time to end my mistakes on both Best Buy and RadioShack. Holding on to them further would simply be speculation on my part."

Sounds logical in theory, but I also sold at pretty much the low point in Best Buy stock in the past five years.

Either way, though, it really didn't matter what I did after I made the choice to buy the wrong comeback stories. 

My practical advice for you: Contrast my experience bottom feeding with someone who buys stock in a quality company. For a truly quality company that's built for the long term, it's pretty hard to overpay if you hold long enough. To use Best Buy and RadioShack enemy Amazon as an example, think about someone who bought at the height of the tech bubble. Yes, their investment would have declined to less than a tenth of its original value, but if they held on, they'd have about four times their money.  Meanwhile, I'm wishing I could have broken even on Best Buy in a rising market. 

Let's take heart in the words of Rocky, though: "If I can change, and you can change, everybody can change!"

Reason No. 4: Buying stocks to prove you're right
George Soros has said, "It's not whether you're right or wrong that's important, but how much money you make when you're right and how much you lose when you're wrong."

Unfortunately, I often care too much about the former. If a stock I buy beats the market by a percent or two over the course of a few years, I feel justified. If I lose to it by a percent or two, I'm crestfallen. In reality, though, they're effectively the same result. The middling-result stocks don't do much for your overall returns versus the market -- it's the stocks that approach zero that kill you and the stocks that turn into multibaggers that turboboost your portfolio.

When I look back at my picks, stocks like National Presto, Staples, and Ford didn't set me up for multibagger glory. Instead, my upside was probably slightly beating the market and my downside was considerably worse.

But my ego wanted to be right on that special-dividend-paying little engine that could National Presto, that surprising Internet retailing play Staples, and that up-from-the-mat Ford.

My money would have been better spent on a low-cost index ETF. 

My practical advice for you: Beyond the obvious advice to be as dispassionate as possible, one question that can help is asking yourself how comfortable you'd be holding the company's stock for 20 years. If you get really uncomfortable thinking about that, maybe that company isn't a potential multibagger and/or is a likely candidate to get smoked by the market. 

Reason No. 5: Not Buying Bank of America stock at $5
Unintentionally, Bank of America (NYSE:BAC) was in my first batch of purchases in 2010 and my last batch in 2015. 

I even bought it once in between. 

Each time, I bought shares at double-digit prices: $11, $11, and $15 (vs. today's share price around $17).

But when it fell to $5 in late 2011, I sat still.

Don't get me wrong. I was still bullish, and I didn't come close to selling. However, I was worried about overweighting my still-small portfolio with the shares of one bank stock. And a lower-quality one that I'd already bought two slugs of at that.

Normally, I stick to banks with high-quality metrics, but I made exceptions for some too-big-to-fail banks based on the implicit government safety net and the bargain-basement pricing.The chief examples were B of A and Citigroup.

I could argue that I was practicing judicious self-control, but that's refuted by the fact that I later bought more shares at three times the share price, albeit once my portfolio was larger. 

We'll very rarely catch the bottom of a stock, but what I would have preferred to see from myself is waiting to buy that second position at a price at least 20% lower than I bought my first shares at.

My practical advice for you: This one's tough because I don't know what kind of investor you are. If you're exceptionally skilled, then many would argue that you should put outsized money behind just a few ideas. On the other hand, diversification has saved many an investor who overestimated their abilities.

One simple way to both save you from yourself and to track your performance versus the market is to open two stock accounts, one 100% in a broad, low-cost index fund like the Vanguard Total World Stock ETF and one using whatever strategy you'd like. Doing so will allow you to easily track your returns versus the market -- even without The Motley Fool doing it for you. 

On to the next five years...
So there you go. These five mistakes have helped keep me from beating the market these last five years. Hopefully my sharing this will help you avoid some of them from now till 2020 and beyond.

Fool on and good luck!

Editor's note: The Motley Fool launched its Rising Stars Portfolios program in late 2010. Twenty-five analysts took part in this endeavor, investing hundreds of thousands of dollars of The Motley Fool’s money in hundreds of stock ideas. With the analyst tally in the program now called Real-Money Stock Picks down to four, the Fool has decided to close the remaining portfolios. It's a logistical decision and no reflection on the analysts or their stock ideas.

The Fool will keep some stocks chosen by the analysts in a Robert Kirby-like Coffee Can Portfolio. We're going to hold them, for a long time, without checking in, without trading. We count the Real-Money Stock Picks program a success in our mission to help the world invest better. 

Sept. 18, 2017: The Motley Fool intended to hold some Real-Money Stock Picks stocks, but this turned out to be a logistical burden, so the stocks were sold.