; and (2) Congress should further improve and enhance the low-income housing tax credit by passing the remaining provisions of the Affordable Housing Credit Improvement Act of 2017. 3. Middle-income housing tax credit (a) In general Subpart D of part IV of subchapter A of chapter 1 of the Internal Revenue Code of 1986 is amended by inserting after section 42 the following new section: 42A. Middle-income housing credit (a) In general For purposes of section 38, the amount of the middle-income housing credit determined under this section for any taxable year in the credit period shall be an amount equal to— (1) the applicable percentage of (2) the qualified basis of each qualified middle-income building. (b) Applicable percentage (1) Determination of applicable percentage For purposes of this section— (A) In general The term applicable percentage means, with respect to any building, the appropriate percentage prescribed by the Secretary for the earlier of— (i) the month in which such building is placed in service, or (ii) at the election of the taxpayer, the month in which the taxpayer and the housing credit agency enter into an agreement with respect to such building (which is binding on such agency, the taxpayer, and all successors in interest) as to the housing credit dollar amount to be allocated to such building. A month may be elected under clause (ii) only if the election is made not later than the 5th day after the close of such month. Such an election, once made, shall be irrevocable. (B) Method of prescribing percentages The percentages prescribed by the Secretary for any month shall be percentages which will yield over a 15-year period amounts of credit under subsection (a) which have a present value equal to 50 percent of the qualified basis of a new building. (C) Method of discounting The present value under subparagraph (B) shall be determined— (i) as of the last day of the 1st year of the 15-year period referred to in subparagraph (B), (ii) by using a discount rate equal to 72 percent of the average