A reader asked us: "If I limit myself to just high-quality companies, would buying and selling stocks frequently be so bad?"

Well, first off, it's not always easy to discern what is or isn't a high-quality company. And even big, established names such as Nike and Gap can experience protracted slumps -- in the short term, you're never guaranteed smooth sailing. (Between May 2001 and May 2006, shares of Gap dropped roughly 40%, while Nike shares were around $42 in January of 2000 and were back to that range in January of 2003.)

Let's examine the disadvantages of trading frequently, though. Imagine that you bought $10,000 worth of stock in Sharma's Secret Passwords Inc. (ticker: SHHHH). It was a smart purchase -- within about 10 months, it's doubled, and your shares are worth $20,000. You have a choice. You can continue hanging on, or you can sell and buy something else.

We'll assume that you're still bullish on SHHHH, but that you also have high expectations for Claudius' Tie-Dyed Togas (ticker: TOGAZ). Let's also assume that your expectations are correct -- both will end up doubling within a year! Here are two possible scenarios for you:

A. You hang on to your SHHHH shares and they double, becoming worth $40,000.

B. You sell your $20,000 of SHHHH shares to buy shares of TOGAZ. Let's say that you're in a 31% tax bracket. That means $3,100 of your $10,000 gain will go to our friend Uncle Sam (unless you hold SHHHH for more than a year, in which case 15%, or $1,500, of your gain would go to Uncle Sam). Out of the $20,000 of shares you sold, you now have $16,900 to reinvest in TOGAZ. You do so, and within a year, it's doubled and is worth $33,800.

This should give you an idea of what happens when you trade frequently. The more you trade, the more you surrender in the form of taxes -- and brokerage commissions. If you hang on to shares of a great company for decades, you will eventually sell and pay taxes (unless the shares are in a Roth IRA), but the overall hit will likely be lower than if you'd been steadily trading all along.

Of course, if you think that SHHHH has run its course or you no longer have any faith in its future prospects, then you should sell your shares. And if you think that TOGAZ will grow considerably faster than SHHHH, then selling might be smart, too.

To learn more about investing Foolishly and how the business world works, visit our Fool's School and our Investing Basics area.