<PAGE>
                                                                    EXHIBIT 10.5

                                 AMENDMENT NO. 2
                         TO MASTER REPURCHASE AGREEMENT

            Amendment No. 2, dated as of February 20, 2003 (this "Amendment"),
between CREDIT SUISSE FIRST BOSTON MORTGAGE CAPITAL, LLC (the "Buyer"), THE NEW
YORK MORTGAGE COMPANY, LLC (the "Seller") and STEVEN B. SCHNALL and JOSEPH V.
FIERRO (the "Guarantors").

                                    RECITALS

            The Buyer, the Seller and the Guarantors are parties to that certain
Master Repurchase Agreement, dated as of October 2, 2002, as amended by
Amendment No. 1, dated as of December 4, 2002 (the "Existing Repurchase
Agreement"; as amended by this Amendment, the "Repurchase Agreement").
Capitalized terms used but not otherwise defined herein shall have the meanings
given to them in the Existing Repurchase Agreement.

            The Buyer, the Seller and the Guarantors have agreed, subject to the
terms and conditions of this Amendment, that the Existing Repurchase Agreement
be amended to reflect certain agreed upon revisions to the terms of the Existing
Repurchase Agreement. As a condition precedent to amending the Existing Master
Repurchase Agreement, the Buyer has required the Guarantors to ratify and affirm
the Guaranty on the date hereof.

            Accordingly, the Buyer, the Seller and each Guarantor hereby agree,
in consideration of the mutual premises and mutual obligations set forth herein,
that the Existing Repurchase Agreement is hereby amended as follows:

            SECTION 1. Increased Maximum Aggregate Purchase Price Period. For
purposes of this Amendment, this Section 1 will be effective only during the
Increased Maximum Aggregate Purchase Price Period.

            1.1 Definitions.

            (a) Section 2 of the Existing Repurchase Agreement is hereby
      temporarily amended by adding the following defined terms, which amendment
      shall be effective solely during the Increased Maximum Aggregate Purchase
      Price Period (as defined below):

            "Additional Increased Aggregate Purchase Price" means TWENTY MILLION
DOLLARS ($20,000,000).

            "Additional Increased Purchase Price Mortgage Loan" means a Mortgage
Loan which is purchased with the proceeds of the Additional Increased Aggregate
Purchase Price. Any Mortgage Loans subject to a Transaction will first be
attributed to the Standard Aggregate Purchase Price, and then the Increased
Aggregate Purchase Price prior to any Mortgage Loans being attributed to the
Additional Increased Aggregate Purchase Price. To the extent that funds are no
longer available under the Standard Aggregate Purchase Price and the Increased
Aggregate Purchase Price, any further Mortgage Loans subject to a Transaction
will be
<PAGE>
considered Additional Increased Purchase Price Mortgage Loans. For purposes of
this Agreement, Mortgage Loans will be allocated first to the Standard Aggregate
Purchase Price and Additional Aggregate Purchase Price based on the date on
which such Mortgage Loan becomes subject to this Agreement, commencing from the
earliest date to the most recent date.

            "Increased Aggregate Purchase Price" means SIXTY MILLION DOLLARS
($60,000,000).

            "Increased Maximum Aggregate Purchase Price Period" shall mean the
period beginning on February 20, 2003 through and including April 21, 2003.

            "Increased Purchase Price Mortgage Loan" means a Mortgage Loan which
is purchased with the proceeds of the Increased Aggregate Purchase Price. Any
Mortgage Loans subject to a Transaction will first be attributed to the Standard
Aggregate Purchase Price prior to any Mortgage Loans being attributed to the
Increased Aggregate Purchase Price. To the extent that funds are no longer
available under the Standard Aggregate Purchase Price, any further Mortgage
Loans subject to a Transaction will be considered Increased Purchase Price
Mortgage Loans. For purposes of this Agreement, Mortgage Loans will be allocated
first to the Standard Aggregate Purchase Price based on the date on which such
Mortgage Loan becomes subject to this Agreement, commencing from the earliest
date to the most recent date.

            "Standard Aggregate Purchase Price" means SIXTY MILLION DOLLARS
($60,000,000).

            (b) Section 2 of the Existing Repurchase Agreement is hereby
      temporarily amended by deleting the definition of "Purchase Price" in its
      entirety and replacing it with the following language, which amendment
      shall be effective solely during the Increased Maximum Aggregate Purchase
      Price Period:

            "Purchase Price" means the price at which each Purchased Mortgage
Loan is transferred by a Seller to Buyer, which shall equal:

            (i) on the Purchase Date, in the case of Purchased Mortgage Loans
      which are Jumbo Mortgage Loans, Conforming Mortgage Loans or Alt-A
      Mortgage Loans (in all cases, other than Increased Purchase Price Mortgage
      Loans or Additional Increased Purchase Price Mortgage Loans), the lesser
      of either: (x) the product of (1) the Market Value of such Purchased
      Mortgage Loan multiplied by (2) the applicable Purchase Price Percentage
      for such Mortgage Loan or (y) the outstanding principal amount thereof as
      set forth on the related Mortgage Loan Schedule;

            (ii) on the Purchase Date, in the case of Purchased Mortgage Loans
      which are Increased Purchase Price Mortgage Loans which are Jumbo Mortgage
      Loans, Conforming Mortgage Loans or Alt-A Mortgage Loans, the lesser of
      either: (x) the product of (1) the Market Value of such Purchased Mortgage
      Loan multiplied by (2) the applicable Purchase Price Percentage for such
      Increased Purchase Price Mortgage Loan or (y) the product of (1) the
      applicable Purchase Price Percentage of such Increased Purchase Price
      Mortgage Loan multiplied by (2) the outstanding principal amount thereof
      as set forth on the related Mortgage Loan Schedule;


                                       2
<PAGE>
            (iii) on the Purchase Date, in the case of Purchased Mortgage Loans
      which are Additional Increased Purchased Mortgage Loans which are Jumbo
      Mortgage Loans, Conforming Mortgage Loans or Alt-A Mortgage Loans, the
      lesser of either: (x) the product of (1) the Market Value of such
      Purchased Mortgage Loan multiplied by (2) the applicable Purchase Price
      Percentage for such Mortgage Loan or (y) the outstanding principal amount
      thereof as set forth on the related Mortgage Loan Schedule;

            (iv) on the Purchase Date, in the case of Purchased Mortgage Loans
      which are Second Lien Mortgage Loans the lesser of either (i) (x) with
      respect to Mortgage Loans, Increased Purchase Price Mortgage Loans or
      Additional Increased Purchase Price Mortgage Loans (other than Preferred
      Committed Mortgage Loans) the product of (1) the outstanding principal
      amount thereof as set forth in the Mortgage Loan Schedule multiplied by
      (2) the applicable Purchase Price Percentage for such Mortgage Loan and
      (y) with respect to Purchased Mortgage Loans which are Preferred Committed
      Mortgage Loans (in all cases, other than Increased Purchase Price Mortgage
      Loans or Additional Increased Purchase Price Mortgage Loans), the
      outstanding principal amount thereof as set forth in the Mortgage Loan
      Schedule or (ii) the product of (1) the Market Value of such Purchased
      Mortgage Loan multiplied by (2) the applicable Purchase Price Percentage
      for such Mortgage Loan;

            (v) on any day after the Purchase Date, except where Buyer and the
      Seller agree otherwise, the amount determined under the immediately
      preceding clauses (i) or (ii) decreased by the amount of any cash
      transferred by the Seller to Buyer pursuant to Section 4(c) hereof or
      applied to reduce the Seller's obligations under clause (ii) of Section
      4(b) hereof or under Section 6 hereof.

            (c) Section 2 of the Existing Repurchase Agreement is hereby
      temporarily amended by deleting the definition of "Maximum Aggregate
      Purchase Price" in its entirety and replacing it with the following
      language, which amendment shall be effective solely during the Increased
      Maximum Aggregate Purchase Price Period:

            "Maximum Aggregate Purchase Price" means the sum of (a) the Standard
Aggregate Purchase Price plus (b) the Increased Aggregate Purchase Price plus
(c) the Additional Increased Aggregate Purchase Price. All funds made available
by Buyer to Seller under this Agreement will first be attributed to the Standard
Aggregate Purchase Price. To the extent that funds are no longer available under
the Standard Aggregate Purchase Price, any further funds made available by Buyer
to Seller under this Agreement shall be attributed to the Increased Aggregate
Purchase Price. To the extent that funds are no longer available under the
Increased Aggregate Purchase Price, any further funds made available by Buyer to
Seller under this Agreement shall be attributed to the Additional Increased
Aggregate Purchase Price.

            (d) Section 2 of the Existing Repurchase Agreement is hereby
      temporarily amended by deleting the definition of "Purchase Price
      Percentage" in its entirety and replacing it with the following language,
      which amendment shall be effective solely during the Increased Maximum
      Aggregate Purchase Price Period:

            "Purchase Price Percentage" means,


                                       3
<PAGE>
            (1) with respect to each Mortgage Loan which is not an Additional
Increased Purchase Price Mortgage Loan, the following percentage, as applicable:

            (a) 98% with respect to Purchased Mortgage Loans that are Alt A
Mortgage Loans (including Increased Purchase Price Mortgage Loans);

            (b) 98% with respect to Purchased Mortgage Loans that are Jumbo
Mortgage Loans (including Increased Purchase Price Mortgage Loans);

            (c) 98% with respect to Transactions the subject of which are first
lien Conforming Mortgage Loans (including Increased Purchase Price Mortgage
Loans);

            (d) 96% with respect to Transactions the subject of which are Second
Lien Mortgage Loans (including Increased Purchase Price Mortgage Loans);

            (e) with respect to Transactions the subject of which are Exception
Mortgage Loans, a percentage to be determined by Buyer in its sole discretion;
and

            (2) with respect to Additional Increased Purchase Price Mortgage
Loans, 92%.

            1.2 Covenants.

            (a) Section 14(b) of the Existing Master Repurchase Agreement is
      hereby temporarily amended by deleting it in its entirety and replacing it
      with the following, which amendment shall be effective solely during the
      Increased Maximum Aggregate Purchase Price Period:

            "Indebtedness to Adjusted Tangible Net Worth Ratio. Seller's ratio
of Indebtedness to Adjusted Tangible Net Worth shall not exceed 25:1."

            SECTION 2. Conditions Precedent. This Amendment shall become
effective on February 20, 2003 (the "Amendment Effective Date"), subject to the
satisfaction of the following conditions precedent:

            2.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 each Guarantor and a
      duly authorized officer of the Buyer and Seller; and

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

            SECTION 3. Representations and Warranties. The Seller hereby
represents and warrants to the Buyer that they are in compliance with all the
terms and provisions set forth in the Repurchase Agreement on their part to be
observed or performed, and that no Event of


                                       4
<PAGE>
Default has occurred or is continuing, and hereby confirm and reaffirm the
representations and warranties contained in Section 13 of the Repurchase
Agreement.

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

            SECTION 5. 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 6. 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 7. Reaffirmation of Guaranty. Each Guarantor hereby ratifies
and affirms all of the terms, covenants, conditions and obligations of the
Guaranty and acknowledges and agrees that such Guaranty shall apply to all of
the Obligations under the Master Repurchase Agreement, as it may be amended,
modified and in effect, from time to time.

                            [SIGNATURE PAGE FOLLOWS]


                                       5
<PAGE>
            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.

Buyer:                                 CREDIT SUISSE FIRST BOSTON MORTGAGE
                                       CAPITAL LLC,
                                       AS BUYER


                                       By: /s/ Jeffrey S. Detwiler
                                           ------------------------------------
                                           Name: Jeffrey S. Detwiler
                                           Title:


Seller:                                THE NEW YORK MORTGAGE COMPANY, LLC,
                                       AS SELLER


                                       By: /s/ Steven B. Schnall
                                           ------------------------------------
                                           Name: Steven B. Schnall
                                           Title: President



Guarantor:

                                    /s/ Steven B. Schnall
                                    ------------------------------------
                                    STEVEN B. SCHNALL

Guarantor:

                                    /s/ Joseph V. Fierro
                                    ------------------------------------
                                    JOSEPH V. FIERRO