That said, if you can avoid being in a position to where you have to sell an asset at a loss, that will always be to your advantage.
Selling taxable investments for a loss to invest that money in a tax-advantaged account can be a great trade. You save money on your taxes this year, you prevent dividends and capital gains from accruing in a taxable account, and you still increase your overall invested assets.
You had $8,500 last year which you put into a taxable account.
This year it has declined to $5,500 (a $3,000 loss). You sell that 5,500 and put into your IRA. Assuming it was coming out of the 25% bracket (though for this poster I'm thinking it more likely it is coming out of the 15%) you end up with a check from the government for $1,375.00. Moreover, you can deduct the $3,000 loss from your income, again, netting you a check for $750.
3,000-1375-750 = $875.00 loss you have locked in. You can then reinvest the $2125 in tax savings in the taxable account.
So the end result is that without putting any extra cash in, you end up with:
$5,500 in IRA.
$2,125 in taxable.
$7,625 total.
Not bad at all. But it also isn't the whole story. Money is fungible, so that $1,375 you get from the IRA contribution could have been got from any earned income you contributed. And the $750 you got from deducting the loss you only got by realizing the loss. You'll potentially have to pay it back in the future in the form of decreasing your current basis, so it isn't a 100% gain.
At the end of the day, intentionally incuring a loss for the purposes of harvesting the tax savings is nonsense. If you
have to sell the asset then by all means take advantage of the tax deductible event, but better still is to just invest new money. If you were going to be moving fungible assets around anyway, then of course you keep an eye on this strategy to see if you can take advantage of harvesting a loss for tax purposes.
In other words, it's a strategy to optimize a thing you were going to do anyway, not a reason to do a thing you would otherwise not do. The original $3,000 loss is just a paper loss until you actually sell. That you get the consolation prize of $750.00 (potentially more if you weren't going to be able to contribute $5,500 of new money) is poor consolation in the face of the three thousand dollars you just left on the table plus decreasing your cost basis and getting into the habit of solving problems (not enough to contribute to the IRA) by selling assets rather than increasing saving/decreasing expenses.
This is assuming you still value the underlying asset as worth having.