Since you didn't pay tax on the income, the government considers that you never actually earned the money you invested. Since you never earned it, as far as the government is concerned, you can't lose it.
Mark
Correct, Mark.
Unless one has taxable investments in stocks or funds, selling for loss recognition is a bad idea. Trying to get a loss deduction for a retirement account is a bad idea.
(Possible for a ROTH or or non-deductible IRA, but you could only get an itemized deduction.) Generally not worthwhile. (Subject to reductions based on income).
If you have non-retirement investments, it is usually a good idea, at least to a limited extent. Long-term capital gains are good. Taxed at a rate lower than ordinary income.
Net long term capital losses are also good, at least up to a net of $3,000, which can offset ordinary income. Any excess over $3,000 net loss can carry forward to offset future gains, but that is not as beneficial usually as offsetting ordinary income (Offsets capital gains first, then ordinary income of up to $3,000/ year.)