<PAGE>
                                                                    EXHIBIT 10.7

                                                                  EXECUTION COPY

                                 AMENDMENT NO. 4
                         TO MASTER REPURCHASE AGREEMENT

            Amendment No. 4, dated as of July 1, 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, Amendment No. 2, dated as of
February 20, 2003, and Amendment No. 3, dated as of April 22, 2003 (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):

            "Increased Aggregate Purchase Price" means FORTY MILLION DOLLARS
($40,000,000).

            "Increased Maximum Aggregate Purchase Price Period" shall mean the
period beginning on July 1, 2003 through and including July 30, 2003.

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

            (b) 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, which shall equal ONE HUNDRED MILLION DOLLARS ($100,000,000).

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

            "Market Value" means, with respect to any Purchased Mortgage Loan as
of any date of determination, the whole-loan servicing released fair market
value of such Purchased Mortgage Loan on such date as determined by Buyer (or an
Affiliate thereof) in its sole discretion. Without limiting the generality of
the foregoing, Seller acknowledges that (a) in the event that a Purchased
Mortgage Loan is not subject to a Take-out Commitment, Buyer may deem the Market
Value for such Mortgage Loan to be no greater than par and (b) the Market Value
of a Purchased Mortgage Loan may be reduced to zero by Buyer if:

            (i) a breach of a representation, warranty or covenant made by
      Seller in this Agreement with respect to such Purchased Mortgage Loan has
      occurred and is continuing;

            (ii) such Purchased Mortgage Loan is a Non-Performing Mortgage Loan;

            (iii) such Purchased Mortgage Loan has been released from the
      possession of the Custodian under the Custodial Agreement (other than to a
      Take-out Investor pursuant to a Bailee Letter) for a period in excess of
      ten (10) calendar days;

            (iv) such Purchased Mortgage Loan has been released from the
      possession of the Custodian under the Custodial Agreement to a Take-out
      Investor pursuant to a Bailee Letter for a period in excess of 45 calendar
      days;

            (v) such Purchased Mortgage Loan has been subject to a Transaction
      hereunder for a period of greater than (a) 60 days for all Mortgage Loans
      other than Aged Loans or (b) 90 days with respect to each Aged Loan;

            (vi) such Purchased Mortgage Loan is a Wet-Ink Mortgage Loan for
      which the Mortgage File has not been delivered to the Custodian on or
      prior to the seventh Business Day after the related Purchase Date;


                                       2
<PAGE>


            (vii) when the Purchase Price for such Purchased Mortgage Loan is
      added to other Purchased Mortgage Loans, the aggregate Purchase Price of
      all Aged Loans that are Purchased Mortgage Loans exceeds $10 million;

            (viii) when the Purchase Price for such Purchased Mortgage Loan is
      added to other Purchased Mortgage Loans, the aggregate Purchase Price of
      all Alt A Mortgage Loans that are Purchased Mortgage Loans exceeds $45
      million;

            (ix) when the Purchase Price for such Purchased Mortgage Loan is
      added to other Purchased Mortgage Loans, the aggregate Purchase Price of
      all Second Lien Mortgage Loans that are Purchased Mortgage Loans exceeds
      $2.5 million; or

            (x) when the Purchase Price for such Purchased Mortgage Loan is
      added to other Purchased Mortgage Loans, the aggregate Purchase Price of
      all Wet-Ink Mortgage Loans that are Purchased Mortgage Loans exceeds 30%
      of the Maximum Aggregate Purchase Price.

            Section 2. Conditions Precedent. This Amendment shall become
effective on July 1, 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 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


                                       3
<PAGE>

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]


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