Every year as spring reaches full bloom, investors start hearing about how selling in May can be a better move than simply staying invested throughout the year. But given that the strategy doesn't always work, is it worth giving up on a long-term investing plan to take a six-month break from the stock market? Let's take a look at how the strategy has fared recently for the Dow Jones Industrials (^DJI 0.48%) and then take a broader look at why seasonal strategies can be more costly than you'd expect.

"Sell in May" has done well lately
The way the strategy works is simple: It has you sell off your stock exposure at the beginning of May and stay out of the market until the end of October. Then you buy stocks at the beginning of November and hold them until the end of April.

Over the past few years, the strategy has done pretty well. As of yesterday's close, the Dow had risen more than 12% since the end of October, while the Dow fell 1% from May to October 2012. Both of the two previous years, stocks gained more than 10% during the November-to-April period but posted a drop of 3% and a gain of 1%, respectively, in 2011 and 2010's summer months. And although the strategy had you miss out on much of the bounce in 2009, it also kept you out of the market during the initial phase of the market's meltdown in the wake of the financial crisis.

The cost of selling every six months
With the Dow having hit several new all-time record highs in recent months, sell-in-May advocates have a pretty strong argument that 2013 may be another winning year for the strategy. But before you decide that the seasonal approach is for you, it's important to understand the costs involved.

The biggest downside to short-term investing strategies is that you greatly increase the tax costs involved if you use taxable accounts. By selling every six months, all the gains you earn will incur tax at short-term capital gains rates, which can be as much as 20 percentage points higher than what investors pay on long-term gains.

Furthermore, depending on what specific investments you use, repeatedly buying and selling can tack on additional trading costs, such as commissions for buying and selling individual stocks or exchange-traded fund shares. Add in the friction from bid-ask spreads, and depending on the size of your portfolio, you can give up a significant portion of any profits you make using the strategy.

Finally, it's hard to predict which individual stocks will follow the rule. For instance, selling in May last year led you to miss out on nearly 30% gains in Wal-Mart (WMT 0.29%) and a 20% gain in Home Depot (HD 0.45%), and while Home Depot has continued to rise sharply since then, Wal-Mart has trailed the Dow's overall rise since November. Yet Hewlett-Packard (HPQ 0.53%) and Intel (INTC -2.17%) have exhibited classic sell-in-May behavior, rebounding in recent months from last summer's swoon.

Be careful
As the stock market climbs, lightening up on overall exposure through rebalancing your portfolio is actually a smart move right now. But selling everything based on a seasonal strategy is much riskier, and just about the only certainty in doing so is that you'll end up with higher costs.