1. Short title This Act may be cited as the Enhancing Credit Opportunities in Rural America Act of 2017 or as the ECORA Act of 2017 . 2. Exclusion for interest on loans secured by agricultural real property (a) In general Part III of subchapter B of chapter 1 of the Internal Revenue Code of 1986 is amended by inserting after section 139F the following new section: 139G. Interest on loans secured by agricultural real property (a) Exclusion Gross income shall not include interest received by a qualified lender on any qualified real estate loan. (b) Definitions For purposes of this section— (1) Qualified lender The term qualified lender means any bank or savings association the deposits of which are insured under the Federal Deposit Insurance Act ( 12 U.S.C. 1811 et seq.). (2) Qualified real estate loan The term qualified real estate loan means any loan secured by agricultural real estate or by a leasehold mortgage (with a status as a lien) on agricultural real estate. For purposes of the preceding sentence, the determination of whether property securing such loan is agricultural real estate shall be made as of the time the interest income on such loan is accrued. (3) Agricultural real estate The term agricultural real estate means— (A) real property which is substantially used for the production of one or more agricultural products, and (B) any single family residence— (i) which is the principal residence (within the meaning of section 121) of its occupant, (ii) which is located in a rural area (as determined by the Secretary of Agriculture), which is not within a Metropolitan Statistical Area (as defined by the Office of Management and Budget) and which has a population (determined on the basis of the most recent decennial census for which data are available) of 2,500 or less, and (iii) which is purchased or improved with the proceeds of the qualified real estate loan. (c) Coordination with section 265 Qualified real estate loans shall be treated as obligations described in section 265(a)(2) the interest on which