taxable year, an amount equal to— (i) the capital gain net income for the taxable year determined by taking into account only marked-to-market gains and losses, reduced (but not below zero) by (ii) the aggregate amount of losses from the sale or exchange of capital assets which are not marked-to-market losses. (B) Special rule The net marked-to-market gain for any taxable year before the loss year shall be computed without regard to the net marked-to-market loss for the loss year or for any taxable year thereafter. (6) Coordination with carryforward provisions of subsection (b)(1) (A) Carryforward amount reduced by amount used as carryback For purposes of applying subsection (b)(1)(B), if any portion of the net marked-to-market loss for any taxable year is allowed as a carryback under paragraph (1) to any preceding taxable year, the amount allowed as a carryback shall be treated as a long-term capital gain for the loss year. (B) Carryover loss retains character as attributable to marked-to-market Any amount carried forward as a long-term capital loss to any taxable year under subsection (b)(1)(B) (after the application of subparagraph (A)) shall, to the extent attributable to marked-to-market losses, be treated as marked-to-market loss. (C) Coordination with reduction in net capital loss for credit For purposes of this paragraph and paragraph (4), any reduction in net capital loss under section 492(c)(3) (relating to reduction for credit against tax attributable to deferral recapture amount) shall, except as provided by the Secretary, be applied before the application of such paragraphs. (7) Other definitions and rules For purposes of this subsection— (A) Marked-to-market gains and losses (i) In general The terms marked-to-market gains and marked-to-market losses means, with respect to any applicable taxpayer for any taxable year, gains or losses which are recognized and taken into account by such taxpayer for such taxable year under section 491 by reason of taxable events described in section 491(b)(1) with