Document:

Amendment No. 1 to Amended and Restated Master Repurchase Agreement

 Exhibit 10.38 
 AMENDMENT NO. 1 
 TO AMENDED AND RESTATED 

MASTER REPURCHASE AGREEMENT 
 Amendment No. 1, dated as of June 6, 2012 (this “Amendment”), among CREDIT SUISSE FIRST BOSTON MORTGAGE CAPITAL LLC (the “Buyer”), PENNYMAC CORP. and PENNYMAC
MORTGAGE INVESTMENT TRUST HOLDINGS I, LLC (each a “Seller” and collectively, the “Sellers”) and PENNYMAC MORTGAGE INVESTMENT TRUST (the “Guarantor”). 

RECITALS 

The Buyer, the Sellers and the Guarantor are parties to that certain Amended and Restated Master Repurchase Agreement, dated as of
August 25, 2011 (the “Existing Repurchase Agreement”; and as amended by this Amendment, the “Repurchase Agreement”). The Guarantor is party to that certain Guaranty (the “Guaranty”), dated as
June 8, 2011, as the same may be amended from time to time, by the Guarantor in favor of Buyer. Capitalized terms used but not otherwise defined herein shall have the meanings given to them in the Existing Repurchase Agreement and Guaranty, as
applicable. 
 The Buyer, the Sellers and the Guarantor 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. As a condition precedent to amending the Existing Repurchase Agreement, the Buyer has required the Guarantor to
ratify and affirm the Guaranty on the date hereof. 
 Accordingly, the Buyer, the Sellers and the Guarantor 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 deleting the definition of “Termination Date” in its entirety and replacing it with the
following: 
 “Termination Date” means the earlier of (a) June 5, 2013 and
(b) the date of the occurrence of an Event of Default. 
 SECTION 2. 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: 
 2.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 duly authorized officers of the Buyer, the Sellers and the Guarantor; and

 (b) such other documents as the Buyer or counsel to the Buyer may reasonably
request. 
 SECTION 3. Representations and Warranties. Each Seller hereby represents and warrants to the Buyer that each
Seller is in compliance with all the terms and provisions set forth in the Existing Repurchase Agreement on its part to be observed or performed, and that no Event of Default has occurred and is continuing, and hereby confirms and reaffirms the
representations and warranties contained in Section 13 of the Existing Repurchase Agreement. 
 SECTION 4. 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 and the execution of this Amendment by the Buyer.

 SECTION 5. Counterparts. This Amendment may be executed by each of the parties hereto on any number of separate
counterparts, each of which shall be an original and all of which taken together shall constitute one and the same instrument. 

SECTION 6. GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW
YORK WITHOUT REFERENCE TO THE CHOICE OF LAW PROVISIONS THEREOF. 
 SECTION 7. Reaffirmation of Guaranty. The
Guarantor hereby ratifies and affirms all of the terms, covenants, conditions and obligations of the Guaranty and acknowledges and agrees that the term “Obligations” as used in the Guaranty shall apply to all of the Obligations of the
Sellers to Buyer under the Repurchase Agreement, as amended hereby. 
 [Remainder of page intentionally left blank]

  
 -2-

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

					
	Credit Suisse First Boston Mortgage Capital
LLC, as Buyer
		
	By:	 	/s/ Adam Loskove
		 	Name:   Adam Loskove
		 	Title:   Vice President

  

					
	PennyMac Corp., as a Seller
		
	By:	 	/s/ Brian Stack
		 	Name:   Brian Stack
		 	Title:   Treasurer

  

					
	PennyMac Mortgage Investment Trust Holdings I, LLC, as a Seller
		
	By:	 	/s/ Brian Stack
		 	Name:   Brian Stack
		 	Title:   Managing Director, Treasury

  

					
	PennyMac Mortgage Investment Trust, as
Guarantor
		
	By:	 	/s/ Brian Stack
		 	Name:   Brian Stack
		 	Title:   TreasurerAmended and Restated Mortgage Banking Services Agreement

 Exhibit 10.53 
 AMENDED AND RESTATED 
 MORTGAGE BANKING SERVICES AGREEMENT 

This Amended and Restated Mortgage Banking Services Agreement (the “Agreement”) is entered into by and between PennyMac Loan
Services, LLC, a Delaware limited liability company (the “Service Provider”), and PennyMac Corp., Delaware corporation (the “Company”), and is effective as of November 1, 2010. 

RECITALS 
 WHEREAS, the Company engages in the business of purchasing from correspondent mortgage loan originators (each, a “Correspondent” and, collectively, the “Correspondents”) certain
residential mortgage loans that have been originated in accordance with the Company’s current underwriting criteria; 

WHEREAS, the Service Provider provides mortgage banking services relating to the acquisition and disposition of residential
mortgage loans; 
 WHEREAS, in connection with the Company’s acquisition of such residential mortgage loans, the
Company and the Service Provider entered into that certain Mortgage Banking Services Agreement, dated as of March 1, 2010 (the “Original Agreement”); and 
 WHEREAS, the Company and the Service Provider desire to amend the Original Agreement in certain respects on the terms and conditions set forth herein. 

NOW, THEREFORE, in consideration of the mutual terms, covenants and conditions hereinabove and hereinafter set forth, the Parties
agree as follows: 
  

	1.	Definitions. 

“Borrower” means an individual who obtains a Mortgage Loan from a Correspondent. 

“Customer Information” means any personally identifiable information or records in any form (written, electronic, or otherwise)
relating to a Borrower, including, but not limited to, a Borrower’s name, address, telephone number, loan number, loan payment history, delinquency status, insurance carrier or payment information, tax amount or payment information; the fact
that the Borrower has a relationship with Borrower; and any other Borrower financial information. 
 “Due Date” means
the day of the month on which the Monthly Payment is due on a Mortgage Loan, exclusive of any days of grace. 
 “Escrow
Account” means an account or accounts maintained by the Correspondent or the Correspondent’s subservicer to segregate and hold separately Escrow Payments for the sole and exclusive benefit of the Company. 

“Escrow Payments” means the amounts held in Escrow Accounts for payment of taxes and assessments by special assessment
districts, ground rents, insurance premiums, condo or 

  
 -1-

 
homeowners’ association or planned unit development association dues and similar expenses required to be escrowed by the Borrower pursuant to any Mortgage Loan. 

“Fulfillment Fees” means the dollar amount of the fees, based on a percentage of Par as set forth on Exhibit A, as the
same may be amended from time to time, to be paid by the Company to the Service Provider in consideration for the Fulfillment Services. 
 “Fulfillment Services” has the meaning set forth in Section 2(a) of this Agreement. 
 “Ginnie Mae” means the Government National Mortgage Association and any successor thereto. 
 “Ginnie Mae Mortgage Loan” means a Mortgage Loan underwritten in accordance with the guidelines of Ginnie Mae. 
 “Loan Commitment” means a loan commitment or confirmation issued by the Company to a Correspondent that evidences the intent of the Company to purchase, and the Correspondent to sell, a Mortgage
Loan. 
 “Loan Commitment Price” means the percentage of Par at which the Company has agreed to purchase, and a
Correspondent has agreed to sell, the Mortgage Loan relating to a Loan Commitment. 
 “Loan Purchase Agreement” means
the Mortgage Loan Purchase Agreement in effect as between the Company and a Correspondent, together with the Seller’s Guide and any related Loan Commitments or funding schedules. 

“Monthly Payment” means the scheduled monthly payment of principal and interest on a Mortgage Loan. 

“Mortgage File” means the file containing (a) the mortgage loan application, disclosures and any supporting documentation,
(b) the mortgage, (c) the note, (d) the assignments, if any, and (e) all other files, records and documents necessary to establish the eligibility of the Mortgage Loans for closing and funding. 

“Mortgage Loan” means a consumer purpose, one-to-four family residential loan secured by a Mortgage that the Company has
identified for the Service Provider to provide services hereunder. A Mortgage Loan includes the Mortgage Loan Documents, the Mortgage File, the Monthly Payments, Principal Prepayments, any related Escrow Accounts, the Servicing Rights and all other
rights, benefits, proceeds and obligations arising from or in connection with such Mortgage Loan. 
 “Mortgage Loan
Documents” means the mortgages, notes, assignments and electronic record or copy of a mortgage loan application. 

“Par” means the principal balance of a Mortgage Loan. 
 “Party” or “Parties” means Company and/or Service Provider. 

  
 -2-

 “Principal Prepayment” means any payment or other recovery of principal on a
Mortgage Loan which is received in advance of its scheduled Due Date, including any prepayment penalty or premium thereon, which is not accompanied by an amount of interest representing scheduled interest due on any date or dates in any month or
months subsequent to the month of prepayment. 
 “Purchase Date” means the date on which the Service Provider
purchases a Mortgage Loan from the Company. 
 “Purchase Price” means, with respect to each Ginnie Mae Mortgage Loan,
a dollar amount equal to the sum of (a) Par multiplied by the sum of (i) the Loan Commitment Price and (ii) three (3) basis points, or .0003%, and (b) accrued interest on Par from and including the date on which the Company
purchases the Mortgage Loan from a Correspondent to but excluding the Purchase Date. 
 “Seller’s Guide” means
the PennyMac Seller’s Guide, as amended and supplemented from time to time. 
 “Servicing Rights” means, with
respect to each Mortgage Loan, the right to do any and all of the following: (a) service and administer the Mortgage Loans; (b) collect any payments or monies payable or received for servicing the Mortgage Loans; (c) collect any late
fees, assumption fees, penalties or similar payments with respect to the Mortgage Loans; (d) enforce the provisions of all agreements or documents creating, defining or evidencing any such Servicing Rights and all rights of the Correspondent
thereunder, including, but not limited to, any clean-up calls and termination options; (e) collect and apply any Escrow Payments or other similar payments with respect to the Mortgage Loans; (f) control and maintain all accounts and other
rights to payments related to any of the property described in this paragraph; (g) possess and use any and all Mortgage Files pertaining to the Mortgage Loans or pertaining to the past, present, or prospective servicing of the Mortgage Loans;
and (h) enforce any and all rights, powers and privileges incident to any of the foregoing. 
  

	2.	Mortgage Banking Services. 

 During the term of this Agreement, the Service Provider agrees to provide with respect to each Mortgage Loan various mortgage banking services, including, without limitation, the following: 

 

	 	(a)	fulfillment services (“Fulfillment Services”), which shall include: 

 

	 	i.	reviewing the Mortgage File to ensure it contains all applicable Mortgage Loan Documents; 

 

	 	ii.	reviewing the Mortgage File and Mortgage Loan Documents to ensure that such Mortgage Loan is originated and delivered in accordance with the Seller’s Guide;

  

	 	iii.	reviewing such Mortgage Loan and assessing its marketability for sale and/or securitization into the secondary mortgage market; 

  
 -3-

	 	iv.	capturing specific data from the Mortgage File that is required in order for such Mortgage Loan to be properly serviced; 

 

	 	v.	calculating the final purchase price for such Mortgage Loan based on its review of the Mortgage Loan Documents and then requesting funds and directing payment to the
appropriate party; and 

  

	 	vi.	providing such other services as may be reasonably requested by the Company or otherwise required in connection with the processing of such Mortgage Loan from time to
time; 

 and 
  

	 	(b)	loan acquisition and disposition services, which shall include: 

  

	 	i.	purchasing from the Company at the Purchase Price, on an “as is” basis and without recourse of any kind, any Ginnie Mae Mortgage Loan purchased by the Company
from a Correspondent pursuant to the related Loan Commitment; and 

  

	 	ii.	selling such Ginnie Mae Mortgage Loan for cash or securitizing such Ginnie Mae Mortgage Loan and selling the resulting mortgage-backed security for cash, in either case
at the Take-out Price. 

  

	3.	Fulfillment Fees and Purchase Price. 

 3.1 Fulfillment Fees. In consideration for the Fulfillment Services rendered to the Company by the Service Provider, the Company shall pay the Service Provider, on or before the last business day
of each month, the aggregate Fulfillment Fees relating to all Mortgage Loans (other than Ginnie Mae Mortgage Loans) purchased from a Correspondent by the Company in the prior month. 

3.2 Purchase Price. In consideration for its purchase of a Ginnie Mae Mortgage Loan (including the related Servicing Rights) from
the Company, the Service Provider shall pay the Company, on the Purchase Date, the Purchase Price relating to such Ginnie Mae Mortgage Loan. 
  

	4.	Reporting. 

 On or before the tenth (10th) business day of each month, the Service Provider shall provide the Company with the following: 
  

	 	(a)	a report that identifies all Mortgage Loans purchased from a Correspondent by the Company during the prior month and the related Fulfillment Fees due and payable in
connection therewith; and 

  

	 	(b)	 a report that identifies all Ginnie Mae Mortgage Loans purchased from the Company by the Service Provider during the prior month and the calculation of

  
 -4-

	 	
the Purchase Price for each such Ginnie Mae Mortgage Loan. 

 If the Company
disputes any portion of the Fulfillment Fees or Purchase Prices as set forth in the respective reports, the Parties agree to work in good faith to resolve the issue in a commercially reasonable manner. 

 

	5.	Right to Offset. 

Each Party shall have the right to offset from any amount it owes or is otherwise required to pay to the other Party under any other
agreement with such other Party any amount that the offsetting Party owes or is otherwise required to pay to the other Party under this Agreement. The offsetting Party shall provide the other Party five (5) days written notice of the facts and
circumstances giving rise to the right to offset. If the other Party provides the offsetting Party with evidence disputing such right to offset, the Parties agree to work in good faith to resolve the issue in a commercially reasonable manner.

  

	6.	Privacy and Security of Customer Information. 

 All Customer Information in the possession of the Service Provider other than information independently obtained by the Service Provider is and shall remain confidential and proprietary information of the
Company. The Service Provider shall not disclose any Customer Information to any person or entity except for the purpose of carrying out its obligations under this Agreement. The Service Provider represents and warrants that it has, and will
continue to have for so long as it retains Customer Information, adequate administrative, technical, and physical safeguards (i) to ensure the security and confidentiality of customer records and information, (ii) to protect against any
anticipated threats or hazards to the security or integrity of such records, and (iii) to protect against unauthorized access to or use of such records or information which could result in substantial harm or inconvenience to any customer.

  

	7.	Term and Termination. 

 This Agreement shall commence on the effective date hereof and continue in full force and effect until terminated (i) by either Party upon thirty (30) days written notice to the other;
(ii) by either Party immediately upon the breach of the other Party and such breaching Party’s failure to cure such breach within five (5) days written notice thereof; or (iii) automatically upon the insolvency, bankruptcy or
receivership of either Party hereto. 
  

	8.	Indemnification. 

8.1. By Company. The Company agrees to indemnify the Service Provider (and the Service Provider’s directors, officers,
employees, affiliates, successors and assigns (collectively, the “Service Provider Entities”) against, and hold the Service Provider and each of the Service Provider Entities harmless from, all actual and out-of-pocket losses, damages,
costs and expenses, including attorneys fees, arising out of or resulting from the conduct of its activities hereunder, except to the extent that such losses, costs, expenses and damages result from the Service Provider’s (or its agents or
independent contractors) negligent or willful misconduct. 
 8.2. By Service Provider. The Service Provider agrees
to indemnify the Company (and the Company’s directors, officers, employees, affiliates, successors and assigns 

  
 -5-

 
(collectively, the “Company Entities”) against, and hold the Company harmless from, all actual and out-of-pocket losses, damages, costs and expenses, including attorneys fees, arising
out of or resulting from Service Provider’s (or its agents or independent contractors) negligent or willful misconduct. 
  

	9.	Limitation on Damages. 

 In no event will either Party be entitled to recover special, punitive, incidental or consequential damages, including damages based on lost profits or lost business opportunities, arising out of a breach
of the other Party’s obligations hereunder, even if the Party (or any Company Entities or Service Provider Entities, as the case may be) has been advised of the possibility of such damages. 

 

	10.	Miscellaneous. 

 10.1. Entire Agreement. This Agreement is the final and exclusive statement of all agreements and understandings between the Parties with respect to the subject matter described herein.
There are no other agreements, representations, warranties or conditions other than those contained herein. No change, modification or alteration of this Agreement shall be effective unless in writing and signed by both Parties. 

10.2. Amendment. This Agreement may not be amended except by an instrument in writing signed on behalf of each of the
Parties hereto. 
 10.3. Assignment. No Party may assign its rights and/or obligations hereunder without the prior
written consent of the other Party. 
 10.4. Waiver. No waiver of any term or condition of the Agreement shall be
effective unless made in writing and signed by the Party against whom enforcement of such waiver is sought, and no written waiver shall be deemed or construed to be a waiver of any future or subsequent breach of the term or condition so waived. No
failure or delay by either Party in exercising any right, power or remedy with respect to any of its rights hereunder shall operate as a waiver thereof. 
 10.5. Severability. In the event any provision in this Agreement shall be found by a court to be illegal or unenforceable, such provision shall be reasonably construed and enforced as if it
had been drawn so as not to be invalid, illegal or unenforceable, and the legality and enforceability of the remaining provisions of this Agreement shall not in any way be affected or impaired thereby. 

10.6. Counterparts. The Agreement may be executed simultaneously in any number of counterparts. Each counterpart shall be
deemed to be an original, and all such counterparts shall constitute one and the same instrument. 
 10.7. Further
Assurances. Each Party shall perform all acts and things and make, execute and deliver such written instruments as shall be reasonably necessary to carry out the terms and provisions of this Agreement. 

  
 -6-

 10.8. Attorneys’ Fees. If any Party shall bring an action against the
other by reason of the breach of any covenant, provision or condition of this Agreement, the unsuccessful Party shall pay to the prevailing Party all reasonable attorneys’ fees and costs actually incurred by the prevailing Party and fixed by
the court, in addition to any other relief to which it may be entitled. 
 10.9. Notices. All notices, requests,
demands and other communications hereunder may be given by personal delivery, by overnight courier with confirmation of receipt, by fax or by mail. Notice will be effective upon receipt unless sent by mail in which case it will be effective three
(3) business days after mailing. 
  

			
	If to the Service Provider:	  	PennyMac Loan Services, LLC
		  	Attn: Scott Anderson
		  	Chief Mortgage Operations Officer
		  	27001 Agoura Road, Third Floor
		  	Calabasas, CA 91301
		  	Telephone:        (818) 746-2300
		  	Facsimile:          (818) 224-7397
		  	E-Mail: scott.anderson@pnmac.com
		
	If to the Company:	  	PennyMac Corp.
		  	Attn: Jeff Grogin
		  	Chief Legal Officer and Secretary
		  	27001 Agoura Road, Third Floor
		  	Calabasas, CA 91301
		  	Telephone:        (818) 224-7050
		  	Facsimile:          (818) 224-7397
		  	E-Mail: jeff.grogin@pnmac.com

 Any notice, request, demand, or other communication required or permitted regarding this Agreement shall be in writing to
the address of the Party as listed above, unless the Party has given written notice of a different address in accordance with the provisions of this section. 
 10.10. Governing Law; Venue. This Agreement shall be governed by, construed and enforced in accordance with the laws of the State of California without reference to the choice of law
principles thereof. Venue shall be proper only in Los Angeles County, California, and the Parties to this Agreement consent to the jurisdiction of the courts of the State of California and venue in Los Angeles County, California. 

[Remainder of Page Intentionally Left Blank] 

  
 -7-

 IN WITNESS WHEREOF, the Company and the Service Provider have caused this Agreement
to be executed by their duly authorized representatives, all as of the day and year first above written. 
 SERVICE PROVIDER: 

 

			
	PENNYMAC LOAN SERVICES, LLC
		
	By:	 	/s/ Anne D. McCallion
		 	Name:
		 	Its: VP Finance

 COMPANY: 

 

			
	PENNYMAC CORP.
		
	By:	 	/s/ Anne D. McCallion
		 	Name:
		 	Its: CFO

  
 -8-

 EXHIBIT A 

Fulfillment Fees 
 The
Fulfillment Fee for each Mortgage Loan shall equal the product of (a) the applicable percentage set forth below, multiplied by (b) the aggregate unpaid principal balance of such Mortgage Loan. 

 

											
	 Q4 2010
	 	 Q1 2011
	 	 Q2 2011
	 	 Q3 2011
	 	 Q4 2011
	 	 Q1 2012*

	.50%	 	.50%	 	.50%	 	.30%	 	.30%	 	.25%

  

	*	In the absence of a revised Exhibit A executed by both Parties, this percentage shall be used to calculate all Fulfillment Fees during and after the first fiscal
quarter of 2012. 

  
 A-1

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00206-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00206-of-00352.parquet"}]]