(f) the following new subsection: (g) Special rule for losses from taxable years beginning before January 1, 2018 In the case of a taxable year (hereafter in this subsection referred to as the current year ) to which is carried a net operating loss arising in a taxable year beginning before January 1, 2018, the amount determined under subsection (a) for the current taxable year shall be an amount equal to the sum of— (1) the aggregate amount of such net operating losses carried to the current taxable year, and (2) the lesser of— (A) the aggregate amount of net operating losses arising in taxable years beginning after December 31, 2017, which are carried to the current taxable year, or (B) 80 percent of the excess (if any) of— (i) taxable income computed without regard to the deductions allowable under this section and sections 199A and 250, over (ii) the amount determined under paragraph (1). . (2) Conforming amendment Section 172(b)(2)(C) of such Code is amended to read as follows: (C) be reduced by 20 percent of taxable income computed under section (a)(2) for such prior taxable year (or if subsection (g) applies to such prior taxable year, 20 percent of the excess described in subsection (g)(2)(B) for such year). . (e) Conforming amendments to rules regarding REMICs Section 860E(a)(3)(B) of the Internal Revenue Code of 1986 is amended by striking all that follows for purposes of and inserting subsection (a)(2), and the second sentence of subsection (b)(2), of section 172. . (f) Accelerated refunds In the case of a net operating loss carryback which is allowed for a taxable year by reason of the amendments made by subsections (a) through (e), an application under section 6411(a) of the Internal Revenue Code of 1986 with respect to such carryback shall not fail to be treated as timely filed if filed by the later of— (1) the date which is 4 months after the date of the enactment of this Act, or (2) the date otherwise applicable under section 6411(a) of such Code. (g) Effective date The amendments made by