Tax-loss harvesting is all about finding losers in your investment portfolio to offset winners so you pay less tax.

That is not easy in a year when the S&P 500 is up 26%.

Conventional wisdom is to put this financial task on your to-do list in December, but this year, you need to think a bit broader and more long-term.

At year-end, you need to mostly be concerned with your holdings in brokerage accounts. But to keep everything balanced holistically and your tax efficiency maximized, you need to consider your tax-deferred accounts too, like IRAs and 401(k)s.

For instance, consider weighting your tax-deferred accounts more heavily toward the dividend as well as other yield-producing elements in your portfolio, because when they generate income you will not get taxed right now.

That leaves you free to hold more growth positions — like exchange-traded index or sector funds — in taxable accounts. ETFs do not distribute capital gains as frequently as traditional mutual funds do, and therefore are more tax-efficient.

Individual investors or their advisers need to monitor how markets fare throughout the year to make sure portfolios are staying on track, looking for market and sector dips driven by the news or other macroeconomic factors, and then sell losers as you go.

"In March, there were a couple of presidential candidates talking about health care, and that drove health care stocks down. So we captured that," said Robert Holderith, CEO of Green Harvest Asset Management in New York.

At the very least, advisers say to use the end of the year to look over your brokerage statements, even if you do not make moves right away.

The benefit of saving that money is not immediate, but in how it will grow, Holderith added.

If you are behind the 2019 curve, it might actually be impossible to catch up. December might not even be the right time to rebalance or reallocate your portfolio at all, despite these typically being tasks on end-of-year planning lists.

For one thing, if you make trades in December, you will have a tax burden right then and there. If you make your transitions in early January, you delay that tax implication for the next year to the end of 2020.

The good news? If you do move things around in your portfolio, you can now find ways to do it without paying commissions on the trades, as major players like Schwab, Fidelity, E-Trade and TD Ameritrade have moved to zero commissions for most online trades.

Beth Pinsker writes for Reuters.