BOSTON (

TheStreet

) -- The bull market that began in March was a relief from the six-month decline that wiped out more than a decade's worth of investment gains. But as the

S&P 500 Index

has surged more than 50% since then, now it's time to consider a tax strategy that can save you thousands.

Apple's

(AAPL) - Get Report

impressive run, for instance, would lose some of its pop after the tax drag. If an investor in the 28% tax bracket purchased Apple on Jan. 1 at $85.35 and sold after the third quarter's earnings announcement at $198.94, a return of 133% would shrink to 96% after taxes.

If the same investor waited until after the new year, he would be better off. Investments held longer than one year are taxed at the long-term capital-gains rate of 15% for those in tax brackets of 15% or higher. Even if Apple tumbled by $15 a share in the intervening time, the investor would still come out on top by waiting. Selling at $183.94 with the long-term capital-gains rate would lead to an after-tax return of 98%, almost 2.5 percentage points more than selling before year-end. That effect would be even more dramatic for investors in a higher tax bracket.

Of course, that's only an issue for investments that produce gains.

General Electric

(GE) - Get Report

,

Wal-Mart

(WMT) - Get Report

and

ExxonMobil

(XOM) - Get Report

have fallen this year. While GE's dividends just about make up for stock-price losses, Exxon and Wal-Mart will produce a chunk of capital losses that investors can use to offset gains in other investments.

Some people think losers should be sold to cover gains to reduce taxes. That could lead to a zero-sum game. Losing investments should only be used in a "loss harvesting" strategy if the investments that generated the losses are no longer a good investment or are out of line with an overall strategy. Otherwise, the sale is simply violating the cardinal rule of investing: buy low, sell high.

Selling the dogs of a portfolio can help protect gains, but be sure not to go overboard. Some may plan on selling a loser in December to harvest losses only to buy it back in January. That ought to be done carefully. Current tax laws have a stipulation that a security sold for a loss cannot be purchased back within 30 days of the sale date, otherwise the loss won't count. So selling to create a loss carries risk since the price of the security sold may rise in price before it can be repurchased. Also, don't forget the addition of transaction costs that make this endeavor even less attractive.

If you plan to rebalance a portfolio that isn't protected in a tax-advantaged account, such as an IRA, consider bolstering positions that have lost money over the year with an additional investment rather than a straight rebalance with existing funds. That would prevent the tax man from getting a hold of some of your gains and up the balance in your investment account with extra cash that may have just disappeared to discretionary purchases if it were left sloshing around in a checking account.

Rather than selling

Microsoft

(MSFT) - Get Report

, which may have been bought with a low cost basis of $19.44 or less, adding to other holdings could protect against a tax loss of as much as $2 a share.

Taxes can be viciously complex and aggravating. Starting to plan now can help make the end of the year a smooth transaction from one tax period to the next. When possible, push tax consequences to the future to allow your investments to grow without losing a chunk to taxes. Also, avoid making portfolio decisions merely to save a few bucks in April. Ditching gems with a low cost basis that have fallen this year could result in regret.

-- Reported by David MacDougall in Boston.

Prior to joining TheStreet.com Ratings, David MacDougall was an analyst at Cambridge Associates, an investment consulting firm, where he worked with private equity and venture capital funds. He graduated cum laude from Northeastern University with a bachelor's degree in finance and is a Level III CFA candidate.