(4) Other definitions and special rules For purposes of this subsection— (A) Qualified residence (i) In general The term “qualified residence” means— (I) the principal residence (within the meaning of section 121) of the taxpayer, and (II) 1 other residence of the taxpayer which is selected by the taxpayer for purposes of this subsection for the taxable year and which is used by the taxpayer as a residence (within the meaning of section 280A(d)(1) ). (ii) Married individuals filing separate returns If a married couple does not file a joint return for the taxable year— (I) such couple shall be treated as 1 taxpayer for purposes of clause (i), and (II) each individual shall be entitled to take into account 1 residence unless both individuals consent in writing to 1 individual taking into account the principal residence and 1 other residence. (iii) Residence not rented For purposes of clause (i)(II), notwithstanding section 280A(d)(1), if the taxpayer does not rent a dwelling unit at any time during a taxable year, such unit may be treated as a residence for such taxable year. (B) Special rule for cooperative housing corporations Any indebtedness secured by stock held by the taxpayer as a tenant-stockholder (as defined in section 216) in a cooperative housing corporation (as so defined) shall be treated as secured by the house or apartment which the taxpayer is entitled to occupy as such a tenant-stockholder. If stock described in the preceding sentence may not be used to secure indebtedness, indebtedness shall be treated as so secured if the taxpayer establishes to the satisfaction of the Secretary that such indebtedness was incurred to acquire such stock. (C) Unenforceable security interests Indebtedness shall not fail to be treated as secured by any property solely because, under any applicable State or local homestead or other debtor protection law in effect on August 16, 1986 , the security interest is ineffective or the enforceability of the security interest is restricted. (D) Special rules for estates and trusts For purposes of determining whether any interest paid or accrued by an estate or trust is qualified residence interest, any residence held by such estate or trust shall be treated as a qualified residence of such estate or trust if such estate or trust establishes that such residence is a qualified residence of a beneficiary who has a present interest in such estate or trust or an interest in the residuary of such estate or trust. (E) Qualified mortgage insurance The term “qualified mortgage insurance” means— (i) mortgage insurance provided by the Department of Veterans Affairs, the Federal Housing Administration, or the Rural Housing Service, and (ii) private mortgage insurance (as defined by section 2 of the Homeowners Protection Act of 1998 ( 12 U.S.C. 4901 ), as in effect on the date of the enactment of this subparagraph). (F) Special rules for prepaid qualified mortgage insurance Any amount paid by the taxpayer for qualified mortgage insurance that is properly allocable to any mortgage the payment of which extends to periods that are after the close of the taxable year in which such amount is paid shall be chargeable to capital account and shall be treated as paid in such periods to which so allocated. No deduction shall be allowed for the unamortized balance of such account if such mortgage is satisfied before the end of its term. The preceding sentences shall not apply to amounts paid for qualified mortgage insurance provided by the Department of Veterans Affairs or the Rural Housing Service.