Exhibit 10.50

EXECUTION VERSION

AMENDMENT NO. 2

TO AMENDED AND RESTATED

MASTER REPURCHASE AGREEMENT

Amendment No. 2, dated as of March 28, 2013 (this “Amendment”), among CREDIT
SUISSE FIRST BOSTON MORTGAGE CAPITAL LLC (the “Buyer”), PENNYMAC CORP.
(“PennyMac Corp.”) and PENNYMAC MORTGAGE INVESTMENT TRUST HOLDINGS I, LLC
(“PennyMac Holdings”, and together with PennyMac Corp., 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 Amendment No. 1, dated as of June 6,
2012 and 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 add an additional Trust Interest referred to as PENNYMAC CORP Pooled Mortgage
Loan REMIC 2010-3 (“REMIC 2010-3”). 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. Regarding REMIC 2010-3. The parties hereby agree that although
referred to as a Trust Interest for purposes of the Repurchase Agreement, REMIC
2010-3, is a pool of Mortgage Loans and REO Properties that have been identified
as a participation taxable as a REMIC, wherein legal title to the Mortgage Loans
and REO Properties is retained by PennyMac Corp. (as title holder as defined
thereunder, the “Title Holder”) and the Regular Interest (as defined thereunder)
of which is owned by PennyMac Holdings. Accordingly:

1.1 each of PennyMac Corp. and PennyMac Holdings intends to grant a security
interest in their respective interests under the Class A Participation
Certificate as defined in the REMIC Agreement (the “Class A Participation
Certificate”), REMIC Mortgage Loans and the REMIC Agreement;

1.2 all references in the Repurchase Agreement to the Trust Subsidiary owning
Trust Mortgage Loans or REO Properties shall, in the case of REMIC 2010-3, be
deemed to refer to PennyMac Corp. solely in its capacity as the Title Holder
under the REMIC Agreement owning such assets for the benefit of the participants
under the REMIC Agreement, as their interests may appear;

--------------------------------------------------------------------------------

1.3 all references in the Repurchase Agreement to the transfer of Trust Mortgage
Loans or REO Properties to the Trust Subsidiary shall, in the case of REMIC
2010-3, be deemed to be inapplicable;

1.4 all references in the Repurchase Agreement to the Trust Subsidiary taking or
refraining from taking actions shall, in the case of REMIC 2010-3, be deemed to
refer to PennyMac Corp. solely in its capacity as the Title Holder under the
REMIC Agreement taking or refraining from taking such actions on behalf of REMIC
2010-3;

1.5 all references in the Repurchase Agreement to the Trust Subsidiary entering
into any agreements shall, in the case of REMIC 2010-3, be deemed to refer to
PennyMac Corp. solely in its capacity as the Title Holder under the REMIC
Agreement entering into such agreements for the benefit of the REMIC 2010-3;

1.6 all references in the Repurchase Agreement to the Trust Certificates shall,
in the case of REMIC 2010-3, be deemed to refer to the Class A Participation
Certificate;

1.7 all references in the Repurchase Agreement to the Trust Agreement and
organizational documents shall, in the case of REMIC 2010-3, be deemed to refer
to the REMIC Agreement;

1.8 all references in the Repurchase Agreement to the due formation and
authority of the Trust Subsidiaries, shall not apply in the case of REMIC
2010-3; and

1.9 all references in the Repurchase Agreement to a Trust Account or Trust
Account Control Agreement shall, in the case of REMIC 2010-3, be deemed to refer
to the Collection Account and the Collection Account Control Agreement,
respectively.

1.10 For purposes of Section 12(h) of the Repurchase Agreement, the REMIC
Mortgage Loans shall be deemed to be Purchased Mortgage Loans that are conveyed
to Buyer on a “servicing released” basis.

SECTION 2. Definitions.

2.1 Section 2 of the Existing Repurchase Agreement is hereby amended by deleting
the definitions of “Servicing Agreements” and “Trust Subsidiary” each in its
entirety and replacing each with the following:

“Servicing Agreements” means (a) that certain Second Amended and Restated Flow
Servicing Agreement, dated as of March 1, 2013, by and between PennyMac
Operating Partnership, L.P. and PennyMac Loan Services, LLC, (b) that certain
Servicing Agreement, dated as of December 20, 2010, by and between SWDNSI Trust
Series 2010-3 and Specialized Loan Servicing LLC (“SLS”), (c) that certain
Servicing Agreement, dated as of December 20, 2010, by and between SWDNSI Trust
Series 2010-4 and SLS, (d) that certain Servicing Agreement, dated as of
February 25, 2011, by and between SWDNSI Trust Series 2010-3 and

 

- 2 -

--------------------------------------------------------------------------------

PennyMac Loan Services, LLC, (e) that certain Servicing Agreement, dated as of
February 25, 2011, by and between SWDNSI Trust Series 2010-4 and PennyMac Loan
Services, LLC, and (f) in the case of the 2010-3 REMIC, the REMIC Agreement and
the Servicing Agreement identified in clause (a) hereof, in each case, as the
same may be amended from time to time.

“Trust Subsidiary” means each of (a) SWDNSI Trust Series 2010-3, a wholly owned
Subsidiary of PennyMac Corp., (b) SWDNSI Trust Series 2010-4, a wholly owned
Subsidiary of PennyMac Holdings, and (c) REMIC 2010-3, each of which is a
Special Purpose Entity formed for the sole purpose of holding REO Property and
Trust Mortgage Loans and any other wholly owned Subsidiary of either Seller that
has been approved by Buyer in writing in its sole discretion and is subject to a
Transaction Request.

2.2 Section 2 of the Existing Repurchase Agreement is hereby amended by adding
the following definitions, each in their proper alphabetical order:

“REMIC” means a real estate mortgage investment conduit within the meaning of
Section 860D of the Code.

“REMIC 2010-3” means that certain entity designated PENNYMAC CORP Pooled
Mortgage Loan REMIC 2010-3, as created by the REMIC Agreement.

“REMIC Agreement” means that certain Amended and Restated REMIC Declaration,
Servicing and Participation Agreement, for PENNYMAC CORP Pooled Mortgage Loan
REMIC 2010-3, dated as of March 28, 2013, between PennyMac Corp., PennyMac
Holdings, PennyMac Loan Services, LLC and Buyer, as the same may be amended,
supplemented or otherwise modified from time to time.

“REMIC Mortgage Loan” means each Trust Mortgage Loan that is part of the REMIC
2010-3, and all proceeds thereof.

SECTION 3. Conveyance; Security Interest; REO Property. Section 8(a) of the
Existing Repurchase Agreement is hereby amended by deleting such Section in its
entirety and replacing it with the following:

“a. Conveyance and Security Interest. On the Initial Purchase Date, Sellers
hereby sold, assigned, and conveyed all right, title and interest in the Trust
Interests with respect to REO Subsidiary and all other Purchased Assets
identified on a Transaction Request and/or Trust Receipt and the related
Repurchase Assets. On each subsequent Purchase Date, Sellers hereby sell, assign
and convey all right, title and interest in all Trust Interests and Purchased
Assets identified on a Transaction Request and/or Trust Receipt and the related
Repurchase Assets. Although the parties intend that all Transactions hereunder
be sales and purchases and not loans, in the event any such Transactions are
deemed to be loans, and in any event, Sellers hereby pledge to Buyer as security
for the performance by Sellers of their Obligations and hereby grant, assign and
pledge to Buyer a fully perfected first priority security interest in the
Purchased Assets, the REMIC Mortgage Loans, the Records, and all related
Servicing Rights, the Program Agreements (to the extent such Program Agreements
and Sellers’ right thereunder

 

- 3 -

--------------------------------------------------------------------------------

relate to the Purchased Assets), any related Take-out Commitments, any Property
relating to Purchased Mortgage Loans, Trust Mortgage Loans or REO Properties,
all insurance policies and insurance proceeds relating to any Purchased Mortgage
Loan, Trust Mortgage Loan or REO Property or the related Mortgaged Property,
including, but not limited to, any payments or proceeds under any related
primary insurance, hazard insurance and mortgage insurance contracts and loan
guaranty agreements (if any), to the extent of the Purchased Mortgage Loans,
Trust Mortgage Loans or REO Properties protected thereby, Income, the Buydown
Amount and any account to which such amount is deposited, each of the Collection
Account, any Trust Account and the REO Account and all amounts deposited
therein, the obligations of Sellers to deliver and convey each REO Property to
the REO Subsidiary or a Trust Subsidiary, as applicable, accounts (including any
interest of Sellers and any Trust Subsidiary in escrow accounts) and any other
contract rights, instruments, accounts, payments, rights to payment (including
payments of interest or finance charges), general intangibles and other assets
relating to the Purchased Assets (including, without limitation, any other
accounts) or any interest in the Purchased Assets, and any proceeds of the
Purchased Assets, Trust Mortgage Loans and REO Properties (including the related
securitization proceeds) and distributions with respect to any of the foregoing
and any other property, rights, title or interests as are specified on a
Transaction Request and/or Trust Receipt, in all instances, whether now owned or
hereafter acquired, now existing or hereafter created (collectively, the
“Repurchase Assets”).”

SECTION 4. Covenants. Section 14(u) of the Existing Repurchase Agreement is
hereby amended with respect to the REMIC 2010-3 only to read as follows:

“(u) Special Purpose Entity with Respect to REMIC 2010-3. The Sellers shall
cause REMIC 2010-3 to: (a) own no assets, and not engage in any business, other
than the assets and transactions specifically contemplated by the REMIC
Agreement, (b) comply with the provisions of the REMIC Agreement, (c) do all
things necessary to observe organizational formalities of the REMIC 2010-3 and
to preserve its existence, and not amend, modify, waive provisions of or
otherwise change the REMIC Agreement without the consent of the Buyer, (d) not
commingle its funds or other assets with those of any Person and maintain its
properties and assets in such a manner that it would not be costly or difficult
to identify, segregate or ascertain its properties and assets from those of
others, (e) maintain its properties, assets and accounts separate from those of
any Person, (f) outside of the REMIC Agreement and this Agreement, not enter
into any transaction with any Person except on commercially reasonable terms
similar to those available to unaffiliated parties in an arm’s length
transaction, and (g) not have the assets pledged to secure the obligations of
any Person other than the Buyer.”

 

- 4 -

--------------------------------------------------------------------------------

SECTION 5. Schedules.

5.1 Schedule 1-B is hereby amended by adding the following representation at the
end thereof:

“(n) REMIC 2010-3. REMIC 2010-3 shall not own any REO Properties.”

5.2 Schedule 1-C is hereby amended by adding the following representation at the
end thereof:

“(h) REMIC 2010-3. REMIC 2010-3 is a REMIC, has been a REMIC since the date of
its organization, and shall continue at all times hereafter to qualify as a
REMIC.”

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 duly authorized officers of the
Buyer, the Sellers and the Guarantor;

(b) the REMIC Agreement, executed and delivered by duly authorized officers of
the parties thereto;

(c) a copy of the originally issued Residual Participation Certificate for REMIC
2010-3 in the name of PennyMac Corp. (“Residual Certificate”) to be cancelled by
Buyer as Participant Registrar;

(d) a Lost Certificate Affidavit, executed and delivered by a duly authorized
officer of PennyMac Corp. with respect to each of the Regular Certificate and
the Residual Certificate;

(e) the originally issued Amended and Restated Residual Participation
Certificate for REMIC 2010-3 in the name of PennyMac Corp. (“REMIC Residual
Certificate”), executed by a duly authorized officer of Buyer as Participant
Registrar, and to be delivered to PennyMac Corp.;

(f) a copy of the originally issued Regular Participation Certificate for REMIC
2010-3 in the name of PennyMac Holdings (“Regular Certificate”) to be cancelled
by Buyer as Participant Registrar;

(g) a Lost Certificate Affidavit, executed and delivered by a duly authorized
officer of Wells Fargo Bank, National Association with respect to the Regular
Certificate;

 

- 5 -

--------------------------------------------------------------------------------

(h) an Assignment of Regular Certificate, executed in blank and delivered by a
duly authorized officer of PennyMac Holdings to Buyer (“Assignment of Regular
Certificate”);

(i) the originally issued Amended and Restated Regular Participation Certificate
for REMIC 2010-3 in the name of PennyMac Holdings (“REMIC Regular Certificate”),
executed by a duly authorized officer of Buyer as Participant Registrar, and to
be delivered to PennyMac Holdings;

(j) that certain Second Amended and Restated Servicer Notice and Pledge
Agreement, dated as of March 28, 2013 executed and delivered by duly authorized
officers of PennyMac Loan Services, LLC, PennyMac Corp, PennyMac Holdings and
the Buyer;

(k) a Trust Receipt from the Custodian acknowledging its receipt of:

(A) REMIC Regular Certificate;

(B) Assignment of Regular Certificate;

(C) Transferor Certificate in the form of Exhibit E to the REMIC Agreement
executed by PennyMac Holdings in blank;

(l) that certain Assignment and Acceptance Agreement, executed and delivered by
duly authorized officers of Wells Fargo Bank, National Association and Buyer,
assigning the role of Participation Registrar and Paying Agent from Wells Fargo
Bank, National Association to Buyer;

(m) the Warehouse Provider Release, executed and delivered by a duly authorized
officer of Wells Fargo Bank, National Association evidencing a release of lien
on the REMIC Mortgage Loans and REMIC Trust;

(n) UCC Search Report with respect to each Seller;

(o) UCC-3 terminations with respect to each Seller, terminating the existing
facility with Wells Fargo Bank, National Association; and

(p) UCC-3 amendments with respect to each Seller, amending the collateral
description in accordance with amendments to Section 8(a) herein.

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

SECTION 7. 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.

 

- 6 -

--------------------------------------------------------------------------------

SECTION 8. Fees and Expenses. Sellers hereby agree to pay to Buyer, on demand,
any and all reasonable out-of-pocket fees, costs and expenses (including
reasonable fees and expenses of counsel) incurred by Buyer in connection with
the development, preparation and execution of this Amendment, irrespective of
whether any transactions hereunder are executed.

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 and the execution
of this Amendment by the Buyer.

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.

SECTION 11. 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 12. 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 13. 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]

 

- 7 -

--------------------------------------------------------------------------------

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/ Margaret Dellafera   Name:   Margaret Dellafera   Title:   Vice
President

 

PennyMac Corp., as a Seller By:   /s/ Pamela Marsh   Name:   Pamela Marsh  
Title:   Managing Director, Treasurer

 

PennyMac Mortgage Investment Trust Holdings I, LLC, as a Seller By:  

/s/ Pamela Marsh

  Name:   Pamela Marsh   Title:   Managing Director, Treasurer

 

PennyMac Mortgage Investment Trust, as Guarantor By:  

/s/ Pamela Marsh

  Name:   Pamela Marsh   Title:   Managing Director, Treasurer

 

 

Signature Page to Amendment No. 2 to Amended and Restated Master Repurchase
Agreement