(1) The Secretary is authorized to enter into an agreement with the purchaser of any loan sold under this part under which the Secretary agrees
(A) to guarantee to such purchaser (and any successor in interest to such purchaser) payment of the principal and interest payable under such loan, and
(B) to pay as an interest subsidy to such purchaser (and any successor in interest of such purchaser) amounts which when added to the amount of interest payable on such loan, are equivalent to a reasonable rate of interest on such loan as determined by the Secretary, after taking into account the range of prevailing interest rates in the private market on similar loans and the risks assumed by the United States.
(2) Any such agreement
(A) may provide that the Secretary shall act as agent of any such purchaser, for the purpose of collecting from the public agency to which such loan was made and paying over to such purchaser, any payments of principal and interest payable by such agency under such loan;
(B) may provide for the repurchase by the Secretary of any such loan on such terms and conditions as may be specified in the agreement;
(C) shall provide that, in the event of any default by the public agency to which such loan was made in payment of principal and interest due on such loan, the Secretary shall, upon notification to the purchaser (or to the successor in interest of such purchaser), have the option to close out such loan (and any obligations of the Secretary with respect thereto) by paying to the purchaser (or his successor in interest) the total amount of outstanding principal and interest due thereon at the time of such notification; and
(D) shall provide that, in the event such loan is closed out as provided in subparagraph (C), or in the event of any other loss incurred by the Secretary by reason of the failure of such public agency to make payments of principal and interest on such loan, the Secretary shall be subrogated to all rights of such purchaser for recovery of such loss from such public agency.