Exhibit 10.6.5

   

  EXECUTION

   

  AMENDMENT NO. 5 TO MASTER REPURCHASE AGREEMENT

   

  Amendment No. 5 to Master Repurchase Agreement, dated as of October 6, 2017 (this “Amendment”), between UBS AG, by and through its branch office
    at 1285 Avenue of the Americas, New York, New York (the “Buyer”) and HOME POINT FINANCIAL CORPORATION (the “Seller”).

   

  RECITALS

   

  The Buyer and the Seller are parties to (a) that certain Master Repurchase Agreement, dated as of October 28, 2015 (as amended by Amendment No. 1, dated
    as of May 4, 2016, Amendment No. 2, dated as of September 15, 2016, Amendment No. 3, dated as of September 28, 2016, and Amendment No. 4, dated as of January 5, 2017 the “Existing Repurchase Agreement”; as amended by this Amendment, the “Repurchase

      Agreement”) and (b) that certain Pricing Letter, dated as of October 28, 2015 (as amended, restated, supplemented or otherwise modified from time to time, the “Pricing Letter”). Capitalized terms used but not otherwise defined herein shall
    have the meanings given to them in the Existing Repurchase Agreement and Pricing Letter, as applicable.

   

  The Buyer and the Seller have agreed, subject to the terms and conditions of this Amendment, that the Existing Repurchase Agreement be amended to
    reflect certain agreed upon revisions to the terms of the Existing Repurchase Agreement.

   

  Accordingly, the Buyer and the Seller hereby agree, in consideration of the mutual promises and mutual obligations set forth herein, that the Existing
    Repurchase Agreement is hereby amended as follows:

   

  SECTION 1. Definitions. Section 2 of the Existing Repurchase Agreement is hereby amended by:

   

  1.1       deleting the definition of “Servicing Term” in its entirety and all references thereto;

   

  1.2       adding the following definitions of “HomePath Mortgage Loan”, “HomePath Renovation Mortgage Loan” and “HomeStyle Renovation
      Mortgage Loan” in their proper alphabetical order:

   

  “HomePath Mortgage Loan” shall mean a Mortgage Loan that is originated in compliance with Fannie Mae’s HomePath mortgage loan program (as such
    program is amended, supplemented or otherwise modified, from time to time).

   

  “HomePath Renovation Mortgage Loan” shall mean a Mortgage Loan that is originated in compliance with Fannie Mae’s HomePath mortgage loan program
    (as such program is amended, supplemented or otherwise modified, from time to time).

   

  “HomeStyle Renovation Mortgage Loan” shall mean a Mortgage Loan that is originated in compliance with Fannie Mae’s HomeStyle Renovation mortgage
    loan program (as such program is amended, supplemented or otherwise modified, from time to time).

   

  
  
    	 	1	 


  

  
     

  

  
   

  SECTION 2. Servicing. Section 15 of the Existing Repurchase Agreement is hereby amended by deleting subsection (c) in its entirety and replacing
    it with the following:

   

  (c)       Seller shall transfer actual servicing of each Purchased Mortgage Loan, together with all of the related Records in its
    possession, to Buyer’s designee and designate Buyer’s designee as the servicer in the MERS System upon the earliest of (i) the occurrence of a Default or Event of Default hereunder, (ii) the termination of Seller as interim servicer by Buyer pursuant
    to this Agreement, or (iii) transfer of servicing to any entity approved by Buyer and the assumption thereof by such entity. Buyer shall have the right to terminate Seller as interim servicer of any of the Purchased Mortgage Loans, which right shall be
    exercisable at any time in Buyer’s sole discretion, upon written notice. Seller’s transfer of the Records and servicing under this Section 15 shall be in accordance with customary standards in the industry and such transfer shall include the transfer
    of the gross amount of all escrows held for the related mortgagors (without reduction for unreimbursed advances or “negative escrows”).

   

  SECTION 3. General Interpretive Principles. Section 35 of the Existing Repurchase Agreement is hereby amended by deleting the reference to
    “Section 1-201(19)” and replacing it with “Section 5-102(7)”.

   

  SECTION 4. Schedule 1 Amendment. Schedule 1 to the Existing Repurchase Agreement is hereby amended by deleting subsections (o) and (fff) in
    their entirety and replacing them with the following:

   

  (o) Full Disbursement of Proceeds. The Mortgage Loan has been closed and, except with respect to, Homestyle Renovation Mortgage
    Loans or HomePath Renovation Mortgage Loans, the proceeds of the Mortgage Loan have been fully disbursed and there is no requirement for future advances thereunder, and any and all requirements as to completion of any on-site or off-site improvement
    and as to disbursements of any escrow funds therefor have been complied with. With respect to Homestyle Renovation Mortgage Loans and HomePath Renovation Mortgage Loans, Seller has made all advances and disbursements in accordance with the terms of the
    Mortgage and/or the terms and conditions of the related mortgage loan program, and such additional amounts have been advanced or disbursed from Seller’s own funds and not from the funds representing any Purchase Price paid by Buyer to Seller hereunder.
    All costs, fees and expenses incurred in making or closing the Mortgage Loan and the recording of the Mortgage were paid, and the Mortgagor is not entitled to any refund of any amounts paid or due under the Mortgage Note or Mortgage. All points and
    fees related to each Mortgage Loan were disclosed in writing to the Mortgagor in accordance with applicable state and federal law and regulation. No Mortgagor was charged “points and fees” (whether or not financed) in an amount that exceeds 3% of the
    total loan amount (or such other applicable limits for lower balance Mortgages) as specified under 12 CFR 1026.43(e)(3), and the points and fees were calculated using the calculation required for qualified mortgages under 12 CFR 1026.32(b) to determine
    compliance with applicable requirements.

   

  
  
    	 	2	 


  

  
     

  

  
   

  (fff) Regarding the Mortgagor. The Mortgagor is one or more natural persons and/or trustees for an Illinois land trust or a trustee
    under a “living trust” or “revocable trust” and such “living trust” or “revocable trust” is in compliance with Fannie Mae or Freddie Mac guidelines, as applicable, for such trusts.

   

  SECTION 5. Condition Subsequent. Within fifteen (15) calendar days of the Amendment Effective Date, Buyer shall have received, satisfactory
    evidence that Uniform Commercial Code Financing Statement (UCC-1) No. 52277733, filed with the Department of Treasury in the State of New Jersey, has been modified, amended or terminated pursuant to a filed UCC-3 in form and substance acceptable to
    Buyer in its sole discretion.

   

  SECTION 6. Conditions Precedent. This Amendment shall become effective as of the date hereof (the “Amendment Effective Date”), subject to
    the satisfaction of the following conditions precedent:

   

  6.1       Delivered Documents. On the Amendment Effective Date, the Buyer shall have received the following documents, each of which shall be
    satisfactory to the Buyer in form and substance:

   

  

  (a)       this Amendment, executed and delivered by the Buyer and Seller;

   

  (b)       Amendment No. 14 to Pricing Letter, executed and delivered by the Buyer and Seller; and

   

  (c)       such other documents as the Buyer or counsel to the Buyer may reasonably request.

   

  SECTION 7. Ratification of Agreement. As amended by this Amendment, the Existing Repurchase Agreement is in all respects ratified and confirmed
    and the Existing Repurchase Agreement as so modified by this Amendment shall be read, taken, and construed as one and the same instrument.

   

  SECTION 8. Representations and Warranties. The Seller hereby represents and warrants to the Buyer that it is in compliance with all the terms
    and provisions set forth in the Repurchase Agreement on its part to be observed or performed, and that no Default or Event of Default has occurred or is continuing, and hereby confirms and reaffirms the representations and warranties contained in
    Section 10 of the Repurchase Agreement. The Seller hereby represents and warrants that this Amendment has been duly and validly executed and delivered by it, and constitutes its legal, valid and binding obligation, enforceable against it in accordance
    with its terms.

   

  SECTION 9. Limited Effect. Except as expressly amended and modified by this Amendment, the Existing Repurchase Agreement shall continue to be,
    and shall remain, in full force and effect in accordance with its terms.

   

  SECTION 10. Severability. Each provision and agreement herein shall be treated as separate and independent from any other provision or agreement
    herein and shall be enforceable notwithstanding the unenforceability of any such other provision or agreement.

   

  
  
    	 	3	 


  

  
     

  

  
    

  SECTION 11. Counterparts. This Amendment may be executed in any number of counterparts, all of which taken together shall constitute one and the
    same instrument, and any of the parties hereto may execute this Amendment by signing any such counterpart. The parties agree that this Amendment, any documents to be delivered pursuant to this Amendment and any notices hereunder may be transmitted
    between them by email and/or by facsimile. Delivery of an executed counterpart of a signature page of this Amendment in Portable Document Format (PDF) or by facsimile shall be effective as delivery of a manually executed original counterpart of this
    Amendment. The original documents shall be promptly delivered, if requested.

   

  SECTION 12. Binding Effect. This Amendment shall be binding upon and inure to the benefit of the parties hereto and their respective successors
    and assigns.

   

  SECTION 13. GOVERNING LAW. THIS AMENDMENT AND ANY CLAIM, CONTROVERSY OR DISPUTE ARISING UNDER OR RELATED TO THIS AMENDMENT, THE RELATIONSHIP
      OF THE PARTIES TO THIS AMENDMENT, AND/OR THE INTERPRETATION AND ENFORCEMENT OF THE RIGHTS AND DUTIES OF THE PARTIES TO THIS AMENDMENT SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE INTERNAL LAWS AND DECISIONS OF THE STATE OF NEW YORK,
      WITHOUT REGARD TO THE CHOICE OF LAW RULES THEREOF. THE PARTIES HERETO INTEND THAT THE PROVISIONS OF SECTION 5-1401 OF THE NEW YORK GENERAL OBLIGATIONS LAW SHALL APPLY TO THIS AMENDMENT. NOTWITHSTANDING ANYTHING TO THE CONTRARY, THE EFFECTIVENESS,
      VALIDITY AND ENFORCEABILITY OF ELECTRONIC CONTRACTS, OTHER RECORDS, ELECTRONIC RECORDS AND ELECTRONIC SIGNATURES USED IN CONNECTION WITH ANY ELECTRONIC TRANSACTION BETWEEN BUYER AND SELLER SHALL BE GOVERNED BY E-SIGN.

   

  [SIGNATURE PAGES FOLLOW]

   

  
  
    	 	4	 


  

  
     

  

  
   

  IN WITNESS WHEREOF, the Buyer and the Seller have caused their names to be signed hereto by their respective officers thereunto duly authorized as of
    the date first above written.

   

  	 	UBS AG, BY AND THROUGH ITS BRANCH OFFICE AT 1285 AVENUE OF THE AMERICAS, NEW YORK, NEW YORK,
	 	as Buyer
	 	 	 
	 	By:	/s/ Ari Lash
	 	 	Name: Ari Lash
	 	 	Title: Executive Director
	 	 	 
	 	By:	/s/ Hye-Eun Cheong
	 	 	Name: Hye-Eun Cheong
	 	 	Title: Director
	 	 
	 	HOME POINT FINANCIAL CORPORATION, as Seller
	 	 	 
	 	By:	/s/ Howard Nathan
	 	 	Name: Howard Nathan
	 	 	Title: CFO


   

  Signature Page to Amendment No. 5 to Master Repurchase Agreement