<PAGE>

                                                                    EXHIBIT 10.5

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


                        NEW CENTURY MORTGAGE CORPORATION
                             NC CAPITAL CORPORATION
                                     Seller

                                       AND

                            CDC MORTGAGE CAPITAL INC.
                                      Buyer

                                 AMENDMENT NO. 2
                           Dated as of August 5, 2002

                                       TO

                AMENDED AND RESTATED MASTER REPURCHASE AGREEMENT
                            Dated as of May 10, 2002

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


<PAGE>

     AMENDMENT NO. 2 (this "Amendment"), dated as of August 5, 2002, by and
among New Century Mortgage Corporation ("NCMC"), NC Capital Corporation ("NCCC"
and, together with NCMC, the "Seller"), and CDC Mortgage Capital Inc. ("Buyer"),
to the Amended and Restated Master Repurchase Agreement dated as of May 10, 2002
as amended by Amendment No. 1, dated as of July 26, 2002 each by and among
Seller and Buyer (the "Agreement").

                                    RECITALS

     WHEREAS, Seller and Buyer have entered into the Agreement;


     WHEREAS the Seller has requested the Buyer to agree to amend certain
provisions of the Agreement as set forth in this Amendment. The Buyer hereto is
willing to agree to such amendments, but only on the terms and subject to the
conditions set forth in this Amendment.

     NOW, THEREFORE, in consideration of the premises and for other good and
valuable consideration, the receipt and sufficiency of which is hereby
acknowledged, the Seller and the Buyer hereby agree as follows:

     Section 1. Amendments.

     (a) Defined Terms. Unless otherwise defined herein, terms defined in the
Agreement are used herein as therein defined.

     (b) Provisos (10) and (11) of the definition of "Asset Value" shall be
amended and restated in their entireties to read:

          (10) The aggregate Asset Value of Non-owner Occupied Mortgage Loans
               may not exceed $29,375,000;

          (11) The aggregate Asset Value of High Cost Mortgage Loans may not
               exceed $11,750,000; and

     (c) The following definitions shall be amended and restated in their
entireties to read:

     "Jumbo Sub-Limit" shall mean an amount equal to $164,500,000.

     "Jumbo(500) Sub-Limit" shall mean an amount equal to $94,000,000.

     "Jumbo(750) Sub-Limit" shall mean an amount equal to $47,000,000.

     "Maximum Amount" shall mean $470,000,000.

     "Second Lien Sub-Limit" shall mean an amount equal to $47,000,000.



<PAGE>

     "Second Lien CLTV Sub-Limit" shall mean with respect to Second Lien
Mortgage Loans with a Combined Loan to Value Ratio of greater than 100%,
$23,500,000.

     "Wet-Ink Sub-Limit" shall mean an amount equal to (i) with respect to the
first five (5) Business Days of each calendar month, $235,000,000, (ii) with
respect to the last three (3) Business Days of each calendar month, $235,000,000
and (iii) at all other times, $188,000,000.

     (d) The definition of "C/C- Credit Sub-Limit" shall be deleted. In its
place, the following definition shall be inserted:

     "C/C- Credit Sub-Limit" shall mean an amount equal to $70,500,000. (e)
Section 3(o) of the Agreement will be amended by inserting after "$200,000,000",
the following:

     "; provided for the Test Period ended November 30, 2002 and for each Test
     Period thereafter, if the Seller fails to maintain the average aggregate
     principal balance of Transactions outstanding for any such Test Period
     equal to at least $235,000,000"

     Section 2. Facility Fee. Upon the execution of this Amendment, the Seller
shall pay a facility fee to the Buyer equal to the product of (x) $70,000,000,
(y) a quotient, the numerator of which is the number of days that will elapse
from and including the date of this Amendment to but excluding the Termination
Date and the denominator of which is 365, and (z) 0.125%. Section 3.
Effectiveness of the Amendment. The Amendment shall become effective upon
receipt by the Buyer of evidence satisfactory to the Buyer that this Amendment
has been executed and delivered by the Seller.

     Section 4. Ratification of Agreement. As amended by this Amendment, the
Agreement is in all respects ratified and confirmed and the Agreement as so
modified by this Amendment shall be read, taken, and construed as one and the
same instrument. Section 5. Representations and Warranties. To induce the Buyer
to enter into this Amendment, the Seller hereby represents and warrants to the
Buyer that, after giving effect to the amendments provided for herein, the
representations and warranties contained in the Agreement and the other
Repurchase Documents will be true and correct in all material respects as if
made on and as of the date hereof and that no Default or Event of Default will
have occurred and be continuing.

     Section 6. No Other Amendments. Except as expressly amended hereby, the
Agreement and the other Repurchase Documents shall remain in full force and
effect in accordance with their respective terms, without any waiver, amendment
or modification of any provision thereof.

                                      -2-

<PAGE>

     Section 7. Counterparts. This Amendment may be executed in any number of
counterparts, each of which so executed shall be deemed to be an original, but
all of such counterparts shall together constitute but one and the same
instrument.

     Section 8. Expenses. The Seller agrees to pay and reimburse the Buyer for
all of the out-of-pocket costs and expenses incurred by the Buyer in connection
with the preparation, execution and delivery of this Amendment, including,
without limitation, the fees and disbursements of its attorneys.

     Section 9. GOVERNING LAW.

     THIS AGREEMENT SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE
LAWS OF THE STATE OF NEW YORK, WITHOUT REGARD TO CONFLICTS OF LAW PRINCIPLES.

                                      -3-

<PAGE>

     IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
duly executed by their respective officers as of the day and year first above
written.

CDC MORTGAGE CAPITAL INC.,          NEW CENTURY MORTGAGE CORPORATION,
as Buyer under the Agreement        as Seller under the Agreement

By:  /s/ Anthony Malanga             By:  /s/ Kevin Cloyd
     ----------------------------         ---------------
     Name:                                Name:
     Title: Managing Director             Title:  Senior Vice President



By:  /s/ William Bronagh             NC CAPITAL CORPORATION,
     ----------------------------    as Seller under the Agreement
     Name:
     Title: Director                 By:  /s/ Kevin Cloyd
                                     Name:
                                     Title:  President



<PAGE>

     The undersigned guarantor hereby consents and agrees to the foregoing
Amendment:

                                NEW CENTURY FINANCIAL CORPORATION


                               By: /s/ Patrick Flanagan
                                   --------------------------------------
                                   Name:
                                   Title: Executive Vice President