Exhibit 10.4

Execution Copy

PERFORMANCE GUARANTY

This Performance Guaranty (this Guaranty), dated as of February 28, 2007, is executed by American Home Mortgage Holdings, Inc., a
Delaware corporation, and American Home Mortgage Investment Corp., a Maryland corporation (each, a Performance Guarantor and together, the Performance Guarantors), in favor of ABN AMRO Bank N.V. (ABN AMRO), as
agent for the Purchasers, Group Agents and other Indemnified Parties under the Repurchase Agreement referred to below (the Agent).

WHEREAS, American Home Mortgage Corp., American Home Mortgage Acceptance, Inc., American Home Mortgage Investment Corp., and American Home Mortgage Servicing, Inc., (collectively, the Sellers and each a
Seller) have entered into a Master Repurchase Agreement (the Repurchase Agreement) dated as of February 28, 2007 with the Agent, as Buyer pursuant to which the Sellers, subject to the terms and conditions
therein and in the Letter Agreement, may sell certain Mortgage Loans and related property to the Agent for the benefit of the Purchasers and pursuant to the Letter Agreement American Home Mortgage Servicing, Inc. (the Servicer)
has agreed to perform the duties and obligations as Servicer thereunder.

WHEREAS, as an inducement for the Purchasers to enter
into the Letter Agreement and the Transactions contemplated by the Repurchase Agreement, the Performance Guarantors have agreed to guaranty the due and punctual performance of the Sellers and the Servicer under the Repurchase Agreement, the Letter
Agreement and the other Transaction Documents;

WHEREAS, it is a condition precedent to the Purchasers agreeing to enter into the Letter
Agreement and the Transactions contemplated by the Repurchase Agreement that the Performance Guarantors execute and deliver to the Agent a performance guaranty substantially in the form hereof; and

WHEREAS, the Performance Guarantors wish to guaranty the due and punctual performance of the Sellers obligations as Sellers and of the
Servicers obligations as Servicer to the Agent, the Group Agents and the Purchasers under or in respect of the Repurchase Agreement as provided herein, and the Performance Guarantors, as the owners, directly or indirectly, of all
of the outstanding shares of capital stock of the Sellers and of the Servicer, will derive substantial benefit from the transactions contemplated under the Repurchase Agreement and the other Transaction Documents;

NOW, THEREFORE, each of the Performance Guarantors hereby agrees with the Agent for the benefit of itself, each Group Agent, each Purchaser and each
Indemnified Party as follows:

Section 1. Definitions.

As used herein:

Bankruptcy Code means the United States Bankruptcy Code, 11 U.S.C. Sections 101 et seq., as amended.



1



---

Obligations means, collectively, all Seller Obligations of each Seller
and all Servicer Obligations.

Seller Obligations means collectively, all covenants, agreements, terms,
conditions and indemnities to be performed and observed by a Seller solely in its capacity as a Seller under and pursuant to the Repurchase Agreement, the Letter Agreement, each other Transaction Document and each other document executed
and delivered by such Seller as a Seller pursuant to the Repurchase Agreement or the Letter Agreement, including, without limitation, the due and punctual payment of all sums which are or may become due and owing by such Seller as a
Seller under the Repurchase Agreement, the Letter Agreement or any other Transaction Document, whether for the payment of any Repurchase Price, the deposit of collections received by it or for fees, expenses (including counsel fees),
indemnified amounts or otherwise, whether upon any termination or for any other reason, including any renewals, extensions and modifications thereof.

Servicer Obligations means collectively, all covenants, agreements, terms, conditions and indemnities to be performed and observed by AHMS solely in its capacity as Servicer under and
pursuant to the Repurchase Agreement, the Letter Agreement, each other Transaction Document and each other document executed and delivered by the Servicer as Servicer pursuant to the Repurchase Agreement or the Letter Agreement,
including, without limitation, the due and punctual payment of all sums which are or may become due and owing by the Servicer as Servicer under the Repurchase Agreement, the Letter Agreement or any other Transaction Document, whether for
the deposit of collections received by it or for fees, expenses (including counsel fees), indemnified amounts or otherwise, whether upon any termination or for any other reason, including any renewals, extensions and modifications thereof.

All capitalized terms used herein, and not otherwise herein defined shall have their respective meanings as defined in the Repurchase
Agreement or the Letter Agreement, as applicable.

Section 2. Guaranty of Performance of Obligations. Each of the Performance
Guarantors, jointly and severally, hereby unconditionally guarantees to the Agent, the Group Agents, the Purchasers and each other Indemnified Party, the full and punctual payment and performance by each Seller of the Seller Obligations and by the
Servicer of the Servicer Obligations.

This Guaranty is an absolute, unconditional and continuing guaranty of the full and punctual
performance of all of the Obligations and is in no way conditioned upon any requirement that the Agent, the Group Agents or the Purchasers first take any action against any Seller or the Servicer with respect to the Obligations or attempt to collect
any of the amounts owing by any Seller or the Servicer to the Purchasers, the Group Agents or the Agent from any Seller or the Servicer or resort to any collateral security, any balance of any deposit account or credit on the books of any Purchasers
in favor of any Seller or the Servicer, any guarantor of the Obligations or any other Person. Should any Seller or the Servicer default in the payment or performance of any of the Obligations, the Agent or the Required Group Agents may cause the



2



---

immediate performance by each of the Performance Guarantors of the Obligations and cause any payment Obligations to become forthwith due and payable to the
Agent, the Group Agents and the Purchasers, without demand or notice of any nature (other than as expressly provided herein), all of which are expressly waived by each of the Performance Guarantors.

Each of the Performance Guarantors liability under this Guaranty shall be absolute and unconditional irrespective of (i) any lack of validity
or enforceability of the Repurchase Agreement, the Letter Agreement or any other document executed in connection therewith or delivered thereunder, (ii) any change in the time, manner or place of payment of, or in any other term of, all or any
of the Obligations, or any other amendment or waiver of or any consent to departure from the Repurchase Agreement, the Letter Agreement or any other document executed in connection therewith or delivered thereunder, (iii) any taking, exchange,
release or non-perfection of any collateral, or any taking, release or amendment or waiver of or consent to departure from any other guaranty, for all or any of the Obligations, (iv) any law, regulation or order of any jurisdiction affecting
any term of all or any Obligations or the rights of the Agent, any Group Agent, any of the Purchasers or any other Indemnified Party, (v) any manner of application of collateral, or proceeds thereof, to all or any of the Obligations, or any
manner of sale or other disposition of any collateral for all or any of the Obligations or any other assets of any Seller or the Servicer, (vi) any change, restructuring or termination of the corporate structure or existence of any Seller or
the Servicer, or (vii) any other circumstance which might otherwise constitute a defense available to, or a discharge of, any Seller, the Servicer or a guarantor. In the event that performance of any of the Obligations is stayed upon the
insolvency, bankruptcy or reorganization of any Seller or the Servicer, or for any other reason, all such Obligations shall be immediately performed by the Performance Guarantors.

Section 3. Performance Guarantors Further Agreements to Pay. Each of the Performance Guarantors further agrees, jointly and severally,
in the event the Performance Guarantors fail to perform their obligations under this Guaranty, to pay to the Agent, the Group Agents, the Purchasers and any other Indemnified Party, forthwith upon demand all reasonable costs and expenses (including
court costs and legal expenses) incurred or expended by the Agent, the Group Agents, the Purchasers or any Indemnified Party in connection with the enforcement of this Guaranty.

Section 4. Waivers by Performance Guarantors; Agents, Group Agents and Purchasers Freedom to Act. Each of the Performance
Guarantors waives notice of (a) acceptance of this Guaranty, (b) any action taken or omitted by the Agent, any Group Agent, any Purchaser or any Indemnified Party in reliance on this Guaranty, and (c) any requirement that the Agent,
the Group Agents, the Purchasers or any Indemnified Party be diligent or prompt in making demands under this Guaranty, giving notice of any Incipient Event of Default or Event of Default, default or omission by any Seller or the Servicer or
asserting any other rights of the Agent, any Group Agent, any Purchaser or any Indemnified Party under this Guaranty. To the maximum extent permitted by applicable law, each of the Performance Guarantors also irrevocably waives all defenses that at
any time may be available in respect of the Obligations by virtue of any statute of limitations, valuation, stay, moratorium law or other similar law now or thereafter in effect.



3



---

The Agent shall be at liberty, upon its own initiative or at the request of the Required Group Agents,
without giving notice to or obtaining the assent of the Performance Guarantors and without relieving either of the Performance Guarantors of any liability under this Guaranty, to deal with the Sellers and the Servicer and with each other party who
now is or after the date hereof becomes liable in any manner for any of the Obligations, in such manner as the Agent in its sole discretion deems fit or the Required Group Agents in their sole discretion deem fit, and to this end each of the
Performance Guarantors agrees that the validity and enforceability of this Guaranty, including without limitation, the provisions of Section 8 hereof, shall not be impaired or affected by any of the following: (a) any extension,
modification or renewal of, or indulgence with respect to, or substitutions for, the Obligations or any part thereof or any agreement relating thereto at any time; (b) any failure or omission to enforce any right, power or remedy with respect
to the Obligations or any part thereof or any agreement relating thereto, or any collateral securing the Obligations or any part thereof; (c) any waiver of any right, power or remedy or of any Incipient Event of Default or Event of Default or
default with respect to the Obligations or any part thereof or any agreement relating thereto; (d) any release, surrender, compromise, settlement, waiver, subordination or modification, with or without consideration, of any other obligation of
any person or entity with respect to the Obligations or any part thereof; (e) the enforceability or validity of the Obligations or any part thereof or the genuineness, enforceability or validity of any agreement relating thereto or with respect
to the Obligations or any part thereof; (f) the application of payments received from any source to the payment of any payment Obligations of any Seller or of the Servicer, any part thereof or amounts which are not covered by this Guaranty even
though the Agent, the Group Agents or the Purchasers might lawfully have elected to apply such payments to any part or all of the payment Obligations of any Seller or the Servicer or to amounts which are not covered by this Guaranty; (g) the
existence of any claim, setoff or other rights which either of the Performance Guarantors may have at any time against any Seller or the Servicer in connection herewith or any unrelated transaction; (h) any assignment or transfer of the
Obligations or any part thereof; or (i) any failure on the part of any Seller or the Servicer to perform or comply with any term of the Repurchase Agreement or any other document executed in connection therewith or delivered thereunder, all
whether or not the Performance Guarantors shall have had notice or knowledge of any act or omission referred to in the foregoing clauses (a) through (i) of this Section.

Section 5. Unenforceability of Obligations Against the Sellers or the Servicer. Notwithstanding (a) any change of ownership of any
Seller or the Servicer or the insolvency, bankruptcy or any other change in the legal status of any Seller or the Servicer; (b) the change in or the imposition of any law, decree, regulation or other governmental act which does or might impair,
delay or in any way affect the validity, enforceability or the payment when due of the Obligations; (c) the failure of any Seller, the Servicer or either of the Performance Guarantors to maintain in full force, validity or effect or to obtain
or renew when required all governmental and other approvals, licenses or consents required in connection with the Obligations or this Guaranty, or to take any other action required in connection with the performance of all obligations pursuant to
the Obligations or this Guaranty; or (d) if any of the moneys included in the Obligations have become unrecoverable from any Seller or the Servicer for any reason other than final payment in full of the payment Obligations in accordance with
their terms, this Guaranty shall nevertheless be binding on each of the Performance Guarantors. This Guaranty shall be in addition to any other guaranty or other security for the Obligations, and it shall not be rendered unenforceable by the
invalidity of any such other guaranty or security.



4



---

Section 6. Representations and Warranties.

Section 6.1. Existence and Standing. Each of the Performance Guarantors is a corporation duly incorporated, validly existing and in good
standing under the laws of its jurisdiction of incorporation and has all requisite corporate authority to conduct its business in each jurisdiction in which its business is conducted.

Section 6.2. Authorization; Validity. Each of the Performance Guarantors has the corporate power and authority to execute and deliver this
Guaranty, perform its obligations hereunder and consummate the transactions herein contemplated. The execution and delivery by each of the Performance Guarantors of this Guaranty, the performance of its obligations and consummation of the
transactions contemplated hereunder have been duly authorized by proper corporate proceedings, and this Guaranty constitutes the legal, valid and binding obligation of each of the Performance Guarantors, enforceable against such Performance
Guarantor in accordance with its terms, except as enforceability may be limited by bankruptcy, insolvency or similar laws affecting the enforcement of creditors rights generally and by general equity principles (whether considered as a
proceeding at law or in equity).

Section 6.3. No Conflict; Government Consent. Neither the execution and delivery by either of
the Performance Guarantors of this Guaranty, nor the consummation of the transactions herein contemplated, nor compliance with the provisions hereof will contravene or conflict with any law, rule, regulation, order, writ, judgment, injunction,
decree or award binding on such Performance Guarantor or any of its Subsidiaries, except where such contravention or conflict would not reasonably be expected to have a Material Adverse Effect, or such Performance Guarantors certificate of
incorporation or by-laws or the provisions of any indenture, instrument or agreement to which such Performance Guarantor is a party or is subject, or by which it, or its property, is bound, except where such contravention or conflict would not
reasonably be expected to have a Material Adverse Effect, or result in the creation or imposition of any Lien in, of or on the property of such Performance Guarantor or any of its subsidiaries pursuant to the terms of any such indenture, instrument
or agreement.

Section 6.4. Financial Statements. The consolidated financial statements of American Home Mortgage Investment
Corp. and the Sellers and the Servicer, heretofore delivered to the Purchasers as required by the Letter Agreement, were prepared in accordance with generally accepted accounting principles in effect on the date such statements were prepared and
fairly present the consolidated financial condition and operations of American Home Mortgage Investment Corp. and the Sellers and the Servicer at such date and the consolidated results of their operations for the period then ended.

Section 6.5. Material Adverse Change. Since September 30, 2006, there has been no change in the business, properties, financial
condition or results of operations of either of the Performance Guarantors and the Sellers and the Servicer which is reasonably likely to have a Material Adverse Effect on (i) the business, properties, financial condition or results of
operations of such Performance Guarantor and the Sellers and the Servicer taken as a whole, (ii) the ability of such Performance Guarantor to perform its obligations under this Guaranty, or (iii) the validity or enforceability of any
portion of this Guaranty or the rights or remedies of the Agent, the Group Agents or the Purchasers hereunder.



5



---

Section 6.6. Taxes. Each of the Performance Guarantors and the Sellers and the Servicer have
filed all United States federal tax returns and all other tax returns which are required to be filed, except where the failure to file would not reasonably be expected to have a Material Adverse Effect, and have paid all taxes due pursuant to said
returns or pursuant to any assessment received by either of the Performance Guarantors or any Seller or the Servicer, except such taxes, if any, as are being contested in good faith and as to which adequate reserves have been provided. No tax liens
have been filed which are reasonably likely to have a Material Adverse Effect on (i) the business, properties, financial condition or results of operations of the Performance Guarantors and the Sellers and the Servicer taken as a whole,
(ii) the ability of either of the Performance Guarantors to perform its obligations under this Guaranty, or (iii) the validity or enforceability of any portion of this Guaranty or the rights or remedies of the Agent, the Group Agents or
the Purchasers hereunder, and no claims are being asserted in writing with respect to any such taxes. The charges, accruals and reserves on the books of each of the Performance Guarantors and the Sellers and the Servicer in respect of any taxes or
other governmental charges are adequate.

Section 6.7. Litigation and Contingent Obligations. There is no litigation,
arbitration, governmental investigation, proceeding or inquiry pending or, to the knowledge of any of their officers, threatened against or affecting either Performance Guarantor or any Seller or the Servicer which is reasonably likely to have a
material adverse effect on (i) the business, properties, financial condition or results of operations of such Performance Guarantor and the Sellers and the Servicer taken as a whole, (ii) the ability of such Performance Guarantor to
perform its obligations under this Guaranty, or (iii) the validity or enforceability of any portion of this Guaranty or the rights or remedies of the Agent, the Group Agents or the Purchasers hereunder. Neither of the Performance Guarantors
have any material contingent obligations not provided for or disclosed in the financial statements referred to in Section 6.4.

Section 7. Covenants. Each of the Performance Guarantors hereby covenants and agrees, jointly and severally, for the benefit of the Agent, the Group Agents and the Purchasers, until the Obligations have been satisfied in full
and the Repurchase Agreement and the Letter Agreement have been terminated, as follows:

(a) to promptly notify the Agent upon (i) any
dispute between such Performance Guarantor and any Governmental Authority or any other Person that, if adversely determined, would have a Material Adverse Effect; (ii) any material adverse change in the business, operations or financial
condition of such Performance Guarantor, including, without limitation, such Performance Guarantors insolvency; (iii) any event or condition known to it that, if adversely determined, would have a Material Adverse Effect; and
(iv) the receipt of any notice of any final judgment or order for payment of money applicable to such Performance Guarantor in excess of $1,500,000;

(b) to pay and discharge promptly all taxes, assessments and governmental charges or levies imposed upon it or upon its income or upon any of its Property as well as all claims of any kind (including claims for labor,
materials, supplies and rent) that, if unpaid, might become a Lien upon any or all of its Property; provided, however, such Performance Guarantor shall not be required to pay any such tax, assessment, charge, levy or claim if the
amount, applicability or validity thereof shall currently be contested in good faith by appropriate proceedings diligently conducted by it or on its behalf and if it shall have set up reserves therefor adequate under GAAP;



6



---

(c) to maintain its corporate existence, rights and franchises; and

(d) to observe and comply in all material respects with all Governmental Requirements; and

Section 8. Subrogation; Subordination. Each of the Performance Guarantors shall not enforce or otherwise exercise any right of subrogation to
any of the rights of the Agent, any Group Agent, any Purchaser or any Indemnified Party against any Seller or the Servicer, until the Obligations have been indefeasibly paid in full; notwithstanding anything to the contrary contained herein, until
the Obligations have been indefeasibly paid in full, each of the Performance Guarantors hereby waives all rights of subrogation (whether contractual, under Section 509 of the United States Bankruptcy Code, at law or in equity or otherwise) to
the claims of the Agent, any Group Agent, any Purchaser or any Indemnified Party against any Seller or the Servicer and all contractual, statutory or legal or equitable rights of contribution, reimbursement, indemnification and similar rights and
claims (as that term is defined in the United States Bankruptcy Code) which such Performance Guarantor might now have or hereafter acquire against any Seller or the Servicer that arises from the existence or performance of such
Sellers or the Servicers Obligations; until the Obligations have been indefeasibly paid in full, neither Performance Guarantor will claim any setoff, recoupment or counterclaim against any Seller or the Servicer in respect of any
liability of such Performance Guarantor to any Seller or the Servicer; and such Performance Guarantor waives any benefit of and any right to participate in any collateral security which may be held by the Agent, any Group Agent, any Purchaser or any
Indemnified Party. The payment of any amounts due with respect to any indebtedness for borrowed money of any Seller or the Servicer now or thereafter owed to either of the Performance Guarantors is hereby subordinated to the prior payment in full of
all of the Obligations. Each of the Performance Guarantors agrees that, after the occurrence, and during the continuation, of any default in the payment or performance of any of the Obligations, such Performance Guarantor will not demand, sue for or
otherwise attempt to collect any such indebtedness of any Seller or the Servicer to such Performance Guarantor until all of the Obligations shall have been paid and performed in full. If, notwithstanding the foregoing sentence, either of the
Performance Guarantors shall collect, enforce or receive any amounts in respect of such indebtedness while any Obligations are still unperformed or outstanding, such amounts shall be collected, enforced and received by such Performance Guarantor as
trustee for the Agent, the Group Agents, the Purchasers and the Indemnified Parties and be paid over to the Agent on account of the Obligations without affecting in any manner the liability of such Performance Guarantor under the other provisions of
this Guaranty. The provisions of this Section 8 shall be supplemental to and not in derogation of any rights and remedies of the Agent, the Group Agents, the Purchasers or the Indemnified Parties under any separate subordination agreement which
the Agent, the Group Agents, the Purchasers or the Indemnified Parties may at any time and from time to time enter into with either of the Performance Guarantors.

Section 9. Termination of Guaranty. Each of the Performance Guarantors obligations hereunder shall continue in full force and effect until all Obligations are finally paid and satisfied in full and
the Repurchase Agreement and the Letter Agreement are terminated;



7



---

provided, however, that this Guaranty shall continue to be effective or shall be reinstated, as the case may be, if at any time payment or
other satisfaction of any of the Obligations is rescinded or must otherwise be restored or returned upon the bankruptcy, insolvency, or reorganization of any Seller or the Servicer, as applicable, or otherwise, as though such payment had not been
made or other satisfaction occurred, whether or not the Agent is in possession of this Guaranty. No invalidity, irregularity or unenforceability by reason of the Bankruptcy Code or any insolvency or other similar law, or any law or order of any
government or agency thereof purporting to reduce, amend or otherwise affect the Obligations shall impair, affect, be a defense to or claim against the obligations of each of the Performance Guarantors under this Guaranty.

Section 10. Effect of Bankruptcy. This Guaranty shall survive the insolvency of any Seller or the Servicer and the commencement of any case
or proceeding by or against any Seller or the Servicer under the federal Bankruptcy Code or other federal, state or other applicable bankruptcy, insolvency or reorganization statutes. No automatic stay under the federal Bankruptcy Code or other
federal, state or other applicable bankruptcy, insolvency or reorganization statutes to which any Seller or the Servicer is subject shall postpone the obligations of the Performance Guarantors under this Guaranty.

Section 11. Setoff. Regardless of the other means of obtaining payment of any of the Obligations, each of the Agent, the Group Agents and the
Purchasers is hereby authorized at any time and from time to time during the existence of an Event of Default, with prompt notice to the Performance Guarantors (any prior notice being expressly waived by the Performance Guarantors) and to the
fullest extent permitted by law, to set off and apply such deposits and other sums of either Performance Guarantor held by it against the obligations of each of the Performance Guarantors under this Guaranty, whether or not the Agent, such Group
Agent or such Purchaser shall have made any demand under this Guaranty and although such obligations may be contingent or unmatured.

Section 12. Taxes. All payments to be made by each of the Performance Guarantors hereunder shall be made free and clear of any deduction or withholding. If either of the Performance Guarantors is required by law to make any
deduction or withholding on account of tax or otherwise from any such payment, the sum due from it in respect of such payment shall be increased to the extent necessary to ensure that, after the making of such deduction or withholding, the Agent,
the Group Agents, the Purchasers and the Indemnified Parties receive a net sum equal to the sum which they would have received had no deduction or withholding been made.

Section 13. Further Assurances. Each of the Performance Guarantors agrees that it will permit the Agent, the Group Agents and the Purchasers or any of their duly authorized representatives, during normal
business hours, and upon reasonable notice to consult and discuss with such Performance Guarantors Treasurer or Controller, with respect to such Performance Guarantors business, finances, accounts and affairs. Each Performance Guarantor
agrees that it will, from time to time, at the request of the Agent, the Group Agents and the Purchasers, provide to the Agent, the Group Agents and the Purchasers information relating to the business and affairs of such Performance Guarantor as the
Agent, the Group Agents or the Purchasers may reasonably request. Each of the Performance Guarantors also agrees to do all such things and execute all such documents as the Agent, the Group Agents or the Purchasers may reasonably consider necessary
or desirable to give full effect to this Guaranty and to perfect and preserve the rights and powers of the Agent, the Group Agents and the Purchasers hereunder.



8



---

Section 14. Successors and Assigns. This Guaranty shall be binding upon each of the
Performance Guarantors, its successors and assigns, and shall inure to the benefit of and be enforceable by the Agent, the Group Agents, the Purchasers, the Indemnified Parties and their successors, transferees and assigns. Neither of the
Performance Guarantors may assign or transfer any of its obligations hereunder without the prior written consent of each of the Group Agents and any attempted assignment shall be null and void.

Section 15. Amendments and Waivers. No amendment or waiver of any provision of this Guaranty nor consent to any departure by either of the
Performance Guarantors therefrom shall be effective unless the same shall be in writing and signed by the Agent and the Performance Guarantors. No failure on the part of the Agent or any other Indemnified Party to exercise, and no delay in
exercising, any right hereunder shall operate as a waiver thereof; nor shall any single or partial exercise of any right hereunder preclude any other or further exercise thereof or the exercise of any other right.

Section 16. Notices. All notices and other communications called for hereunder shall be made in writing and, unless otherwise specifically
provided herein, shall be deemed to have been duly made or given when delivered by hand or mailed first class, postage prepaid, or, in the case of telegraphic, telecopied or telexed notice, when transmitted, answer back received, addressed as
follows: if to the Performance Guarantors, at the address set forth beneath their respective signatures hereto, and if to the Agent, the Group Agents or any Purchaser at its address specified in the Repurchase Agreement or the Letter Agreement, as
applicable, or at such other address as either party may designate in writing to the other.

Section 17. GOVERNING LAW; CONSENT TO
JURISDICTION; WAIVER OF JURY TRIAL

(a) THIS GUARANTY SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF
NEW YORK. EACH PERFORMANCE GUARANTOR HEREBY SUBMITS TO THE NONEXCLUSIVE JURISDICTION OF THE UNITED STATES DISTRICT COURT FOR THE SOUTHERN DISTRICT OF NEW YORK AND OF ANY NEW YORK STATE COURT SITTING IN THE CITY OF NEW YORK FOR PURPOSES OF ALL LEGAL
PROCEEDINGS ARISING OUT OF OR RELATING TO THIS GUARANTY OR THE TRANSACTIONS CONTEMPLATED HEREBY. EACH PERFORMANCE GUARANTOR HEREBY IRREVOCABLY WAIVES, TO THE FULLEST EXTENT IT MAY EFFECTIVELY DO SO, ANY OBJECTION WHICH IT MAY NOW OR HEREAFTER HAVE
TO THE LAYING OF THE VENUE OF ANY SUCH PROCEEDING BROUGHT IN SUCH A COURT AND ANY CLAIM THAT ANY SUCH PROCEEDING BROUGHT IN SUCH A COURT HAS BEEN BROUGHT IN AN INCONVENIENT FORUM. NOTHING IN THIS SECTION 17 SHALL AFFECT THE RIGHT OF AGENT TO BRING
ANY ACTION OR PROCEEDING AGAINST ANY PERFORMANCE GUARANTOR OR ITS PROPERTY IN THE COURTS OF OTHER JURISDICTIONS. EACH PARTY HERETO CONSENTS TO THE SERVICE OF ANY AND ALL PROCESS IN ANY SUCH ACTION OR PROCEEDING BY THE MAILING OF COPIES OF
SUCH PROCESS TO IT AT ITS ADDRESS FOR NOTICES HEREUNDER SPECIFIED IN SECTION 16.



9



---

(b) EACH OF THE PARTIES HERETO HEREBY WAIVES ANY RIGHT TO HAVE A JURY PARTICIPATE IN RESOLVING ANY
DISPUTE, WHETHER SOUNDING IN CONTRACT, TORT OR OTHERWISE AMONG ANY OF THEM ARISING OUT OF, CONNECTED WITH, RELATING TO OR INCIDENTAL TO THE RELATIONSHIP BETWEEN THEM IN CONNECTION WITH THIS GUARANTY OR THE OTHER TRANSACTION DOCUMENTS.

Section 18. Miscellaneous. This Guaranty constitutes the entire agreement of the Performance Guarantors with respect to the
matters set forth herein. The rights and remedies herein provided are cumulative and not exclusive of any remedies provided by law or any other agreement, and this Guaranty shall be in addition to any other guaranty of or collateral security for any
of the Obligations. The provisions of this Guaranty are severable, and in any action or proceeding involving any state corporate law, or any state or federal bankruptcy, insolvency, reorganization or other law affecting the rights of creditors
generally, if the obligations of either of the Performance Guarantors hereunder would otherwise be held or determined to be avoidable, invalid or unenforceable on account of the amount of such Performance Guarantors liability under this
Guaranty, then, notwithstanding any other provision of this Guaranty to the contrary, the amount of such liability shall, without any further action by such Performance Guarantor, the Agent, any Group Agent, any Purchaser or any Indemnified Party,
be automatically limited and reduced to the highest amount that is valid and enforceable as determined in such action or proceeding. The invalidity or unenforceabihty of any one or more sections of this Guaranty shall not affect the validity or
enforceability of its remaining provisions. Captions are for the ease of reference only and shall not affect the meaning of the relevant provisions. The meanings of all defined terms used in this Guaranty shall be equally applicable to the singular
and plural forms of the terms defined.

[Signatures Follow]



10



---

IN WITNESS WHEREOF, the Performance Guarantors have caused this Guaranty to be executed and delivered as
of the date first above written.



AMERICAN HOME MORTGAGE HOLDINGS,INC.By:

/s/ Alan B. HornName:

Alan B. HornTitle:

Executive Vice President General Counsel & SecretaryAddress:

538 Broadhollow Road Melville, New York
11747AMERICAN HOME MORTGAGE INVESTMENT CORP.By:

/s/ Alan B. HornName:

Alan B. HornTitle:

Executive Vice President General Counsel & SecretaryAddress:

538 Broadhollow Road Melville, New York
11747


Signature Page

to

Performance Guaranty



---

Agreed to:



|                                                     |  |                    
|---------------------------------------------------- |  | -------------------
|ABN AMRO BANK N.V. in its capacity asAgent, as Buyer
|                                                     | 
|By:                                                  |  | /s/ Kevin J. Hayes 
|Name:                                                |  | Kevin J. Hayes     
|Title:                                               |  | Director           
|                                                     | 
|By:                                                  |  | /s/ Therese Gremley
|Name:                                                |  | Therese Gremley    
|Title:                                               |  | Vice President     

Signature Page

to

Performance Guaranty