We’re coming to the close of 2009. It’s been an eventful year, a year of change, and over the next few weeks you’ll be seeing a lot of articles putting it all in perspective.

It’s also the close of the tax year, and year-end planning should be commanding some of your attention. One of the few tools not blunted by this soured economy is tax-loss harvesting—a strategy that can shelter income and reduce portfolio risk. And one might say this has been a banner year for tax losses.

The basic facts: For any tax year there’s an order of offset for gains and losses. Put (somewhat) simply, for federal returns:

• Short-term gains and losses are netted.

• Long-term gains and losses are netted.

• Short-term and long-term gains and losses are netted against each other.

• The remaining losses, if any, are combined and can offset ordinary income to an annual maximum of $3,000.

• Any loss exceeding $3,000 can be carried forward into the next tax year, but you must make sure that the character of the losses (as short-term and/or long-term) is maintained.

• All of this is predicated on your not purchasing a “substantially identical” security within 30 days before or after the sale of the security generating the loss, which is known as a wash sale, and renders the loss nondeductible.

I’m not intending to cover every nuance of the strategy—that’s where your accountant comes in—and I’ve never been a fan of taking losses solely to generate a write-off. The wash-sale rule does prevent much of the “churning” that could happen. But with the current level of market recovery, you may be thinking about rebalancing—and you should remember that rebalancing can not only provide you with an opportunity to reduce risk in your portfolio, but also generate losses that may be useful in offsetting income for this tax year and possibly subsequent ones.