year by reason of section 172(g)(1), the taxpayer shall be treated as having elected the application of this subsection for such taxable year. . (c) Conforming amendment Section 172(b)(1) of such Code is amended by inserting and subsection (g) after this paragraph . (d) Regulatory authority The Secretary of the Treasury (or the Secretary’s delegate) shall prescribe such regulations or other guidance as are necessary or appropriate to prevent the abuse of the purposes of the amendments made by this section, including— (1) anti-stuffing rules, anti-churning rules (including rules relating to sale-leasebacks), and rules similar to the rules under section 1091 of the Internal Revenue Code of 1986 relating to losses from wash sales, (2) rules applying this subsection to successor corporations and in cases where a taxpayer becomes, or ceases to be, a member of an affiliated group filing a consolidated return under section 1501 of such Code, (3) rules treating members of an affiliated group filing a consolidated return under section 1501 of such Code as a single corporation, and (4) rules to prevent the avoidance of this section through related parties, pass-through entities, and intermediaries. (e) Special rules Rules similar to the rules of subparagraphs (B) and (D) of section 172(b)(1) of the Internal Revenue Code of 1986, as in effect on the day before the date of the enactment of Public Law 115–97 , shall apply to any net operating loss to which the amendment made by this section applies. The Secretary of the Treasury (or the Secretary’s delegate) shall prescribe such regulations or other guidance as are necessary or appropriate to effect the purposes of such subparagraphs with respect to any such net operating losses. (f) Effective date (1) Net operating loss limitation Except as provided in paragraph (2), the amendments made by subsections (a) shall apply to— (A) taxable years beginning after December 31, 2017, and (B) taxable years beginning on or before December 31, 2017, to which net operating losses arising