A common year-end investment activity is to look for unrealized losses in a taxable portfolio(s), with which to offset year-to-date realized investment gains. These are the gains you were probably happy to take earlier in the year, as you either congratulated yourself for the shrewd stock purchase that had appreciated Taxesor heeded advice to rebalance your portfolio. Perhaps the old saw, “you’ll never go broke taking losses,” or “I don’t mind paying taxes; it means I had gains,” went through your head as you sold the investment. Now, though, you’re reminded that you will have to write a check to pay taxes.

Of course, you know that losses can be taken to offset those gains on a dollar-for-dollar basis. There is the matter of the terms of the transactions: short-term losses offset short-term gains; long-term losses, long-term gains. But the excess of one can offset the other, so that’s not critical.

Realizing these losses is referred to as tax-loss harvesting. By waiting until year-end to harvest losses, however, you’re missing out on a huge opportunity to lower your tax bill. There is no magical time to realize losses; that is, December is no better a month in which to realize gains than is January. Transactions made in December just fall into a different tax year than those made in January. In fact, if one limits loss harvesting to December, 92% (11/12) of opportunities are missed.

To take this one step further, there’s no reason to limit tax-loss harvesting to just enough losses to offset gains. Tax losses unused in one year can be carried forward to the next year and the next year, and capital losses can offset up to $3,000 of current income. I like to refer to this as turning lemons (losses) into lemonade.

Naturally, you’re a wise investor, and your investments are well thought out, so you fully expect your investment to recover to reach your…uhh…intrinsic value estimate. You do make those estimates, right? You don’t have to give up on your investment idea, entirely. The IRS allows you to keep your tax loss and buy back your investment if you wait for 30 days, the so-called Wash Sale period, to repurchase the shares.

One final point is in order. You really don’t want to miss out on any appreciation, if possible, as a gain far more valuable than a loss. So one thing you can do is to temporarily invest the sale proceeds in a proxy investment. For example, realize a loss on a healthcare stock and invest the proceeds in another healthcare sector investment. That way, at least, you will mitigate the risk of missing out on a move in the overall sector of the security. It’s difficult, however, to mitigate the risk of missing out on a security-specific risk. The appreciation attending a drug approval by one company can’t, generally, be captured by investing in another.

There are things an investor can’t do to address this issue. One can’t take a loss in a taxable account and invest in the same security in an IRA without abiding by the wash-sale period. Also, one can’t buy a call option on the security that’s been sold. That’s a no-no, too..

There are a number of other considerations that must be taken into account. You should speak with your financial advisor and your tax professional about tax-loss harvesting and the tax-related rules.