Some investors wonder, if they limit themselves to just high-quality companies, whether buying and selling stock frequently would be so bad. It's a fine question.

Here's my take on an answer. First off, it's not always easy to discern exactly what is or isn't a high-quality company. And even big, established companies can experience protracted slumps -- in the short-term, you're never guaranteed smooth sailing.

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 sell and buy something else.

We'll assume that you're still bullish on SHHHH, but that you also have high expectations for Claudius's Tye-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 33% tax bracket. That means $3,300 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 likely go to Uncle Sam). Out of the $20,000 of shares you sold, you now have $16,700 to reinvest in TOGAZ. You do so, and within a year, it's doubled and is worth $33,400.

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.

Learn more about how to make sense of financial statements in our "Crack the Code: Read Financial Statements Like a Pro" how-to guide (also known as an online seminar). Feel free to give any of our how-to guides a whirl. More than 90% of those who've taken them have consistently given them high marks -- and besides, we offer a satisfaction guarantee, or your money back.

Longtime Fool contributor Selena Maranjian does not own shares of any companies mentioned in this article.