Exhibit 10.2


EXECUTION


 


AMENDMENT NUMBER THIRTEEN


to the


MASTER REPURCHASE AGREEMENT


Dated as of May 24, 2012,


among


PENNYMAC CORP.,


PENNYMAC LOAN SERVICES,
LLC


and


CITIBANK, N.A.


 


This AMENDMENT NUMBER
THIRTEEN (this “Amendment Number Thirteen”) is made this 22nd day of October, 2015, among PENNYMAC CORP. (“Seller”),
PENNYMAC LOAN SERVICES, LLC (“Servicer”) and CITIBANK, N.A. (“Buyer”), to the Master Repurchase
Agreement, dated as of May 24, 2012, among Seller, Servicer and Buyer, as such agreement may be amended from time to time (the
“Agreement”). Capitalized terms used but not otherwise defined herein shall have the meanings assigned to such
terms in the Agreement.


 


RECITALS


 


WHEREAS, Seller has
requested to renew the term of the Agreement and that Buyer agree to amend the Agreement as more specifically set forth herein;
and


 


WHEREAS, as of the
date hereof, Seller represents to Buyer that the Seller Parties are in full compliance with all of the terms and conditions of
the Agreement and each other Program Document and no Default or Event of Default has occurred and is continuing under the Agreement
or any other Program Document.


 


NOW THEREFORE, for
good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, and for the mutual covenants herein
contained, the parties hereto hereby agree as follows:


 


Section
1.Amendment. Effective as of October 22, 2015 (the “Amendment Effective Date”):


 


(a)Section 2 of
the Agreement is hereby amended by deleting the definitions of "Committed Amount" and "Liquidity" in their
entirety and replacing them as follows:


 


“Committed
Amount” shall mean an amount equal to (i) $925,000,000; reduced by (ii) the aggregate outstanding Purchase Price (as
such term is defined in the NPL Repurchase Agreement) of all Loans (as such term is defined in the NPL Repurchase Agreement) then
subject to outstanding Transactions (as such term is defined in the NPL Repurchase Agreement) under the NPL Repurchase Agreement."


 


“Liquidity”
means with respect to any Person, the sum of (i) its unrestricted cash, plus (ii) its unrestricted Cash Equivalents. For the avoidance
of doubt, such unrestricted cash shall not include any cash collateral of such Person in respect of letter of credit obligations
of such Person, and to the extent a letter of credit obligation of such Person is only partially cash collateralized, only that
portion of the letter of credit that represents cash collateral shall be excluded from the definition of Liquidity hereunder.


 






    		 	 



     

    

 


(b)Section 2 of
the Agreement is hereby amended by deleting the definition of "Termination Date" in its entirety and replacing it as
follows:


 


  “Termination Date” shall mean October 20, 2016 or such earlier date on which this Agreement shall terminate in accordance with the provisions hereof or by operation of law.”




 


(c)Section 2 of
the Agreement is hereby amended by adding the definitions of "Citi Repurchase Facility", “Servicer Credit Event"
and “Servicer Termination Event” in the appropriate alphabetical order as follows:


 


“Citi
Repurchase Facility” shall mean each of (i) that Master Repurchase Agreement dated as of December 9, 2010, as amended
("NPL Repurchase Agreement"), among PennyMac Corp., as a seller, PennyMac Holdings, LLC, as a seller, PennyMac Loan
Services, LLC, as servicer and Citibank, N.A., as buyer, and any other Program Document as such term is defined in the
NPL Repurchase Agreement and (ii) that Loan and Security Agreement dated as of March 31, 2015 ("MSR Loan Agreement"),
as amended, among PennyMac Corp., as borrower, and Citibank, N.A., as lender, and any other Facility Document as such term
is defined in the MSR Loan Agreement.


 


“Repurchase
Party” shall mean any of PennyMac Corp., PennyMac Holdings, LLC or PennyMac Mortgage Investment Trust.


 


"Servicer
Credit Event" means Servicer or any Subservicer shall default under, or fail to perform as required under, or
shall otherwise breach the terms of any repurchase agreement (including without limitation any Citi Repurchase Facility),
loan and security agreement, MSFTA/derivatives agreement, or similar credit facility or agreement for borrowed funds
between Servicer on the one hand, and Buyer or any of Buyer's Affiliates on the other; provided, a Servicer
Termination Event shall also constitute a Servicer Credit Event.


 


"Servicer
Termination Event" means (i) an event that entitles the Seller to terminate the Servicer or Subservicer for cause under
the related Servicing Agreement, or (ii) the occurrence of any of the following:


 


(a) Servicer’s
membership in MERS is terminated for cause or Servicer voluntarily terminates its membership in MERS to the extent any Purchased
Loans are MERS Loans;


 


(b) Servicer
fails to deposit any Income received by it into the Collection Account within one (1) Business Day of the date such deposit was
due;


 


(c) Servicer
shall default under any Servicing Agreement and such failure shall not have been waived by Buyer;


 






    		2	 



     

    

 


(d) Servicer
shall cease to be approved by or its approval shall be revoked, suspended, rescinded, halted, eliminated, withdrawn, annulled,
repealed, voided or terminated by (i) Ginnie Mae as an approved issuer, (ii) HUD, pursuant to Sections 203 and 211 of the National
Housing Act, (iii) FHA, as an FHA Approved Mortgagee or servicer, (iv) VA as a VA Approved Lender, (v) Fannie Mae as an approved
seller/servicer or lender, or (vi) Freddie Mac as an approved seller/servicer or lender;


 


(e) All or
a portion of Servicer’s servicing portfolio consisting of Fannie Mae, Freddie Mac or Ginnie Mae loans is seized or the servicing
of all or a portion of such loans is otherwise transferred away from Servicer; or


 


(f) Servicer’s
or Subservicer’s FHA servicing eligibility is suspended, revoked or becomes subject to an investigation by the FHA; or


 


(g) Servicer’s
status as an VA Approved Lender is suspended, revoked or becomes subject to an investigation by the VA.


 


(d)Section 9(b)
of the Agreement is hereby amended by adding Section (9)(b)(xvii) as follows:


 


"(xvii)No
Servicer Credit Event shall have occurred and be continuing."


 


(e)Section 12(p)
of the Agreement is hereby amended by deleting the section in its entirety and replacing it with the following (bold language added
for emphasis):


 


"(p)
Financial Representations and Warranties. (i) (A) the ratio of Seller’s Total Indebtedness to its Adjusted Tangible
Net Worth is not greater than 10:1; (B) Seller’s Liquidity is not less than $10,000,000 as of the last day of the prior calendar
month; and (C) Seller’s Adjusted Tangible Net Worth is greater than or equal to $140,000,000."


 


(ii) [reserved];


 


(iii) (A)
Guarantor’s Adjusted Tangible Net Worth is greater than or equal to $830,000,000; (B) the combined amount of unrestricted
cash of Guarantor and its Subsidiaries is greater than or equal to $40,000,000; (C) the ratio of Guarantor’s Total Indebtedness
to Adjusted Tangible Net Worth is less than 5:1; and (D) Guarantor’s consolidated net income has been equal to or greater
than $1.00 for at least one (1) of the previous two (2) consecutive fiscal quarters, as of the end of the last fiscal quarter.”


 


(f)Section
12 of the Agreement is hereby amended by adding Section 12(kk) as follows:


 


"(kk) Seller has not failed
to enforce its rights under any Servicing Agreement, including without limitation, Seller's right to terminate and replace
Servicer or Subservicer upon the occurrence of a Servicer Termination Event. Seller has not waived any material default
or other material failure to perform under or breach of the Servicing Agreements or any Servicer Termination Event without
Buyer's prior written consent."


 






    		3	 



     

    

 


(g)Section 13(f) of the Agreement
is hereby amended by adding Section 13(f)(xv) as follows:


 


"(xv)One
(1) Business Day following the occurrence of any Servicer Credit Event or Servicer Termination Event."


 


(h)Section 13(q) of the Agreement
is hereby amended by deleting the section in its entirety and replacing it with the following (bold language added for emphasis):


 


"(q)Financial Covenants.


 


(i) Financial
Covenants of Seller. (i) Seller shall comply with the following financial covenants: (A) the ratio of Seller’s Total
Indebtedness to its Adjusted Tangible Net Worth shall not at any time be greater than 10:1; (B) Seller shall maintain Liquidity
as of the last day of the prior calendar month in an amount of not less than $10,000,000; and (C) the Adjusted Tangible Net Worth
of Seller shall at all times be greater than $140,000,000;"


 


(ii) Reserved.


 


(iii)Financial Covenants
of Guarantor. (A) Guarantor’s Adjusted Tangible Net Worth is greater than or equal to $830,000,000; (B) the combined
amount of unrestricted cash of Guarantor and its Subsidiaries is greater than or equal to $40,000,000; (C) the ratio of Guarantor’s
Total Indebtedness to Adjusted Tangible Net Worth is less than 5:1; and (D) Guarantor’s consolidated net income has been
equal to or greater than $1.00 for at least one (1) of the previous two (2) consecutive fiscal quarters, as of the end of the last
fiscal quarter."


 


(i)Section 13 of the Agreement
is hereby amended by adding Section 13(tt) as follows:


 


"(tt) Seller shall diligently
enforce its rights under each Servicing Agreement, including without limitation, Seller's right to terminate and replace Servicer
or Subservicer upon the occurrence of a Servicer Termination Event. Seller shall not waive any material default or other
material failure to perform under or breach of the Servicing Agreements or any Servicer Termination Event without Buyer's
prior written consent. For the avoidance of doubt, any default, failure or breach by the Servicer or any Subservicer that
would permit the termination and replacement of the Servicer or Subservicer under the Servicing Agreements shall be
deemed "material" and shall not be waived by Seller or its Affiliates without Buyer's prior written consent."


 


(j)Section 18 of the Agreement
is hereby amended by deleting Sections 18(r), (t), (u) and (cc) in their entirety and replacing them as follows:


 


(r) Reserved.


 


(t) Reserved.


 






    		4	 



     

    

 


(u) Reserved.


 


(cc) Reserved.


 


(k)Section 18 of the Agreement
is hereby amended by deleting Section 18(w) in its entirety and replacing it with the following:


 


(w)Seller shall cease
to be approved by or its approval shall be revoked, suspended, rescinded, halted, eliminated, withdrawn, annulled, repealed, voided
or terminated by (i) HUD, pursuant to Sections 203 and 211 of the National Housing Act, (ii) FHA, after the date, if any, in which
Seller becomes an FHA Approved Mortgagee or servicer, or (iii) Fannie Mae as an approved seller/servicer or lender; or


 


(l)Section 18 of the
Agreement is hereby amended by deleting Section 18(z) in its entirety and replacing it with the following:


 


(z)All or a portion of
Seller’s or any Guarantor’s servicing portfolio consisting of Fannie Mae, Freddie Mac or Ginnie Mae loans is seized
or the servicing of all or a portion of such loans is otherwise transferred away from Seller or any Guarantor; or


 


(m)Section 18 of the
Agreement is hereby amended by deleting Section 18(ee) in its entirety and replacing it with the following:


 


(ee)After the date, if
any, in which Seller becomes a VA Approved Lender, Seller’s status as an VA Approved Lender is suspended, revoked or becomes
subject to an investigation by the VA; or


 


(n)Section 18(q) of the Agreement
is hereby amended by deleting the section in its entirety and replacing it with the following:


 


(q)Seller
or Guarantor or any Affiliate of Seller or Guarantor or any Repurchase Party shall default under, or fail to perform as required
under, or shall otherwise breach the terms of any repurchase agreement (including without limitation any Citi Repurchase Facility),
loan and security agreement, MSFTA/derivatives agreement, or similar credit facility or agreement for borrowed funds between Seller
or Guarantor or such other entity on the one hand, and Buyer or any of Buyer's Affiliates on the other; or Seller or Guarantor
shall default under, or fail to perform as required under, the terms of any repurchase agreement, loan and security agreement or
similar credit facility or agreement for borrowed funds with outstanding amount at least $10,000,000 (including without limitation
any Citi Repurchase Facility) entered into by such party, which default or failure entitles any party to cause acceleration or
require prepayment of any indebtedness thereunder; or"


 


(o)Section 18 of the Agreement
is hereby amended by adding Section 18(ll) as follows:


 


(ll)A
Servicer Credit Event shall have occurred and Seller shall fail to (i) identify a replacement Servicer or Subservicer to Buyer
within thirty (30) days after the occurrence of such Servicer Credit Event; and (ii) terminate and replace the Servicer or Subservicer
within sixty (60) days, after the occurrence of such Servicer Credit Event;


 






    		5	 



     

    

 


(p)Section 19(b) of the Agreement is hereby amended
by deleting the section in its entirety and replacing it with the following:


 


(b)Seller
hereby acknowledges, admits and agrees that Seller’s obligations under this Agreement are recourse obligations of Seller
to which Seller pledges its full faith and credit. In addition to its rights hereunder, Buyer shall have the right to proceed against
any of Seller’s assets which may be in the possession of Buyer, any of Buyer’s Affiliates or their respective designees
(including Custodian), including the right to liquidate such assets and to set-off the proceeds against monies owed by (x) Seller
to Buyer pursuant to this Agreement and (y) any Repurchase Party to Buyer pursuant to the related Citi Repurchase Facility. Buyer
may set off cash, the proceeds of the liquidation of the Purchased Loans, any other Purchased Items and their proceeds and all
other sums or obligations owed by Buyer, or any of Buyer’s Affiliates, to Seller against all of (i) Seller’s obligations
to Buyer, whether under this Agreement, under a Transaction, or under any other agreement among the parties, or otherwise and (ii)
the obligations of each Repurchase Party to Buyer under the related Citi Repurchase Facility, or under any other agreement among
the parties, or otherwise, in each case whether or not such obligations are then due, without prejudice to Buyer’s right
to recover any deficiency.


 


(q)Section 45 of the Agreement is hereby amended by
deleting the section in its entirety and replacing it with the following:


 


In addition to any rights and remedies
of Buyer provided by this Agreement and by law, Buyer shall have the right, without prior notice to Seller, any such notice
being expressly waived by Seller to the extent permitted by applicable law, upon any amount becoming due and payable by
Seller hereunder (whether at the stated maturity, by acceleration or otherwise) to set-off and appropriate and apply against
such amount any and all Property and deposits (general or special, time or demand, provisional or final), in any currency,
and any other credits, indebtedness or claims, in any currency, in each case whether direct or indirect, absolute or contingent,
matured or unmatured, at any time held or owing by Buyer or any Affiliate thereof to or for the credit or the account of
Seller or any other Repurchase Party. Buyer may set-off cash, the proceeds of the liquidation of any Purchased Items and all
other sums or obligations owed by Buyer or its Affiliates to Seller against all of Seller’s or any Repurchase Party’s
obligations to Buyer or its Affiliates, whether under this Agreement with respect to Seller or the Citi Repurchase Facility
with respect to any Repurchase Party or under any other agreement between the parties or between Seller or any Repurchase
Party and any Affiliate of Buyer, or otherwise, whether or not such obligations are then due, without prejudice to Buyer’s
or its Affiliate’s right to recover any deficiency. Buyer agrees promptly to notify Seller and each Repurchase Party
after any such set-off and application made by Buyer; provided that the failure to give such notice shall not affect the
validity of such set-off and application.


 


Section
2.Fees and Expenses. Seller agrees to pay to Buyer all reasonable out of pocket costs and expenses incurred by
Buyer in connection with this Amendment Number Thirteen (including all reasonable fees and out of pocket costs and expenses of
the Buyer’s legal counsel) in accordance with Sections 23 and 25 of the Agreement.


 






    		6	 



     

    

 


Section
3.Representations. Seller hereby represents to Buyer that as of the date hereof, Seller is in full compliance
with all of the terms and conditions of the Agreement and each other Program Document and no Default or Event of Default has occurred
and is continuing under the Agreement or any other Program Document.


 


Section
4.Binding Effect; Governing Law. This Amendment Number Thirteen shall be binding on and inure to the benefit
of the parties hereto and their respective successors and permitted assigns. THIS AMENDMENT NUMBER THIRTEEN SHALL BE CONSTRUED
IN ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK, WITHOUT GIVING EFFECT TO THE CONFLICT OF LAWS PRINCIPLES
THEREOF (EXCEPT FOR SECTION 5-1401 OF THE NEW YORK GENERAL OBLIGATIONS LAW).


 


Section
5.Counterparts. This Amendment Number Thirteen 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.Limited Effect. Except as amended hereby, the Agreement shall continue in full force and effect in accordance
with its terms. Reference to this Amendment Number Thirteen need not be made in the Agreement or any other instrument or document
executed in connection therewith, or in any certificate, letter or communication issued or made pursuant to, or with respect to,
the Agreement, any reference in any of such items to the Agreement being sufficient to refer to the Agreement as amended hereby.


 


 


 


 


 


 


 


 


 


 



    		7	 



     

    

 


IN WITNESS WHEREOF,
Seller, Servicer and Buyer have caused this Amendment Number Thirteen to be executed and delivered by their duly authorized officers
as of the Amendment Effective Date.


 


 


	 	PENNYMAC CORP.
	 	(Seller)
	 	 	 	 
	 	By:	/s/ Pamela Marsh
	 	Name:	Pamela Marsh
	 	Title:	Executive Vice President, Treasurer



 


	 	PENNYMAC LOAN SERVICES, LLC,
	 	(Servicer)
	 	 	 	 
	 	By:	/s/ Pamela Marsh
	 	Name:	Pamela Marsh
	 	Title:	Executive Vice President, Treasurer
	 	 	 	 
	 	CITIBANK, N.A.
	 	(Buyer)
	 	 	 	 
	 	By: 	/s/ Susan Mills
	 	Name:	Susan Mills
	 	Title:	Vice President
	 	 	 	Citibank, N.A.



 


 


 



    		8