Exhibit
      10.1(b)

    


    AMENDMENT
      NO. 5 TO

    STOCK
      PURCHASE AGREEMENT

     

    THIS
      AMENDMENT NO. 5 TO STOCK PURCHASE AGREEMENT (this “Amendment”) is made and
      agreed to as of the 18th day of January, 2008, by and among NEW
      YORK
      MORTGAGE TRUST, INC.,
      a
      Maryland corporation (the “Company”) and EACH OF THE
      INVESTORS LISTED ON SCHEDULE I
      THERETO
      (each an
“Investor” and collectively, the “Investors”).

     

    RECITALS

     

    A. The
      Company and Investors are parties to that certain Stock Purchase Agreement
      dated
      as of November 30, 2007, as amended by Amendment No. 1 to Stock Purchase
      Agreement dated January 3, 2008, as amended by Amendment No. 2 to Stock Purchase
      Agreement dated January 4, 2008, as amended by Amendment No. 3 to Stock Purchase
      Agreement dated January 16, 2008, as amended by Amendment No. 4 to Stock
      Purchase Agreement dated January 17, 2008 (collectively, the “Stock Purchase
      Agreement”); and

     

    B. The
      Stock
      Purchase Agreement provides in Section 2.2 for an option (the “Option”) pursuant
      to which the Investors may elect to purchase from the Company up to an aggregate
      of 1,000,000
      additional shares
      of
      Series
      A Cumulative Redeemable Convertible preferred stock, par value $0.01 per share,
      of the Company, at a purchase price per share of $20.00; and 

     

    C. The
      Stock
      Purchase Agreement provides in Section 2.2 that the Option will
      expire at 5:00 p.m., New York City time on
      the
      third business day after the Company files its Annual Report on Form 10-K for
      the year ended December 31, 2007 with the Commission;
      and

     

    D. The
      Stock
      Purchase Agreement provides in Section 7.1(e), as a condition to closing, that
      the Company shall have executed and filed the Articles Supplementary
      Establishing and Fixing the Rights and Preferences of the Series A Cumulative
      Redeemable Convertible Preferred Stock, par value $0.01 per share, of the
      Company, substantially in the form attached thereto as Exhibit C
      (“Exhibit
      C”)
      with
      the Department of Assessment and Taxation of the State of Maryland (the
“Articles Supplementary”); and

     

    E. The
      parties to the Stock Purchase Agreement now desire to amend the Stock Purchase
      Agreement by deleting Section 2.2 in its entirety and substituting in its place
      a new Section 2.2, as provided herein, and by deleting Exhibit
      C
      to the
      Stock Purchase Agreement in its entirety and substituting in its place a new
      Exhibit
      C,
      as
      provided herein.

     

    
      
        
        

      

      
        
        

        
          

        

      

      
        
        

      

    

     

    AGREEMENT

     

    NOW,
      THEREFORE, for and in consideration of the promises and mutual covenants herein
      contained and for other good and valuable consideration, the parties hereto
      agree as follows:

     

    1. Amendment.
      

     

    1.1 The
      Company and the Investors hereby agree that
      the
      Stock Purchase Agreement is hereby amended effective as of the date hereof
      by
      deleting Section 2.2 in its
      entirety and substituting in its place the following:

     

    “2.2 Option
      Shares.
      Upon
      the basis of the warranties and representations and subject to the other terms
      and conditions set forth herein, the Company hereby grants to the Investors
      an
      option (the “Option”) to purchase from the Company up to an aggregate of
1,000,000
      additional shares
      of
      the
      Preferred Stock at a purchase price per share of $20.00 (the “Option Shares”
and, together with the Initial Shares, the “Shares”). The Option will
      expire at 5:00 p.m., New York City time, on April 4, 2008. JMP Group, Inc.
      shall
      serve as the Investors’ representative
      (the
“Investors’ Representative”) with respect to the Option. The Option may be
      exercised upon delivery by the
      Investors’ Representative to the Company of a written
      notice
      of
      exercise (a “Notice of Exercise”) setting forth (i) the number of
      Option
      Shares as to which the
      Investors or their assignees are then exercising the Option, (ii) the names
and
      denominations to which certificates representing the Option Shares are to be
      delivered, and (iii) the time and date
      of
      payment for and delivery of such
      Option Shares. The time and date of delivery of the Option Shares shall
not
      be
      later than ten (10) full business days nor earlier
      than two (2) full business day after
      the
      date of the Notice of Exercise, nor in any event prior
      to
      the Closing Time,
      unless
      otherwise agreed in writing by the Investors’ Representative and
      the
      Company. The Investors shall have the right to assign their rights under the
      Option to one or more of their Affiliates. If the Investors exercise the Option
      in whole or in part in accordance with the provisions of this Section 2.2,
      in
      addition to the Purchase Price for the Option Shares, the Investors will credit
      the Company the amount of $25,000 against the Investor’s expenses in connection
      with the issuance and sale of the Shares, as consideration for the Option,
      payable at the same time and in the same manner that the Purchase Price is
      paid.”

     

    1.2 The
      Company and the Investors hereby agree that the Stock Purchase Agreement is
      hereby amended effective as of the date hereof by deleting Exhibit
      C
      in its
      entirety and substituting in its place a new Exhibit
      C,
      substantially in the form attached hereto as Exhibit
      A.

     

    2. Investment
      of Net Proceeds.

     

    As
      and
      inducement for the Investors to enter into this Amendment, the Company agrees
      and covenants to invest the net proceeds from the transactions contemplated
      by
      the Stock Purchase Agreement in "whole-pool agency certificates" within two
      business days of the Closing. For purposes of this Amendment, "whole-pool agency
      certificate" means any certificate issued or guaranteed by the Government
      National Mortgage Association, Federal National Mortgage Association or Federal
      Home Loan Mortgage Corporation that represents the entire beneficial interest
      in
      the underlying pool of mortgage loans.

     

    
      
        
        

      

      
        2

        
          

        

      

      
        
        

      

    

     

    3. Defined
      Terms.

     

    All
      capitalized terms used herein and not defined herein shall have the meanings
      ascribed to them in the Stock Purchase Agreement.

     

    4. Counterparts.

     

    This
      Amendment may be executed in any number of counterparts and by any party hereto
      on a separate counterpart, each of which when so executed and delivered shall
      be
      deemed an original and all of which taken together shall constitute but one
      and
      the same instrument. 

     

    5. Agreement
      in Full Force and Effect.

     

    Other
      than as expressly provided in this Amendment, all provisions in the Stock
      Purchase Agreement shall remain unchanged and in full force and
      effect.

     

    [SIGNATURES
      APPEAR ON FOLLOWING PAGE]

     

    
      
        
        

      

      
        3

        
          

        

      

      
        
        

      

       

    

    IN
      WITNESS WHEREOF, the parties have signed this Agreement as of the date first
      above written.

     

    
      	
              COMPANY:

            	 	 	
              NEW
                YORK MORTGAGE TRUST, INC.

            
	 	 	 	 
	 	 	 	 
	
            	 	 	/s/
              Steven R.
              Mumma
	
            	 	 	
              
                

              

              Name: Steven R. Mumma

              
                Title:
                  Co-CEO, President, CFO

              

            
	 	 	 	 
	
              INVESTORS:

            	 	 	
              JMP
                GROUP INC.

            
	 	 	 	 
	 	 	 	 
	 	 	 	/s/ Joseph A. Jolson
	 	 	 	
              
                

              

              Name: 

              
                Title:
                  

              

            
	 	 	 	 
	 	 	 	
              JMP
                REALTY TRUST, INC.

            
	 	 	 	 
	 	 	 	 
	 	 	 	/s/ Jim J. Fowler
	 	 	 	
              
                

              

              Name: Jim J. Fowler

              
                Title:
                  President

              

            
	 	 	 	 
	 	 	 	
              HARVEST
                OPPORTUNITY PARTNERS II, L.P.

            
	 	 	 	 
	 	 	 	 
	 	 	 	/s/ Joseph A. Jolson
	 	 	 	
              
                

              

              Name:

              Title:

            
	 	 	 	 
	 	 	 	
              HARVEST
                OPPORTUNITY PARTNERS OFFSHORE FUND, LTD.

            
	 	 	 	 
	 	 	 	 
	 	 	 	/s/ Joseph A. Jolson
	 	 	 	
              
                

              

              Name: 

              
                Title:
                  

              

            


    

     

    
      
        
        

      

      
        
        

        
          

        

      

      
        
        

      

    

     

    
      	 	 	 	 
	 	 	 	
              HARVEST
                SMALL CAP PARTNERS, L.P.

            
	 	 	 	 
	 	 	 	 
	 	 	 	/s/ Jeffrey B. Osher
	 	 	 	
              
                

              

              Name: Jeffrey B. Osher

              
                Title:
                  Portfolio Manager

              

            
	 	 	 	 
	 	 	 	HARVEST SMALL
              CAP
              OFFSHORE, LTD.
	 	 	 	 
	 	 	 	 
	 	 	 	/s/ Jeffrey B. Osher
	 	 	 	
              
Name:
              Jeffrey B. Osher 
              Title:
                Portfolio Manager