Revenue Code of 1986 made after December 31, 2017. 13416. Affordable housing tax credit (a) In general The heading of section 42 is amended by striking Low-income and inserting Affordable . (b) Conforming amendments (1) Subsection (a) of section 42 is amended by striking low-income and inserting affordable . (2) Paragraph (5) of section 38(b) is amended by striking low-income and inserting affordable . (3) The heading of subparagraph (D) of section 469(i)(3) is amended by striking low-income and inserting affordable . (4) The heading of subparagraph (B) of section 469(i)(6) is amended by striking low-income and inserting affordable . (5) Paragraph (7) of section 772(a) is amended by striking low-income and inserting affordable . (6) Paragraph (5) of section 772(d) is amended by striking low-income and inserting affordable . (c) Clerical amendment The item relating to section 42 in the table of sections for subpart D of part IV of subchapter A of chapter 1 is amended to read as follows: Sec. 42. Affordable housing credit. . VI Provisions related to specific entities and industries A Partnership provisions 13501. Treatment of gain or loss of foreign persons from sale or exchange of interests in partnerships engaged in trade or business within the United States (a) In general Section 864(c) is amended by adding at the end the following: (8) Gain or loss of foreign persons from sale or exchange of certain partnership interests (A) In general Notwithstanding any other provision of this subtitle, if a nonresident alien individual or foreign corporation owns, directly or indirectly, an interest in a partnership which is engaged in any trade or business within the United States, gain or loss on the sale or exchange of all (or any portion of) such interest shall be treated as effectively connected with the conduct of such trade or business to the extent such gain or loss does not exceed the amount determined under subparagraph (B). (B) Amount treated as effectively connected The amount determined under this subparagraph