If you invest in the stock market then you probably know that the market has dropped in recent days. As of the end of February of this year, the S&P 500 was down about 12 %, wiping out more than six months of gains. The Russian-Ukraine conflict has given investors additional cause to be worried about further market downturn.

Consider using a strategy called “tax loss harvesting” to hedge your bets and take advantage of tax deductible benefits. Tax loss harvesting is where you sell a stock or portfolio at a loss that you intended to hold long term , and then re-purchase a similar stock or portfolio and hold onto it until the market rebounds. Why would you want to do that? To save money in taxes is the answer. By selling the losing stock, you will realize a capital loss that you can then use to offset against any capital gains that you make when the stock rebounds and thus reduce your taxable income.

There are a couple of “no-nos” you should be aware of if you are thinking of doing this. First, you can’t buy the exact same stock. That’s why I used the word “similar” stock. If you feel positive about the sector that the stock is in, then research and buy a similar stock in that sector, or an ETF in the same sector. Secondly, you can’t do this in a registered account. It only applies to stocks in non-registered accounts.

You can carry back net capital losses for up to three years. If you don’t have capital gains in the current tax year, or the previous three years, then you can carry your losses forward to future tax years.

Always consult a professional tax advisor before implementing a tax loss harvesting strategy.