26 U.S.C. § 267 : US Code - Section 267: Losses, expenses, and interest with respect to transactions between related taxpayers

    (a) In general
      (1) Deduction for losses disallowed
        No deduction shall be allowed in respect of any loss from the
      sale or exchange of property, directly or indirectly, between
      persons specified in any of the paragraphs of subsection (b). The
      preceding sentence shall not apply to any loss of the
      distributing corporation (or the distributee) in the case of a
      distribution in complete liquidation.
      (2) Matching of deduction and payee income item in the case of
        expenses and interest
        If - 
          (A) by reason of the method of accounting of the person to
        whom the payment is to be made, the amount thereof is not
        (unless paid) includible in the gross income of such person,
        and
          (B) at the close of the taxable year of the taxpayer for
        which (but for this paragraph) the amount would be deductible
        under this chapter, both the taxpayer and the person to whom
        the payment is to be made are persons specified in any of the
        paragraphs of subsection (b),

      then any deduction allowable under this chapter in respect of
      such amount shall be allowable as of the day as of which such
      amount is includible in the gross income of the person to whom
      the payment is made (or, if later, as of the day on which it
      would be so allowable but for this paragraph). For purposes of
      this paragraph, in the case of a personal service corporation
      (within the meaning of section 441(i)(2)), such corporation and
      any employee-owner (within the meaning of section 269A(b)(2), as
      modified by section 441(i)(2)) shall be treated as persons
      specified in subsection (b).
      (3) Payments to foreign persons
        (A) In general
          The Secretary shall by regulations apply the matching
        principle of paragraph (2) in cases in which the person to whom
        the payment is to be made is not a United States person.
        (B) Special rule for certain foreign entities
          (i) In general
            Notwithstanding subparagraph (A), in the case of any item
          payable to a controlled foreign corporation (as defined in
          section 957) or a passive foreign investment company (as
          defined in section 1297), a deduction shall be allowable to
          the payor with respect to such amount for any taxable year
          before the taxable year in which paid only to the extent that
          an amount attributable to such item is includible (determined
          without regard to properly allocable deductions and qualified
          deficits under section 952(c)(1)(B)) during such prior
          taxable year in the gross income of a United States person
          who owns (within the meaning of section 958(a)) stock in such
          corporation.
          (ii) Secretarial authority
            The Secretary may by regulation exempt transactions from
          the application of clause (i), including any transaction
          which is entered into by a payor in the ordinary course of a
          trade or business in which the payor is predominantly engaged
          and in which the payment of the accrued amounts occurs within
          8 1/2  months after accrual or within such other period as
          the Secretary may prescribe.
    (b) Relationships
      The persons referred to in subsection (a) are:
        (1) Members of a family, as defined in subsection (c)(4);
        (2) An individual and a corporation more than 50 percent in
      value of the outstanding stock of which is owned, directly or
      indirectly, by or for such individual;
        (3) Two corporations which are members of the same controlled
      group (as defined in subsection (f));
        (4) A grantor and a fiduciary of any trust;
        (5) A fiduciary of a trust and a fiduciary of another trust, if
      the same person is a grantor of both trusts;
        (6) A fiduciary of a trust and a beneficiary of such trust;
        (7) A fiduciary of a trust and a beneficiary of another trust,
      if the same person is a grantor of both trusts;
        (8) A fiduciary of a trust and a corporation more than 50
      percent in value of the outstanding stock of which is owned,
      directly or indirectly, by or for the trust or by or for a person
      who is a grantor of the trust;
        (9) A person and an organization to which section 501 (relating
      to certain educational and charitable organizations which are
      exempt from tax) applies and which is controlled directly or
      indirectly by such person or (if such person is an individual) by
      members of the family of such individual;
        (10) A corporation and a partnership if the same persons own - 
          (A) more than 50 percent in value of the outstanding stock of
        the corporation, and
          (B) more than 50 percent of the capital interest, or the
        profits interest, in the partnership;

        (11) An S corporation and another S corporation if the same
      persons own more than 50 percent in value of the outstanding
      stock of each corporation;
        (12) An S corporation and a C corporation, if the same persons
      own more than 50 percent in value of the outstanding stock of
      each corporation; or
        (13) Except in the case of a sale or exchange in satisfaction
      of a pecuniary bequest, an executor of an estate and a
      beneficiary of such estate.
    (c) Constructive ownership of stock
      For purposes of determining, in applying subsection (b), the
    ownership of stock - 
        (1) Stock owned, directly or indirectly, by or for a
      corporation, partnership, estate, or trust shall be considered as
      being owned proportionately by or for its shareholders, partners,
      or beneficiaries;
        (2) An individual shall be considered as owning the stock
      owned, directly or indirectly, by or for his family;
        (3) An individual owning (otherwise than by the application of
      paragraph (2)) any stock in a corporation shall be considered as
      owning the stock owned, directly or indirectly, by or for his
      partner;
        (4) The family of an individual shall include only his brothers
      and sisters (whether by the whole or half blood), spouse,
      ancestors, and lineal descendants; and
        (5) Stock constructively owned by a person by reason of the
      application of paragraph (1) shall, for the purpose of applying
      paragraph (1), (2), or (3), be treated as actually owned by such
      person, but stock constructively owned by an individual by reason
      of the application of paragraph (2) or (3) shall not be treated
      as owned by him for the purpose of again applying either of such
      paragraphs in order to make another the constructive owner of
      such stock.
    (d) Amount of gain where loss previously disallowed
      If - 
        (1) in the case of a sale or exchange of property to the
      taxpayer a loss sustained by the transferor is not allowable to
      the transferor as a deduction by reason of subsection (a)(1) (or
      by reason of section 24(b) of the Internal Revenue Code of 1939);
      and
        (2) after December 31, 1953, the taxpayer sells or otherwise
      disposes of such property (or of other property the basis of
      which in his hands is determined directly or indirectly by
      reference to such property) at a gain,

    then such gain shall be recognized only to the extent that it
    exceeds so much of such loss as is properly allocable to the
    property sold or otherwise disposed of by the taxpayer. This
    subsection applies with respect to taxable years ending after
    December 31, 1953. This subsection shall not apply if the loss
    sustained by the transferor is not allowable to the transferor as a
    deduction by reason of section 1091 (relating to wash sales) or by
    reason of section 118 of the Internal Revenue Code of 1939.
    (e) Special rules for pass-thru entities
      (1) In general
        In the case of any amount paid or incurred by, to, or on behalf
      of, a pass-thru entity, for purposes of applying subsection
      (a)(2) - 
          (A) such entity,
          (B) in the case of - 
            (i) a partnership, any person who owns (directly or
          indirectly) any capital interest or profits interest of such
          partnership, or
            (ii) an S corporation, any person who owns (directly or
          indirectly) any of the stock of such corporation,

          (C) any person who owns (directly or indirectly) any capital
        interest or profits interest of a partnership in which such
        entity owns (directly or indirectly) any capital interest or
        profits interest, and
          (D) any person related (within the meaning of subsection (b)
        of this section or section 707(b)(1)) to a person described in
        subparagraph (B) or (C),

      shall be treated as persons specified in a paragraph of
      subsection (b). Subparagraph (C) shall apply to a transaction
      only if such transaction is related either to the operations of
      the partnership described in such subparagraph or to an interest
      in such partnership.
      (2) Pass-thru entity
        For purposes of this section, the term "pass-thru entity" means
      - 
          (A) a partnership, and
          (B) an S corporation.
      (3) Constructive ownership in the case of partnerships
        For purposes of determining ownership of a capital interest or
      profits interest of a partnership, the principles of subsection
      (c) shall apply, except that - 
          (A) paragraph (3) of subsection (c) shall not apply, and
          (B) interests owned (directly or indirectly) by or for a C
        corporation shall be considered as owned by or for any
        shareholder only if such shareholder owns (directly or
        indirectly) 5 percent or more in value of the stock of such
        corporation.
      (4) Subsection (a)(2) not to apply to certain guaranteed payments
        of partnerships
        In the case of any amount paid or incurred by a partnership,
      subsection (a)(2) shall not apply to the extent that section
      707(c) applies to such amount.
      (5) Exception for certain expenses and interest of partnerships
        owning low-income housing
        (A) In general
          This subsection shall not apply with respect to qualified
        expenses and interest paid or incurred by a partnership owning
        low-income housing to - 
            (i) any qualified 5-percent or less partner of such
          partnership, or
            (ii) any person related (within the meaning of subsection
          (b) of this section or section 707(b)(1)) to any qualified 5-
          percent or less partner of such partnership.
        (B) Qualified 5-percent or less partner
          For purposes of this paragraph, the term "qualified 5-percent
        or less partner" means any partner who has (directly or
        indirectly) an interest of 5 percent or less in the aggregate
        capital and profits interests of the partnership but only if - 
            (i) such partner owned the low-income housing at all times
          during the 2-year period ending on the date such housing was
          transferred to the partnership, or
            (ii) such partnership acquired the low-income housing
          pursuant to a purchase, assignment, or other transfer from
          the Department of Housing and Urban Development or any State
          or local housing authority.

        For purposes of the preceding sentence, a partner shall be
        treated as holding any interest in the partnership which is
        held (directly or indirectly) by any person related (within the
        meaning of subsection (b) of this section or section 707(b)(1))
        to such partner.
        (C) Qualified expenses and interest
          For purpose of this paragraph, the term "qualified expenses
        and interest" means any expense or interest incurred by the
        partnership with respect to low-income housing held by the
        partnership but - 
            (i) only if the amount of such expense or interest (as the
          case may be) is unconditionally required to be paid by the
          partnership not later than 10 years after the date such
          amount was incurred, and
            (ii) in the case of such interest, only if such interest is
          incurred at an annual rate not in excess of 12 percent.
        (D) Low-income housing
          For purposes of this paragraph, the term "low-income housing"
        means - 
            (i) any interest in property described in clause (i), (ii),
          (iii), or (iv) of section 1250(a)(1)(B), and
            (ii) any interest in a partnership owning such property.
      (6) Cross reference
          For additional rules relating to partnerships, see section
        707(b).
    (f) Controlled group defined; special rules applicable to
      controlled groups
      (1) Controlled group defined
        For purposes of this section, the term "controlled group" has
      the meaning given to such term by section 1563(a), except that - 
          (A) "more than 50 percent" shall be substituted for "at least
        80 percent" each place it appears in section 1563(a), and
          (B) the determination shall be made without regard to
        subsections (a)(4) and (e)(3)(C) of section 1563.
      (2) Deferral (rather than denial) of loss from sale or exchange
        between members
        In the case of any loss from the sale or exchange of property
      which is between members of the same controlled group and to
      which subsection (a)(1) applies (determined without regard to
      this paragraph but with regard to paragraph (3)) - 
          (A) subsections (a)(1) and (d) shall not apply to such loss,
        but
          (B) such loss shall be deferred until the property is
        transferred outside such controlled group and there would be
        recognition of loss under consolidated return principles or
        until such other time as may be prescribed in regulations.
      (3) Loss deferral rules not to apply in certain cases
        (A) Transfer to DISC
          For purposes of applying subsection (a)(1), the term
        "controlled group" shall not include a DISC.
        (B) Certain sales of inventory
          Except to the extent provided in regulations prescribed by
        the Secretary, subsection (a)(1) shall not apply to the sale or
        exchange of property between members of the same controlled
        group (or persons described in subsection (b)(10)) if - 
            (i) such property in the hands of the transferor is
          property described in section 1221(a)(1),
            (ii) such sale or exchange is in the ordinary course of the
          transferor's trade or business,
            (iii) such property in the hands of the transferee is
          property described in section 1221(a)(1), and
            (iv) the transferee or the transferor is a foreign
          corporation.
        (C) Certain foreign currency losses
          To the extent provided in regulations, subsection (a)(1)
        shall not apply to any loss sustained by a member of a
        controlled group on the repayment of a loan made to another
        member of such group if such loan is payable in a foreign
        currency or is denominated in such a currency and such loss is
        attributable to a reduction in value of such foreign currency.
        (D) Redemptions by fund-of-funds regulated investment companies
          Except to the extent provided in regulations prescribed by
        the Secretary, subsection (a)(1) shall not apply to any
        distribution in redemption of stock of a regulated investment
        company if - 
            (i) such company issues only stock which is redeemable upon
          the demand of the stockholder, and
            (ii) such redemption is upon the demand of another
          regulated investment company.
      (4) Determination of relationship resulting in disallowance of
        loss, for purposes of other provisions
        For purposes of any other section of this title which refers to
      a relationship which would result in a disallowance of losses
      under this section, deferral under paragraph (2) shall be treated
      as disallowance.
    (g) Coordination with section 1041
      Subsection (a)(1) shall not apply to any transfer described in
    section 1041(a) (relating to transfers of property between spouses
    or incident to divorce).