residence has the same meaning as when used in section 121. (4) Certified historic structure (A) In general The term certified historic structure means any building (and its structural components) which— (i) is listed in the National Register, or (ii) is located in a registered historic district (as defined in section 47(c)(3)(B)) and is certified by the Secretary of the Interior as being of historic significance to the district. (5) Rehabilitation not complete before certification A rehabilitation shall not be treated as complete before the date of the certification referred to in subsection (c). (6) Tenant-stockholder in cooperative housing corporation If the taxpayer holds stock as a tenant-stockholder (as defined in section 216) in a cooperative housing corporation (as defined in such section), such stockholder shall be treated as owning the house or apartment which the taxpayer is entitled to occupy as such stockholder. (e) Carryforward of unused credit If the credit allowable under subsection (a) exceeds the limitation imposed by section 26(a) for the taxable year reduced by the sum of the credits allowable under this subpart (other than this section and sections 25D and 1400C), such excess shall be carried to each of the 5 succeeding taxable years and, subject to rules similar to the rules of section 39(a)(2), shall be added to the credit allowable by subsection (a) for such succeeding taxable year. (f) When expenditures taken into account Qualified rehabilitation expenditures shall be treated for purposes of this section as made— (1) on the date the rehabilitation is completed, or (2) to the extent provided by the Secretary by regulation, when such expenditures are properly chargeable to capital account. Regulations under paragraph (2) shall include a rule similar to the rule under section 50(a)(2) (relating to recapture if property ceases to qualify for progress expenditures). (g) Recapture (1) In general If, before the end of the 5-year period beginning on the date on which the rehabilitation of the