<PAGE>
                                                                   EXHIBIT 10.22

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




                                 HSBC BANK USA

                                      AND

                       THE NEW YORK MORTGAGE COMPANY LLC








                                 SECOND AMENDED
                         CREDIT AND SECURITY AGREEMENT










                           Dated as of June 18, 2001



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



<PAGE>
                  SECOND AMENDED CREDIT AND SECURITY AGREEMENT

     THIS AGREEMENT, dated as of the Agreement Date between THE NEW YORK
MORTGAGE COMPANY LLC, a New York limited liability company with offices at 304
Park Avenue South, New York, New York 10010 (the "Company"), and HSBC BANK USA,
a banking corporation organized under the laws of the State of New York, with
offices at c/o Mortgage Warehouse Lending Department, One HSBC Center, 27th
Floor, Buffalo, New York 14203 ("HSBC"), evidences:

                                  INTRODUCTION

     This Agreement amends the Credit and Security Agreement between the Company
and HSBC dated as of March 30, 2001, as previously amended by First Amended
Credit and Security Agreement dated as of May 24, 2001 (together, "Prior
Agreement") by increasing the Credit Amount to $25,000,000.00 and changing
certain other terms and conditions. Capitalized terms not otherwise defined
herein have the meanings given them in the Prior Agreement:

                                   AGREEMENTS

     1.  The following definitions are amended to read as follows:

         Agreement Date: June 18, 2001.

         Credit Amount: TWENTY-FIVE MILLION AND NO/100 DOLLARS ($25,000,000.00).

         Credit Note: The Company's Second Amended Credit Note to HSBC dated as
of the Agreement Date.

     2.  Section 2.2 is amended to read as follows:




<PAGE>
                                      -2-






          A2.2  Term.  This Agreement will be in effect until June 15, 2002,
when all amounts outstanding hereunder and under the Credit Note shall be due
and payable; provided, however, that HSBC may earlier terminate this Agreement
following at least 90 days prior written notice to the Company, and, at any time
subsequent to ninety (90) days from the Agreement Date, the Company may
terminate this Agreement following at least 90 days prior written notice to
HSBC. No such termination shall affect the rights of the parties hereto as to
any Advances previously made, which shall continue to be governed hereby.


     3.   Section 6.18 is amended to read as follows:

          A6.18  Financial Covenants.

                 A.  Adjusted Net Worth. Maintain a minimum Adjusted Net Worth
of at least THREE MILLION THREE HUNDRED THOUSAND AND NO/100 DOLLARS
($3,300,000.00).

                 B.  Total Liabilities to Adjusted Net Worth Ratio. Maintain a
ratio of total liabilities to Adjusted Net Worth of not more than (i) 12.5 to 1
at all times until December 31, 2001, and (ii) 10 to 1 thereafter.

     4.   Except as modified herein, the Prior Agreement is ratified and
confirmed. Borrower disclaims any offsets, defenses or counterclaims respecting
its obligations under the Prior Agreement.




<PAGE>
                                      -3-




     IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be
signed by their duly authorized officers and their corporate seals to be
hereunto affixed, all as of the Agreement Date




                                   THE NEW YORK MORTGAGE COMPANY LLC


                                   BY: /s/ Steven Schnall
                                      -------------------------------
                                      Steven Schnall, Member


                                   HSBC BANK USA

                                   BY: /s/ James A. Noyes
                                      -------------------------------
                                      James A. Noyes, Vice President



<PAGE>
                                      -4-



STATE OF                     )
                             ) SS.:
COUNTY OF                    )


     On the 19th day of June, 2001, before me, the undersigned, a notary public
in and for said state, personally appeared Steven Schnall, personally known to
me or proved to me on the basis of satisfactory evidence to be the individual(s)
whose name(s) is (are) subscribed to the within instrument and acknowledged to
me that he/she/they executed the same in his/her/their capacity(ies), and that
by his/her/their signature(s) on the instrument, the individual(s), or the
person upon behalf of which the individual(s) acted, executed the instrument.


                                               /s/ Anna Marin
                                     --------------------------------------
                                                Notary Public


                                                [NOTARY SEAL]
                                                  ANNA MARIN
                                       NOTARY PUBLIC, STATE OF NEW YORK
                                               NO. 01MA5039882
                                           QUALIFIED IN QUEENS COUNTY
                                       COMMISSION EXPIRES MARCH 6, 2003


STATE OF PENNSYLVANIA        )
                             ) SS.:
COUNTY OF MONTGOMERY         )



     On the 21st day of June, 2001, before me, the undersigned, a notary public
in and for said state, personally appeared James A. Noyes, personally known to
me or proved to me on the basis of satisfactory evidence to be the individual(s)
whose name(s) is (are) subscribed to the within instrument and acknowledged to
me that he/she/they executed the same in his/her/their capacity(ies), and that
by his/her/their signature(s) on the instrument, the individual(s), or the
person upon behalf of which the individual(s) acted, executed the instrument.



                                             /s/ JoAnn Gerhart
                                     --------------------------------------
                                                Notary Public


                                                [NOTARY SEAL]
                                         JoAnn Gerhart, Notary Public
                                       Upper Marion Tnp., Montgomery County
                                       My Commission Expires Apr. 22, 2002

                                   Member, Pennsylvania Association of Notaries