Yes. While there are certain ordering rules for applying capital losses against capital gains, ultimately, long-term capital losses can offset any short-term gains.
Compensation for performing personal services. You must have earned income for a deductible IRA or to claim the earned income credit.