Traditional IRA contributions can be made if you
have compensation and the amount of the contribution is limited
to the smaller of your compensation and $5500 ($6000 if age 50 or more).
Note that compensation (which generally means earnings from working)
is not just what appears on a W-2 form as salary or wages; it can be
earnings from self-employment too,
as well as commissions, alimony etc (but not earnings from property,
pensions and annuities, certain types of partnership income)
You must also not have attained age 70.5 in the year for which the
contribution is made.
Even if you don't have any compensation of your own, you
can nonetheless make a Traditional IRA contribution if your spouse
has compensation as long as you are filing a joint tax return
with your spouse. For spouses filing a joint return, the
limits are still the same $5500/$6000 for each spouse, and the
sum total of Traditional IRA contributions for both spouses also must
not exceed the sum total of earned income of both spouses.
The age limits etc are all still applicable.
Note that none of this says anything about whether the contributions
are deductible. Everyone meeting the above requirements is eligible
to make contributions to a Traditional IRA; whether the contributions
can be deducted from current income depends on the income:
those with high enough incomes cannot deduct the contribution.
This is different from Roth IRAs to which
people with high incomes are not permitted to make a contribution at all.
Finally, the source of
the cash you contribute to the IRA can be the proceeds of the stock sale
if you like;
you are not required to prove that the cash received from compensation is
what you sent to the IRA custodian.
Read Publication 590 (available on the IRS website www.irs.gov) if you need
an authoritative reference.