Exhibit 10.37

AMENDMENT NO. 2

AMENDMENT NO. 2, dated as of April 24, 2008 (this “Agreement”) to the Revolving
Credit Agreement, dated as of October 24, 2006, as amended by Amendment No. 1,
dated as of March 16, 2008 (as so amended, the “Credit Agreement”), among The
PMI Group, Inc., a Delaware corporation (the “Borrower”), the lenders referred
to therein (the “Lenders”) and Bank of America, N.A., as Administrative Agent
(in such capacity, together with any successor in such capacity, the
“Administrative Agent”).

INTRODUCTORY STATEMENTS

All capitalized terms not otherwise defined in this Agreement are used herein as
defined in the Credit Agreement.

The Borrower has requested that the Lenders agree to amend the Credit Agreement
as hereinafter set forth.

Subject to the terms and conditions hereof, the Lenders signatory to this
Agreement are willing to agree to such amendments but only upon the terms and
conditions set forth herein.

In consideration of the mutual agreements contained herein and other good and
valuable consideration the receipt of which is hereby acknowledged, the parties
hereto hereby agree as follows:

SECTION 1. Amendments to the Credit Agreement.

(A) The definition of “Collateral Agency Agreement” appearing in Section 1.01 of
the Credit Agreement is hereby amended and restated in its entirety to read as
follows:

“‘Collateral Agency Agreement’ means that certain Collateral Agency Agreement
dated as of April 24, 2008, among the Collateral Agent, the Administrative Agent
and the Borrower, as such agreement may be amended, amended and restated,
supplemented or otherwise modified, renewed or replaced from time to time.”

(B) The definition of “Shared Collateral Pledge Agreement” appearing in
Section 1.01 of the Credit Agreement is hereby amended and restated in its
entirety to read as follows:

“‘Shared Collateral Pledge Agreement’ means that certain Shared Collateral
Pledge Agreement dated as of April 24, 2008, between the Borrower and the
Collateral Agent (for the benefit of the Secured Parties), as such agreement may
be amended, amended and restated, supplemented or otherwise modified, renewed or
replaced from time to time.”

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

(C) The definition of “Indemnified Liabilities” appearing in Section 1.01 of the
Credit Agreement is hereby amended and restated in its entirety to read as
follows:

“‘Indemnified Liabilities’ means any and all liabilities, obligations, losses,
damages, penalties, actions, judgments, suits, costs, charges, expenses and
disbursements (including Attorney Costs) of any kind or nature whatsoever which
may at any time (including at any time following repayment of the Loans and the
termination, resignation or replacement of the Administrative Agent) be imposed
on, incurred by or asserted against any Agent-Related Person in any way relating
to or arising out of this Agreement, the Collateral Agency Agreement, the Shared
Collateral Pledge Agreement or any other Loan Document or any document
contemplated by or referred to herein or therein, or the transactions
contemplated hereby or thereby, or any action taken or omitted by any
Agent-Related Person under or in connection with any of the foregoing, including
with respect to any investigation, litigation or proceeding (including any
insolvency proceeding or appellate proceeding) related to or arising out of this
Agreement, the Collateral Agency Agreement, the Shared Collateral Pledge
Agreement or any other Loan Document, or the Loans or the use of the proceeds
thereof, whether or not any Agent-Related Person is a party thereto.”

(D) The following definitions are hereby added to Section 1.01 of the Credit
Agreement in the correct alphabetical order:

‘Amendment No. 2’ means Amendment No. 2, dated as of April 24, 2008, to this
Agreement.

‘Amendment No. 2 Effective Date’ has the meaning specified in Section 3 of
Amendment No. 2.

SECTION 2. Representations and Warranties. The Borrower represents and warrants,
as of the date hereof and as of the Amendment No. 2 Effective Date, to the
Administrative Agent, the L/C Issuer and the Lenders that:

(A) the execution, delivery and performance by the Borrower of this Agreement,
the Credit Agreement as modified by this Agreement and any other documents or
instruments delivered pursuant to Section 3 hereof (i) have been duly authorized
by all requisite corporate action on the part of the Borrower; and (ii) will not
violate (x) any provision of any statute, rule or regulation, or any
Organizational Document of the Borrower, (y) any applicable order of any court
or any rule, regulation or order of any other agency of government, or (z) any
indenture, agreement or other instrument to which Borrower is a party or by
which the Borrower or any of its property is bound, or be in conflict with,
result in a breach of, constitute (with notice or lapse of time or both) a
default under, or create any right to terminate, any such indenture, agreement,
or other instrument; and

(B) upon the occurrence of the Amendment No. 2 Effective Date, this Agreement
and each other agreement delivered pursuant to Section 3 hereof will constitute
the legal, valid and binding obligation of the Borrower, enforceable in
accordance with its terms, except as the enforceability thereof may be limited
by applicable bankruptcy, insolvency, reorganization or other similar laws
affecting creditors’ rights generally and by general equitable principles
(regardless of whether the issue of enforceability is considered in a proceeding
in equity or at law).

 

2

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

SECTION 3. Effective Date. This Agreement shall not become effective until the
date on which all of the following conditions precedent shall have been
satisfied, or waived in writing (such date being referred to herein as the
“Amendment No. 2 Effective Date”):

(A) The Administrative Agent shall have received fully executed counterparts of
this Agreement executed by (i) the Borrower, (ii) the Administrative Agent and
(iii) the Required Lenders.

(B) The Administrative Agent and its counsel shall have received such approvals,
information, materials and documentation as the Administrative Agent or its
counsel may reasonably request, which approvals, information, materials and
documentation shall be reasonably satisfactory in form and substance to the
Administrative Agent and its counsel.

(C) All representations and warranties contained in Section 2 of this Agreement
shall be true.

SECTION 4. CONFIRMATION AND ACKNOWLEDGEMENT OF THE OBLIGATIONS; RELEASE. THE
BORROWER HEREBY (A) CONFIRMS AND ACKNOWLEDGES TO THE ADMINISTRATIVE AGENT, THE
L/C ISSUER AND THE LENDERS THAT IT IS VALIDLY AND JUSTLY INDEBTED TO THE
ADMINISTRATIVE AGENT, THE L/C ISSUER AND THE LENDERS FOR THE PAYMENT OF ALL
OBLIGATIONS (AS DEFINED IN THE CREDIT AGREEMENT) WITHOUT OFFSET, DEFENSE, CAUSE
OF ACTION OR COUNTERCLAIM OF ANY KIND OR NATURE WHATSOEVER AND (B) REAFFIRMS AND
ADMITS THE VALIDITY AND ENFORCEABILITY OF THE CREDIT AGREEMENT AND THE OTHER
LOAN DOCUMENTS. THE BORROWER, ON ITS OWN BEHALF AND ON BEHALF OF ITS SUCCESSORS
AND ASSIGNS, HEREBY WAIVES, RELEASES AND DISCHARGES THE ADMINISTRATIVE AGENT,
THE L/C ISSUER AND THE LENDERS AND ALL OF THE AFFILIATES OF THE ADMINISTRATIVE
AGENT, THE L/C ISSUER AND THE LENDERS, AND ALL OF THE DIRECTORS, OFFICERS,
EMPLOYEES, ATTORNEYS, AGENTS, SUCCESSORS AND ASSIGNS OF THE ADMINISTRATIVE
AGENT, THE L/C ISSUER AND THE LENDERS AND SUCH AFFILIATES, FROM ANY AND ALL
CLAIMS, DEMANDS, ACTIONS OR CAUSES OF ACTION (KNOWN AND UNKNOWN) ARISING OUT OF
OR IN ANY WAY RELATING TO ANY OF THE LOAN DOCUMENTS AND ANY DOCUMENTS,
AGREEMENTS, DEALINGS OR OTHER MATTERS CONNECTED WITH ANY OF THE LOAN DOCUMENTS,
IN EACH CASE TO THE EXTENT ARISING (X) ON OR PRIOR TO THE AMENDMENT NO. 2
EFFECTIVE DATE OR (Y) OUT OF, OR RELATING TO, ACTIONS, DEALINGS OR MATTERS
OCCURRING ON OR PRIOR TO THE AMENDMENT NO. 2 EFFECTIVE DATE.

SECTION 5. Costs and Expenses. The Borrower acknowledges and agrees that its
payment obligations set forth in Section 10.04 of the Credit Agreement include
the costs and expenses incurred by the Administrative Agent and each Lender in
connection with the preparation, execution and delivery of this Agreement, the
Security Documents and any other documentation contemplated hereby or thereby
(whether or not this Agreement or any Security Document becomes effective or the
transactions contemplated hereby or thereby are consummated and whether or not a
Default or Event of Default has occurred or is continuing), including, but not
limited to, (i) the reasonable fees and disbursements of Kaye Scholer LLP,
counsel to the Administrative Agent and (ii) the reasonable fees and
disbursements of any other counsel to the Administrative Agent or any Lender.

 

3

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

SECTION 6. Limited Waiver or Modification; Ratification of Credit Agreement.

(A) Except to the extent hereby expressly waived or modified, the Credit
Agreement remains in full force and effect and is hereby ratified and confirmed.

(B) This Agreement shall be limited precisely as written and shall not be deemed
(i) to be a consent granted pursuant to, or a waiver or modification of, any
other term or condition of the Credit Agreement or any of the instruments or
agreements referred to therein or a waiver of any Default or Event of Default
under the Credit Agreement, whether or not known to the Administrative Agent,
the L/C Issuer or the Lenders or (ii) to prejudice any right or rights which the
Administrative Agent, the L/C Issuer or the Lenders may now have or have in the
future under or in connection with any Loan Document or any of the instruments
or agreements referred to in a Loan Document. The Administrative Agent, L/C
Issuer and the Lenders hereby expressly reserve all of the Administrative
Agent’s, the L/C Issuer’s or the Lenders’ (as applicable) respective rights and
remedies under the Credit Agreement and each of the other Loan Documents, as
well as under applicable law. No failure to exercise, delay in exercising or any
singular or partial exercise, by the Administrative Agent, the L/C Issuer or any
of the Lenders of any right, power or remedy hereunder or any of the other Loan
Documents shall operate as a waiver thereof or in the case of a singular or
partial exercise of a right, power or remedy, preclude any other or further
exercise thereof of any other right, power or remedy, nor shall any of the Loan
Documents be construed as a standstill or a forbearance by any of the
Administrative Agent, the L/C Issuer or the Lenders of their rights and remedies
thereunder. All remedies of the Administrative Agent, the L/C Issuer or the
Lenders are cumulative and are not exclusive of any other remedies under any
other Loan Document or provided by applicable law. Except to the extent hereby
modified, the Credit Agreement shall continue in full force and effect in
accordance with the provisions thereof on the date hereof and the Credit
Agreement as heretofore amended or modified and as modified by this Agreement
are hereby ratified and confirmed. As used in the Credit Agreement, the terms
“Credit Agreement,” “this Agreement,” “herein,” “hereafter,” “hereto,” “hereof,”
and words of similar import, shall, unless the context otherwise requires, mean
the Credit Agreement as modified by this Agreement. Reference to the terms
“Agreement” or “Credit Agreement” appearing in the Exhibits or Schedules to the
Credit Agreement or in the other Loan Documents shall, unless the context
otherwise requires, mean the Credit Agreement as modified by this Agreement.
This Agreement shall be deemed to have been jointly drafted, and no provision of
it shall be interpreted or construed for, or against, any party hereto because
such party purportedly prepared or requested such provision, any other
provision, or this Agreement as a whole.

SECTION 7. Counterparts. This Agreement may be executed in any number of
counterparts and by the different parties hereto in separate counterparts, each
of which when so executed and delivered shall be deemed to be an original and
all of which taken together shall constitute but one and the same instrument.
Delivery of an executed signature page to this Agreement by facsimile shall be
as effective as delivery of a manually executed counterpart of this Agreement.
The Administrative Agent shall promptly notify the Borrower of the occurrence of
the Amendment No. 2 Effective Date.

SECTION 8. Loan Document. This Agreement is a Loan Document pursuant to the
Credit Agreement and shall (unless expressly indicated herein or therein) be
construed, administered, and applied, in accordance with all of the terms and
provisions of the Credit Agreement.

SECTION 9. Severability. Any provision of this Agreement which is invalid,
illegal or unenforceable under the applicable law of any jurisdiction, shall, as
to such jurisdiction, be ineffective to the extent of such invalidity,
illegality or unenforceability without invalidating the remaining provisions
hereof, and any such invalidity, illegality or unenforceability in any
jurisdiction shall not invalidate such provision in any other jurisdiction.

 

4

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

SECTION 10. GOVERNING LAW. THIS AGREEMENT SHALL BE GOVERNED BY, AND CONSTRUED IN
ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK WHICH ARE APPLICABLE TO
CONTRACTS MADE AND TO BE PERFORMED WHOLLY WITHIN THE STATE OF NEW YORK.

SECTION 11. Successors and Assigns. The provisions of this Agreement shall be
binding upon, and inure to the benefit of, the parties hereto and their
respective successors and assigns.

SECTION 12. Headings. The headings of this Agreement are for the purposes of
reference only and shall not affect the construction of, or be taken into
consideration in interpreting, this Agreement.

[The remainder of this page intentionally left blank]

 

5

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

IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be duly
executed as of the day and the year first above written.

 

BORROWER: THE PMI GROUP, INC. By:   /s/ Donald P. Lofe, Jr.   Name:   Title:

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

ADMINISTRATIVE AGENT AND LENDERS: BANK OF AMERICA, N.A., as Administrative
Agent, Lender and L/C Issuer By:   /s/   Name:   Title:

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

CITIBANK, N.A. By:   /s/   Name:   Title:

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

SUN TRUST BANK, N.A. By:   /s/   Name:   Title:

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

WACHOVIA BANK, NATIONAL ASSOCIATION By:   /s/   Name:   Title:

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

WILLIAM STREET COMMITMENT
CORPORATION (Recourse only to assets of
William Street Commitment Corporation) By:   /s/   Name:   Title:

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

JPMORGAN CHASE BANK, N.A. By:   /s/   Name:   Title:

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

THE BANK OF NEW YORK By:   /s/   Name:   Title: