EX-10.5



 Exhibit 10.5 

EXECUTION COPY 
  

 
  

GUARANTY 
 by 

PENNYMAC MORTGAGE INVESTMENT TRUST, as guarantor 

Dated as of December 20, 2017 
  

 
  

 







 TABLE OF CONTENTS 

 

							
	 	  	 	  	Page	 
	1.	  	 Defined Terms
	  	 	1	 
			
	2.	  	 Guaranty
	  	 	2	 
			
	3.	  	 Right of Set-off
	  	 	2	 
			
	4.	  	 Subrogation
	  	 	3	 
			
	5.	  	 Amendments, etc. with Respect to the Obligations
	  	 	3	 
			
	6.	  	 Guaranty Absolute and Unconditional
	  	 	3	 
			
	7.	  	 Reinstatement
	  	 	5	 
			
	8.	  	 Payments
	  	 	5	 
			
	9.	  	 Event of Default
	  	 	5	 
			
	10.	  	 Severability
	  	 	5	 
			
	11.	  	 Headings
	  	 	6	 
			
	12.	  	 No Waiver; Cumulative Remedies
	  	 	6	 
			
	13.	  	 Waivers and Amendments; Successors and Assigns; Governing Law
	  	 	6	 
			
	14.	  	 Notices
	  	 	6	 
			
	15.	  	 Jurisdiction
	  	 	6	 
			
	16.	  	 Integration
	  	 	7	 
			
	17.	  	 Acknowledgments
	  	 	7	 

  







 GUARANTY 

This GUARANTY, dated as of December 20, 2017 (as may be amended, restated, supplemented or otherwise modified from time to time, this
“Guaranty”), is made by PENNYMAC MORTGAGE INVESTMENT TRUST (“Guarantor”), in favor of PMT ISSUER TRUST—FMSR, a statutory trust organized under the laws of Delaware (the “Buyer”). 

RECITALS 
 WHEREAS,
pursuant to the Master Repurchase Agreement, dated as of December 20, 2017 (as may be amended, restated, supplemented or otherwise modified from time to time, the “PC Repurchase Agreement”), among PENNYMAC CORP. (the
“Seller”), Guarantor and Buyer, Buyer has agreed from time to time to enter into Transactions with Seller. It is a condition precedent to the obligation of Buyer to enter into Transactions with Seller under the PC Repurchase
Agreement that Guarantor shall have executed and delivered this Guaranty to Buyer; 
 WHEREAS, as a condition precedent to entering into the
PC Repurchase Agreement, the Guarantor is required to execute and deliver this Guaranty; 
 WHEREAS, the Guarantor will receive a benefit,
either directly or indirectly from the Seller for entering into this Guaranty; and 
 WHEREAS, pursuant to the Base Indenture, dated as of
December 20, 2017, among the Buyer, as issuer, the Seller, as servicer and as administrator, Citibank, N.A., as indenture trustee (in such capacity, the “Indenture Trustee”), calculation agent, paying agent and securities
intermediary and Credit Suisse First Boston Mortgage Capital LLC, as an administrative agent (together with all schedules and exhibits thereto, as may be amended, restated, supplemented or otherwise modified from time to time, the “Base
Indenture,” and collectively with each supplement to the Base Indenture executed and delivered in conjunction with the issuance of the related Series of Notes, including the schedules and exhibits thereto, the “Indenture”),
Buyer will grant to the Indenture Trustee for the benefit and security of the holders of the notes issued under the Indenture (the “Noteholders”) and the Indenture Trustee, in its individual capacity (the Noteholder and the
Indenture Trustee, together, the “Secured Parties”), a security interest in all its right, title and interest in and to the PC Repurchase Agreement and this Guaranty. 

NOW, THEREFORE, in consideration of the foregoing premises, to induce Buyer to enter into the PC Repurchase Agreement and to enter into
Transactions thereunder, Guarantor hereby agrees with Buyer, as follows: 
 1. Defined Terms. (a) Unless otherwise defined
herein, terms which are defined in the PC Repurchase Agreement and used herein are so used as so defined. 







 (b) For purposes of this Guaranty, “Obligations” shall mean all obligations and
liabilities of Seller to Buyer, whether direct or indirect, absolute or contingent, due or to become due, or now existing or hereafter incurred, which may arise under, or out of or in connection with the PC Repurchase Agreement and any other Program
Agreements and any other document made, delivered or given in connection therewith or herewith, whether on account of principal, interest, reimbursement obligations, fees, indemnities, costs, expenses (including, without limitation, all fees and
disbursements of counsel to Buyer that are required to be paid by Seller pursuant to the terms of the Program Agreements and costs of enforcement of this Guaranty reasonably incurred) or otherwise. 

2. Guaranty. (a) Guarantor hereby unconditionally and irrevocably guarantees to Buyer the prompt and complete payment and
performance by Seller when due (whether at the stated maturity, by acceleration or otherwise) of the Obligations. 
 (b) Guarantor further
agrees to pay any and all expenses (including, without limitation, all fees and disbursements of counsel) which may be paid or incurred by Buyer in enforcing, or obtaining advice of counsel in respect of, any rights with respect to, or collecting,
any or all of the Obligations and/or enforcing any rights with respect to, or collecting against, Guarantor under this Guaranty. This Guaranty shall remain in full force and effect until the later of (i) the termination of the PC Repurchase
Agreement and (ii) the Obligations are paid in full, notwithstanding that from time to time prior thereto Seller may be free from any Obligations. 

(c) No payment or payments made by Seller or any other Person or received or collected by Buyer from Seller or any other Person by virtue of
any action or proceeding or any set-off or appropriation or application, at any time or from time to time, in reduction of or in payment of the Obligations shall be deemed to modify, reduce, release or
otherwise affect the liability of Guarantor hereunder which shall, notwithstanding any such payment or payments, remain liable for the amount of the outstanding Obligations until the outstanding Obligations are paid in full. 

(d) Guarantor agrees that whenever, at any time, or from time to time, Guarantor shall make any payment to Buyer on account of
Guarantor’s liability hereunder, Guarantor will notify Buyer in writing that such payment is made under this Guaranty for such purpose. 

3. Right of Set-off. Buyer is hereby irrevocably authorized at any time and from time to time
without notice to Guarantor, any such notice being hereby waived by Guarantor, to set-off and appropriate and apply any and all monies and other property of Guarantor, 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 of any
Affiliate thereof to or for the credit or the account of Guarantor, or any part thereof in such amounts as Buyer may elect, on account of the Obligations and liabilities of Guarantor hereunder and claims of every nature and description of Buyer
against Guarantor, in any currency, whether arising hereunder, under the PC Repurchase Agreement or otherwise, as Buyer may elect, whether or not Buyer has made any demand for payment and although such Obligations and liabilities and claims may be
contingent or unmatured. Buyer shall notify Guarantor promptly of any such set-off and the application made by Buyer, provided that the failure to give such notice shall not affect the validity of such set-off and application. The rights of Buyer under this paragraph are in addition to other rights and remedies (including, without limitation, other rights of set-off) which
Buyer may have. 

  
 -2- 








 4. Subrogation. Notwithstanding any payment or payments made by Guarantor hereunder or any
set-off or application of funds of Guarantor by Buyer, Guarantor shall not be entitled to be subrogated to any of the rights of Buyer against Seller or any other guarantor or any collateral security or
guarantee or right of offset held by Buyer for the payment of the Obligations, nor shall Guarantor seek or be entitled to seek any contribution or reimbursement from Seller or any other guarantor in respect of payments made by Guarantor hereunder,
until all amounts owing to Buyer by Seller on account of the Obligations are paid in full and the PC Repurchase Agreement is terminated. If any amount shall be paid to Guarantor on account of such subrogation rights at any time when all of the
Obligations shall not have been paid in full, such amounts shall be held by Guarantor for the benefit of Buyer, segregated from other funds of Guarantor, and shall, forthwith upon receipt by Guarantor, be turned over to Buyer in the exact form
received by Guarantor (duly indorsed by Guarantor to Buyer, if required), to be applied against the Obligations, whether matured or unmatured, in such order as Buyer may determine. 

5. Amendments, etc. with Respect to the Obligations. Guarantor shall remain obligated hereunder notwithstanding that, without any
reservation of rights against Guarantor, and without notice to or further assent by Guarantor, any demand for payment of any of the Obligations made by Buyer may be rescinded by Buyer, and any of the Obligations continued, and the Obligations, or
the liability of any other party upon or for any part thereof, or any collateral security or guarantee therefor or right of offset with respect thereto, may, from time to time, in whole or in part, be renewed, extended, amended, modified,
accelerated, compromised, waived, surrendered or released by Buyer, and the PC Repurchase Agreement, and the other Program Agreements and any other document in connection therewith may be amended, modified, supplemented or terminated, in whole or in
part, pursuant to its terms and as Buyer may deem advisable from time to time, and any collateral security, guarantee or right of offset at any time held by Buyer for the payment of the Obligations may be sold, exchanged, waived, surrendered or
released. Buyer shall have no obligation to protect, secure, perfect or insure any Lien at any time held by it as security for the Obligations or for this Guaranty or any property subject thereto. When making any demand hereunder against Guarantor,
Buyer may, but shall be under no obligation to, make a similar demand on Seller and any failure by Buyer to make any such demand or to collect any payments from Seller or any release of Seller shall not relieve Guarantor of its obligations or
liabilities hereunder, and shall not impair or affect the rights and remedies, express or implied, or as a matter of law, of Buyer against Guarantor. For the purposes hereof “demand” shall include, but is not limited to, the commencement
and continuance of any legal proceedings. 
 6. Guaranty Absolute and Unconditional. (a) Guarantor waives any and all notice of
the creation, renewal, extension or accrual of any of the Obligations and notice of or proof of reliance by Buyer upon this Guaranty or acceptance of this Guaranty; the Obligations, and any of them, shall conclusively be deemed to have been created,
contracted or incurred, or renewed, extended, amended or waived in reliance upon this Guaranty; and all dealings between Seller or Guarantor, on the one hand, and Buyer, on the other, shall likewise be conclusively presumed to have been had or
consummated in reliance upon this Guaranty. Guarantor waives 

  
 -3- 








 
diligence, presentment, protest, demand for payment and notice of default or nonpayment to or upon Seller or the Guaranty with respect to the Obligations. This Guaranty shall be construed as a
continuing, absolute and unconditional guarantee of payment without regard to (i) the validity or enforceability of the PC Repurchase Agreement, the other Program Agreements, any of the Obligations or any collateral security therefor or
guarantee or right of offset with respect thereto at any time or from time to time held by Buyer, (ii) any defense, set-off or counterclaim (other than a defense of payment or performance) which may at
any time be available to or be asserted by Seller against Buyer, or (iii) any other circumstance whatsoever (with or without notice to or knowledge of Seller or Guarantor) which constitutes, or might be construed to constitute, an equitable or
legal discharge of Seller for the Obligations, or of Guarantor under this Guaranty, in bankruptcy or in any other instance. When pursuing its rights and remedies hereunder against Guarantor, Buyer may, but shall be under no obligation, to pursue
such rights and remedies that they may have against Seller or any other Person or against any collateral security or guarantee for the Obligations or any right of offset with respect thereto, and any failure by Buyer to pursue such other rights or
remedies or to collect any payments from Seller or any such other Person or to realize upon any such collateral security or guarantee or to exercise any such right of offset, or any release of Seller or any such other Person or any such collateral
security, guarantee or right of offset, shall not relieve Guarantor of any liability hereunder, and shall not impair or affect the rights and remedies, whether express, implied or available as a matter of law, of Buyer against Guarantor. This
Guaranty shall remain in full force and effect and be binding in accordance with and to the extent of its terms upon Guarantor and their successors and assigns thereof, and shall inure to the benefit of Buyer, and successors, indorsees, transferees
and assigns, until all the Obligations and the obligations of Guarantor under this Guaranty shall have been satisfied by payment in full, notwithstanding that from time to time during the term of the PC Repurchase Agreement Seller may be free from
any Obligations. 
 (b) Without limiting the generality of the foregoing, Guarantor hereby agrees, acknowledges, and represents and warrants
to Buyer as follows: 
 (i) Guarantor hereby waives any defense arising by reason of, and any and all right to assert against
Buyer any claim or defense based upon, an election of remedies by Buyer which in any manner impairs, affects, reduces, releases, destroys and/or extinguishes Guarantor’s (x) subrogation rights, (y) rights to proceed against Seller or
any other guarantor for reimbursement or contribution, and/or (z) any other rights of Guarantor to proceed against Seller, against any other guarantor, or against any other person or security. 

(ii) Guarantor is presently informed of the financial condition of Seller and of all other circumstances which diligent inquiry
would reveal and which bear upon the risk of nonpayment of the Obligations. Guarantor hereby covenants that it will make its own investigation and will continue to keep itself informed of Seller’s financial condition, the status of other
guarantors, if any, of all other circumstances which bear upon the risk of nonpayment and that it will continue to rely upon sources other than Buyer for such information and will not rely upon Buyer for any such information. Absent a written
request for such information by Guarantor to Buyer, Guarantor hereby waives its right, if any, to require Buyer to disclose to Guarantor any information which Buyer may now or hereafter acquire concerning such condition or circumstances including,
but not limited to, the release of or revocation by any other guarantor. 

  
 -4- 








 (iii) Guarantor has independently reviewed the PC Repurchase Agreement and
related agreements and has made an independent determination as to the validity and enforceability thereof, and in executing and delivering this Guaranty to Buyer, Guarantor is not in any manner relying upon the validity, and/or enforceability,
and/or attachment, and/or perfection of any Liens or security interests of any kind or nature granted by Seller or any other guarantor to Buyer, now or at any time and from time to time in the future. 

(iv) Guarantor is not required to register as an “investment company” under the Investment Company Act of 1940, as
amended from time to time. 
 (c) Guarantor hereby covenants that it shall not merge, consolidate, amalgamate, liquidate, wind up or
dissolve itself (or suffer any liquidation, winding up or dissolution) or sell all or substantially all of its assets; provided that Guarantor may merge or consolidate with (i) any wholly owned subsidiary of Guarantor, (ii) any
other Person if Guarantor is the surviving entity, or (iii) with the prior written consent of the Administrative Agent, so long that, in each case, after giving effect thereto, no Default would exist hereunder. 

7. Reinstatement. This Guaranty shall continue to be effective, or be reinstated, as the case may be, if at any time payment, or any
part thereof, of any of the Obligations is rescinded or must otherwise be restored or returned by Buyer upon the insolvency, bankruptcy, dissolution, liquidation or reorganization of Seller or upon or as a result of the appointment of a receiver,
intervenor or conservator of, or trustee or similar officer for, Seller or any substantial part of its property, or otherwise, all as though such payments had not been made. 

8. Payments. Guarantor hereby agrees that the Obligations will be paid to Buyer without set-off
or counterclaim in U.S. Dollars. 
 9. Event of Default. If an Event of Default under the PC Repurchase Agreement shall have occurred
and be continuing, Guarantor agrees that, as between Guarantor and the Buyer, the Obligations may be declared to be due in accordance with the terms of the PC Repurchase Agreement for purposes of this Guaranty notwithstanding any stay, injunction or
other prohibition which may prevent, delay or vitiate any such declaration as against the Seller and that, in the event of any such declaration (or attempted declaration), such Obligations shall forthwith become due by Guarantor for purposes of this
Guaranty. 
 10. Severability. Any provision of this Guaranty which is prohibited or unenforceable in any jurisdiction shall, as to
such jurisdiction, be ineffective to the extent of such prohibition or unenforceability without invalidating the remaining provisions hereof, and any such prohibition or unenforceability in any jurisdiction shall not invalidate or render
unenforceable such provision in any other jurisdiction. 

  
 -5- 








 11. Headings. The paragraph headings used in this Guaranty are for convenience of
reference only and are not to affect the construction hereof or be taken into consideration in the interpretation hereof. 
 12. No
Waiver; Cumulative Remedies. Buyer shall not by any act (except by a written instrument pursuant to Section 13 hereof), delay, indulgence, omission or otherwise be deemed to have waived any right or remedy hereunder or to have acquiesced in
any Default or Event of Default or in any breach of any of the terms and conditions hereof. No failure to exercise, nor any delay in exercising, on the part of Buyer, any right, power or privilege hereunder shall operate as a waiver thereof. No
single or partial exercise of any right, power or privilege hereunder shall preclude any other or further exercise thereof or the exercise of any other right, power or privilege. A waiver by Buyer of any right or remedy hereunder on any one occasion
shall not be construed as a bar to any right or remedy which Buyer would otherwise have on any future occasion. The rights and remedies herein provided are cumulative, may be exercised singly or concurrently and are not exclusive of any rights or
remedies provided by law. 
 13. Waivers and Amendments; Successors and Assigns; Governing Law. None of the terms or provisions
of this Guaranty may be waived, amended, supplemented or otherwise modified except by a written instrument executed by Guarantor and Buyer, provided that any provision of this Guaranty may be waived by Buyer in a letter or agreement executed by
Buyer or by facsimile or electronic transmission from Buyer to the Guarantor. This Guaranty shall be binding upon the personal representatives, successors and assigns of Guarantor and shall inure to the benefit of Buyer and its successors and
assigns. 
 14. Notices. Notices delivered in connection with this Guaranty shall be given in accordance with Section 10.04 of
the PC Repurchase Agreement. 
 15. Governing Law; Jurisdiction; Waivers. 

(a) THIS GUARANTY AND ANY CLAIM, CONTROVERSY OR DISPUTE ARISING UNDER OR RELATED TO OR IN CONNECTION WITH THIS GUARANTY, THE
RELATIONSHIP OF THE PARTIES HERETO, AND/OR THE INTERPRETATION AND ENFORCEMENT OF THE RIGHTS AND DUTIES OF THE PARTIES HERETO WILL BE CONSTRUED IN ACCORDANCE WITH AND GOVERNED BY THE LAWS OF THE STATE OF NEW YORK (WITHOUT REFERENCE TO THE CONFLICT OF
LAW PRINCIPLES THEREOF OTHER THAN SECTIONS 5-1401 AND 5-1402 OF THE NEW YORK GENERAL OBLIGATIONS LAW) AND THE OBLIGATIONS, RIGHTS AND REMEDIES OF THE PARTIES HEREUNDER
SHALL BE DETERMINED IN ACCORDANCE WITH SUCH LAWS. 
 (b) THE GUARANTOR SUBMITS ITSELF AND ITS PROPERTY IN ANY LEGAL ACTION OR PROCEEDING
RELATING TO THIS GUARANTY, OR FOR RECOGNITION AND ENFORCEMENT OF ANY JUDGMENT IN RESPECT THEREOF, TO THE GENERAL JURISDICTION OF THE COURTS OF THE STATE OF NEW YORK SITTING IN THE BOROUGH OF MANHATTAN, THE FEDERAL COURTS OF THE UNITED STATES OF
AMERICA FOR THE SOUTHERN DISTRICT OF NEW YORK, AND APPELLATE COURTS FROM ANY THEREOF; 

  
 -6- 








 (c) THE GUARANTOR CONSENTS THAT ANY SUCH ACTION OR PROCEEDING MAY BE BROUGHT IN SUCH COURTS AND,
TO THE EXTENT PERMITTED BY LAW, WAIVES ANY OBJECTION THAT IT MAY NOW OR HEREAFTER HAVE TO THE VENUE OF ANY SUCH ACTION OR PROCEEDING IN ANY SUCH COURT OR THAT SUCH ACTION OR PROCEEDING WAS BROUGHT IN AN INCONVENIENT COURT AND AGREES NOT TO PLEAD OR
CLAIM THE SAME; 
 (d) THE GUARANTOR AGREES THAT SERVICE OF PROCESS IN ANY SUCH ACTION OR PROCEEDING MAY BE EFFECTED BY MAILING A COPY
THEREOF BY REGISTERED OR CERTIFIED MAIL (OR ANY SUBSTANTIALLY SIMILAR FORM OF MAIL), POSTAGE PREPAID, TO ITS ADDRESS SET FORTH HEREIN OR AT SUCH OTHER ADDRESS OF WHICH EACH OTHER PARTY HERETO SHALL HAVE BEEN NOTIFIED IN WRITING, EXCEPT THAT WITH
RESPECT TO THE INDENTURE TRUSTEE, CALCULATION AGENT, PAYING AGENT AND SECURITIES INTERMEDIARY, SERVICE OF PROCESS MAY ONLY BE MADE AS REQUIRED BY APPLICABLE LAW; 

(e) THE GUARANTOR AGREES THAT NOTHING HEREIN SHALL AFFECT THE RIGHT TO EFFECT SERVICE OF PROCESS IN ANY OTHER MANNER PERMITTED BY LAW OR SHALL
LIMIT THE RIGHT TO SUE IN ANY OTHER JURISDICTION; AND 
 (f) THE GUARANTOR WAIVES, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, ANY
AND ALL RIGHT TO TRIAL BY JURY IN ANY LEGAL PROCEEDING ARISING OUT OF OR RELATING TO THIS GUARANTY OR THE TRANSACTIONS CONTEMPLATED HEREBY. 

16. Integration; Counterparts. This Guaranty represents the agreement of Guarantor with respect to the subject matter hereof and there
are no promises or representations by Buyer relative to the subject matter hereof not reflected herein. This Guaranty may be executed in any number of counterparts, each of which so executed will be deemed to be an original, but all such
counterparts will together constitute but one and the same instrument. Delivery of an executed counterpart of a signature page to this Guaranty by facsimile or other electronic means shall be effective as delivery of a manually executed counterpart
of this Guaranty. 
 17. Third Party Beneficiaries. Each of the Secured Parties and the Administrative Agent shall be a third party
beneficiary of this Guaranty and shall be entitled to enforce the Guarantor’s Obligations hereunder to the same extent as if it was a signatory hereto. 

18. Acknowledgments. Guarantor hereby acknowledges that: 

(a) Guarantor has been advised by counsel in the negotiation, execution and delivery of this Guaranty and the other Program Agreements; 

(b) Buyer does not have any fiduciary relationship to Guarantor, Guarantor does not have any fiduciary relationship to Buyer and the
relationship between Buyer and Guarantor is solely that of surety and creditor; 

  
 -7- 








 (c) no joint venture exists between Buyer and Guarantor or among Buyer, Seller and Guarantor;

 (d) this Guaranty is “a security agreement or arrangement or other credit enhancement” that is “related to” and
provided “in connection with” the PC Repurchase Agreement and each Transaction thereunder and is within the meaning of Sections 101(38A)(A) and 741(7)(A)(xi) of the Bankruptcy Reform Act of 1978, 11 U.S.C. §§ 101 et seq.,
as amended (the “Bankruptcy Code”) and is, therefore to the extent of damages in connection with the PC Repurchase Agreement, measured in accordance with Section 562 of the Bankruptcy Code (i) a “securities
contract” as that term is defined in Section 741(7)(A)(xi) of the Bankruptcy Code and (ii) a “master netting agreement” as that term is defined in Section 101(38A) of the Bankruptcy Code; and 

(e) Buyer’s right to cause the termination, liquidation or acceleration of, or to offset or net termination values, payment amounts or
other transfer obligations arising under or in connection with the PC Repurchase Agreement and this Guaranty is in each case a contractual right to cause the termination, liquidation or acceleration of, or to offset or net termination values,
payment amounts or other transfer obligations arising under or in connection with this Guaranty as described in Sections 362(b)(6), 362(b)(27), 555 and/or 561 of the Bankruptcy Code. 

19. Each of the following events or circumstances shall constitute an “Event of Default” under this Guaranty: 

(a) For any reason, this Guaranty at any time shall not be in full force and effect in all material respects or shall not be enforceable in
all material respects in accordance with its terms, or Guarantor or any Affiliate of Guarantor shall seek to disaffirm, terminate, limit or reduce its obligations hereunder. 

(b) A material breach by Guarantor of the representation or warranty in Section 6(b)(iv) hereof, if not cured within
thirty (30) days following the occurrence of such breach. 
 (c) Breach of the covenant in Section 6(c)
hereof. 
 [Signature page follows] 

  
 -8- 








 IN WITNESS WHEREOF, the undersigned has caused this Guaranty to be duly executed and delivered as of the date
first above written. 
  

					
	 PENNYMAC MORTGAGE INVESTMENT TRUST, as Guarantor

		
	By:	 	/s/ Pamela Marsh
		 	 Name:
	 	 Pamela Marsh

		 	 Title:
	 	 Managing Director, Treasurer



 [Signature Page to PC Repo Guaranty]