TITLE 26 - US CODE - PART III - GENERAL RULES FOR DETERMINING CAPITAL GAINS AND LOSSES

26 USC 1221 - Capital asset defined

(a) In general 
For purposes of this subtitle, the term capital asset means property held by the taxpayer (whether or not connected with his trade or business), but does not include
(1) stock in trade of the taxpayer or other property of a kind which would properly be included in the inventory of the taxpayer if on hand at the close of the taxable year, or property held by the taxpayer primarily for sale to customers in the ordinary course of his trade or business;
(2) property, used in his trade or business, of a character which is subject to the allowance for depreciation provided in section 167, or real property used in his trade or business;
(3) a copyright, a literary, musical, or artistic composition, a letter or memorandum, or similar property, held by
(A) a taxpayer whose personal efforts created such property,
(B) in the case of a letter, memorandum, or similar property, a taxpayer for whom such property was prepared or produced, or
(C) a taxpayer in whose hands the basis of such property is determined, for purposes of determining gain from a sale or exchange, in whole or part by reference to the basis of such property in the hands of a taxpayer described in subparagraph (A) or (B);
(4) accounts or notes receivable acquired in the ordinary course of trade or business for services rendered or from the sale of property described in paragraph (1);
(5) a publication of the United States Government (including the Congressional Record) which is received from the United States Government or any agency thereof, other than by purchase at the price at which it is offered for sale to the public, and which is held by
(A) a taxpayer who so received such publication, or
(B) a taxpayer in whose hands the basis of such publication is determined, for purposes of determining gain from a sale or exchange, in whole or in part by reference to the basis of such publication in the hands of a taxpayer described in subparagraph (A);
(6) any commodities derivative financial instrument held by a commodities derivatives dealer, unless
(A) it is established to the satisfaction of the Secretary that such instrument has no connection to the activities of such dealer as a dealer, and
(B) such instrument is clearly identified in such dealers records as being described in subparagraph (A) before the close of the day on which it was acquired, originated, or entered into (or such other time as the Secretary may by regulations prescribe);
(7) any hedging transaction which is clearly identified as such before the close of the day on which it was acquired, originated, or entered into (or such other time as the Secretary may by regulations prescribe); or
(8) supplies of a type regularly used or consumed by the taxpayer in the ordinary course of a trade or business of the taxpayer.
(b) Definitions and special rules 

(1) Commodities derivative financial instruments 
For purposes of subsection (a)(6)
(A) Commodities derivatives dealer 
The term commodities derivatives dealer means a person which[1] regularly offers to enter into, assume, offset, assign, or terminate positions in commodities derivative financial instruments with customers in the ordinary course of a trade or business.
(B) Commodities derivative financial instrument 

(i) In general The term commodities derivative financial instrument means any contract or financial instrument with respect to commodities (other than a share of stock in a corporation, a beneficial interest in a partnership or trust, a note, bond, debenture, or other evidence of indebtedness, or a section 1256 contract (as defined in section 1256 (b))), the value or settlement price of which is calculated by or determined by reference to a specified index.
(ii) Specified index The term specified index means any one or more or any combination of
(I) a fixed rate, price, or amount, or
(II) a variable rate, price, or amount,

which is based on any current, objectively determinable financial or economic information with respect to commodities which is not within the control of any of the parties to the contract or instrument and is not unique to any of the parties circumstances.

(2) Hedging transaction 

(A) In general 
For purposes of this section, the term hedging transaction means any transaction entered into by the taxpayer in the normal course of the taxpayers trade or business primarily
(i) to manage risk of price changes or currency fluctuations with respect to ordinary property which is held or to be held by the taxpayer,
(ii) to manage risk of interest rate or price changes or currency fluctuations with respect to borrowings made or to be made, or ordinary obligations incurred or to be incurred, by the taxpayer, or
(iii) to manage such other risks as the Secretary may prescribe in regulations.
(B) Treatment of nonidentification or improper identification of hedging transactions 
Notwithstanding subsection (a)(7), the Secretary shall prescribe regulations to properly characterize any income, gain, expense, or loss arising from a transaction
(i) which is a hedging transaction but which was not identified as such in accordance with subsection (a)(7), or
(ii) which was so identified but is not a hedging transaction.
(3) Sale or exchange of self-created musical works 
At the election of the taxpayer, paragraphs (1) and (3) of subsection (a) shall not apply to musical compositions or copyrights in musical works sold or exchanged by a taxpayer described in subsection (a)(3).
(4) Regulations 
The Secretary shall prescribe such regulations as are appropriate to carry out the purposes of paragraph (6) and (7) of subsection (a) in the case of transactions involving related parties.
[1] So in original. Probably should be “who”.

26 USC 1222 - Other terms relating to capital gains and losses

For purposes of this subtitle
(1) Short-term capital gain 
The term short-term capital gain means gain from the sale or exchange of a capital asset held for not more than 1 year, if and to the extent such gain is taken into account in computing gross income.
(2) Short-term capital loss 
The term short-term capital loss means loss from the sale or exchange of a capital asset held for not more than 1 year, if and to the extent that such loss is taken into account in computing taxable income.
(3) Long-term capital gain 
The term long-term capital gain means gain from the sale or exchange of a capital asset held for more than 1 year, if and to the extent such gain is taken into account in computing gross income.
(4) Long-term capital loss 
The term long-term capital loss means loss from the sale or exchange of a capital asset held for more than 1 year, if and to the extent that such loss is taken into account in computing taxable income.
(5) Net short-term capital gain 
The term net short-term capital gain means the excess of short-term capital gains for the taxable year over the short-term capital losses for such year.
(6) Net short-term capital loss 
The term net short-term capital loss means the excess of short-term capital losses for the taxable year over the short-term capital gains for such year.
(7) Net long-term capital gain 
The term net long-term capital gain means the excess of long-term capital gains for the taxable year over the long-term capital losses for such year.
(8) Net long-term capital loss 
The term net long-term capital loss means the excess of long-term capital losses for the taxable year over the long-term capital gains for such year.
(9) Capital gain net income 
The term capital gain net income means the excess of the gains from sales or exchanges of capital assets over the losses from such sales or exchanges.
(10) Net capital loss 
The term net capital loss means the excess of the losses from sales or exchanges of capital assets over the sum allowed under section 1211. In the case of a corporation, for the purpose of determining losses under this paragraph, amounts which are short-term capital losses under section 1212 shall be excluded.
(11) Net capital gain 
The term net capital gain means the excess of the net long-term capital gain for the taxable year over the net short-term capital loss for such year.

For purposes of this subtitle, in the case of futures transactions in any commodity subject to the rules of a board of trade or commodity exchange, the length of the holding period taken into account under this section or under any other section amended by section 1402 of the Tax Reform Act of 1976 shall be determined without regard to the amendments made by subsections (a) and (b) of such section 1402.

26 USC 1223 - Holding period of property

For purposes of this subtitle
(1) In determining the period for which the taxpayer has held property received in an exchange, there shall be included the period for which he held the property exchanged if, under this chapter, the property has, for the purpose of determining gain or loss from a sale or exchange, the same basis in whole or in part in his hands as the property exchanged, and, in the case of such exchanges after March 1, 1954, the property exchanged at the time of such exchange was a capital asset as defined in section 1221 or property described in section 1231. For purposes of this paragraph
(A) an involuntary conversion described in section 1033 shall be considered an exchange of the property converted for the property acquired, and
(B) a distribution to which section 355 (or so much of section 356 as relates to section 355) applies shall be treated as an exchange.
(2) In determining the period for which the taxpayer has held property however acquired there shall be included the period for which such property was held by any other person, if under this chapter such property has, for the purpose of determining gain or loss from a sale or exchange, the same basis in whole or in part in his hands as it would have in the hands of such other person.
(3) In determining the period for which the taxpayer has held stock or securities the acquisition of which (or the contract or option to acquire which) resulted in the nondeductibility (under section 1091 relating to wash sales) of the loss from the sale or other disposition of substantially identical stock or securities, there shall be included the period for which he held the stock or securities the loss from the sale or other disposition of which was not deductible.
(4) In determining the period for which the taxpayer has held stock or rights to acquire stock received on a distribution, if the basis of such stock or rights is determined under section 307 (or under so much of section 1052 (c) as refers to section 113(a)(23) of the Internal Revenue Code of 1939), there shall (under regulations prescribed by the Secretary) be included the period for which he held the stock in the distributing corporation before the receipt of such stock or rights upon such distribution.
(5) In determining the period for which the taxpayer has held stock or securities acquired from a corporation by the exercise of rights to acquire such stock or securities, there shall be included only the period beginning with the date on which the right to acquire was exercised.
(6) In determining the period for which the taxpayer has held a residence, the acquisition of which resulted under section 1034 (as in effect on the day before the date of the enactment of the Taxpayer Relief Act of 1997) in the nonrecognition of any part of the gain realized on the sale or exchange of another residence, there shall be included the period for which such other residence had been held as of the date of such sale or exchange. For purposes of this paragraph, the term sale or exchange includes an involuntary conversion occurring after December 31, 1950, and before January 1, 1954.
(7) In determining the period for which the taxpayer has held a commodity acquired in satisfaction of a commodity futures contract (other than a commodity futures contract to which section 1256 applies) there shall be included the period for which he held the commodity futures contract if such commodity futures contract was a capital asset in his hands.
(8) Any reference in this section to a provision of this title shall, where applicable, be deemed a reference to the corresponding provision of the Internal Revenue Code of 1939, or prior internal revenue laws.
(9) In the case of a person acquiring property from a decedent or to whom property passed from a decedent (within the meaning of section 1014 (b)), if
(A) the basis of such property in the hands of such person is determined under section 1014, and
(B) such property is sold or otherwise disposed of by such person within 1 year after the decedents death,

then such person shall be considered to have held such property for more than 1 year.

(10) If
(A) property is acquired by any person in a transfer to which section 1040 applies,
(B) such property is sold or otherwise disposed of by such person within 1 year after the decedents death, and
(C) such sale or disposition is to a person who is a qualified heir (as defined in section 2032A (e)(1)) with respect to the decedent,

then the person making such sale or other disposition shall be considered to have held such property for more than 1 year.

(11) In determining the period for which the taxpayer has held qualified replacement property (within the meaning of section 1042 (b)) the acquisition of which resulted under section 1042 in the nonrecognition of any part of the gain realized on the sale of qualified securities (within the meaning of section 1042 (b)), there shall be included the period for which such qualified securities had been held by the taxpayer.
(12) In determining the period for which the taxpayer has held property the acquisition of which resulted under section 1043 in the nonrecognition of any part of the gain realized on the sale of other property, there shall be included the period for which such other property had been held as of the date of such sale.
(13) Except for purposes of sections 1202 (a)(2), 1202 (c)(2)(A), 1400B (b), and 1400F (b), in determining the period for which the taxpayer has held property the acquisition of which resulted under section 1045 or 1397B in the nonrecognition of any part of the gain realized on the sale of other property, there shall be included the period for which such other property has been held as of the date of such sale.
(14) If the security to which a securities futures contract (as defined in section 1234B) relates (other than a contract to which section 1256 applies) is acquired in satisfaction of such contract, in determining the period for which the taxpayer has held such security, there shall be included the period for which the taxpayer held such contract if such contract was a capital asset in the hands of the taxpayer.
(15) Cross reference.— 
For special holding period provision relating to certain partnership distributions, see section 735 (b).