Exhibit 10.2 GUARANTY GUARANTY, dated as of September 13, 2006 (as amended, supplemented, or otherwise modified from time to time, this "Guaranty"), made by American Home Mortgage Holdings, Inc., a Delaware corporation (the "Guarantor"), in favor of Credit Suisse First Boston Mortgage Capital, LLC (the "Buyer"). RECITALS Pursuant to the Master Repurchase Agreement, dated as of September 13, 2006 (as amended, supplemented or otherwise modified from time to time, the "Repurchase Agreement"), among American Home Mortgage Corp., American Home Mortgage Acceptance, Inc., American Home Mortgage Servicing, Inc., and American Home Mortgage Investment Corp. (the "Sellers"), the Guarantor and the Buyer, the Buyer has agreed from time to time to enter into transactions in which the Sellers agree to transfer to Buyer Eligible Assets against the transfer of funds by Buyer, with a simultaneous agreement by Buyer to transfer to Sellers such Purchased Assets at a date certain or on demand, against the transfer of funds by Sellers. Each such transaction shall be referred to herein as a "Transaction". It is a condition precedent to the obligation of the Buyer to enter into Transactions under the Repurchase Agreement that the Guarantor shall have executed and delivered this Guaranty to the Buyer. NOW, THEREFORE, in consideration of the foregoing premises, to induce the Buyer to enter into the Repurchase Agreement and to enter into Transactions thereunder, the Guarantor hereby agrees with the Buyer, as follows: 1. Defined Terms. (a) Unless otherwise defined herein, terms which are defined in the Repurchase Agreement and used herein are so used as so defined. (b) For purposes of this Guaranty, "Obligations" shall mean all obligations and liabilities of the Sellers to the Buyer, whether direct or indirect, absolute or contingent, due or to become due, or now existing or hereafter incurred, which may arise under, or out of or in connection with the Repurchase Agreement and any other Program Agreements and any other document made, delivered or given in connection therewith or herewith, whether on account of principal, interest, reimbursement obligations, fees, indemnities, costs, expenses (including, without limitation, all reasonable fees and disbursements of counsel to the Buyer that are required to be paid by a party to the Transaction pursuant to the terms of the Program Agreements and costs of enforcement of this Guaranty) or otherwise. 2. Guaranty. (a) The Guarantor hereby unconditionally and irrevocably guarantees to the Buyer the prompt and complete payment and performance by the Sellers when due (whether at the stated maturity, by acceleration or otherwise) of the Obligations. (b) The Guarantor further agrees to pay any and all reasonable expenses (including, without limitation, all fees and disbursements of counsel) which may be paid or incurred by the Buyer, in good faith, in enforcing, or obtaining advice of counsel in respect of, any rights with respect to, or collecting, any or all of the Obligations and/or enforcing any rights with respect to, or collecting against, the Guarantor under this Guaranty. This Guaranty shall remain in full force and effect until the later of (i) the termination of the Repurchase Agreement or (ii) the Obligations are paid in full, notwithstanding that from time to time prior thereto a Seller may be free from any Obligations. (c) No payment or payments made by any Seller or any other Person or received or collected by the Buyer from any Seller or any other Person by virtue of any action or proceeding or any set-off or appropriation or application, at any time or from time to time, in reduction of or in payment of the Obligations shall be deemed to modify, reduce, release or otherwise affect the liability of the Guarantor hereunder which shall, notwithstanding any such payment or payments (other than payments made by Guarantor in respect of the Obligations or payments received or collected from the Guarantor in respect of the Obligations), remain liable for the amount of the Obligations until the Obligations are paid in full. (d) Guarantor agrees that whenever, at any time, or from time to time, the Guarantor shall make any payment to the Buyer on account of the Guarantor's liability hereunder, the Guarantor will notify the Buyer in writing that such payment is made under this Guaranty for such purpose. 3. Right of Set-off. Upon the occurrence of an Event of Default, the Buyer is hereby irrevocably authorized at any time and from time to time without notice to the Guarantor, any such notice being hereby waived by the Guarantor, to set off and appropriate and apply any and all deposits (general or special, time or demand, provisional or final), in any currency, and any other credits, indebtedness or claims, in any currency, in each case whether direct or indirect, contingent, matured or unmatured, at any time held or owing by the Buyer or any affiliate thereof to or for the credit or the account of the Guarantor, or any part thereof in such amounts as the Buyer may elect against and on account of the Obligations and liabilities of the Guarantor hereunder, whether or not the Buyer has made any demand for payment and although such Obligations and liabilities and claims may be contingent or unmatured. The Buyer shall notify the Guarantor promptly of any such set-off and the application made by the Buyer, provided that the failure to give such notice shall not affect the validity of such set-off and application. The rights of the Buyer under this paragraph are in addition to other rights and remedies (including, without limitation, other rights of set-off) which the Buyer may have. 4. Subrogation. Notwithstanding any payment or payments made by the Guarantor hereunder or any set-off or application of funds of the Guarantor by the Buyer, the Guarantor shall not be entitled to be subrograted to any of the rights of the Buyer against any Seller or any other guarantor or any collateral security or guarantee or right of offset held by the Buyer for the payment of the Obligations, nor shall the Guarantor seek or be entitled to seek any contribution or reimbursement from any Seller or any other guarantor in respect of payments made by the Guarantor hereunder, until all amounts owing to the Buyer by each Seller on account of the Obligations are paid in full and the Repurchase Agreement is terminated. If any amount shall be paid to the Guarantor on account of such subrogation rights at any time when all of the Obligations shall not have been paid in full, such amounts shall be held by the Guarantor in trust for the Buyer, segregated from other funds of the Guarantor, and shall, forthwith upon -2- receipt by the Guarantor, be turned over to the Buyer in the exact form received by the Guarantor (duly indorsed by the Guarantor to the Buyer, if required), to be applied against the Obligations, whether matured or unmatured, in such order as the Buyer may determine in accordance with the terms of the Repurchase Agreement. 5. Amendments, etc. with Respect to the Obligations. Guarantor shall remain obligated hereunder notwithstanding that, without any reservation of rights against the Guarantor, and without notice to or further assent by the Guarantor, any demand for payment of any of the Obligations made by the Buyer may be rescinded by the Buyer, and any of the Obligations continued, and the Obligations, or the liability of any other party upon or for any part thereof, or any collateral security or guarantee therefor or right of offset with respect thereto, may, from time to time, in whole or in part, be renewed, extended, amended, modified, accelerated, compromised, waived, surrendered or released by the Buyer, and the Repurchase Agreement, and the other Program Agreements and any other document in connection therewith may be amended, modified, supplemented or terminated, in whole or in part, as the Buyer may deem advisable from time to time, and any collateral security, guarantee or right of offset at any time held by the Buyer for the payment of the Obligations may be sold, exchanged, waived, surrendered or released. The Buyer shall have no obligation to protect, secure, perfect or insure any Lien at any time held by it as security for the Obligations or for this Guaranty or any property subject thereto. When making any demand hereunder against the Guarantor, the Buyer may, but shall be under no obligation to, make a similar demand on any Seller or any other guarantor, and any failure by the Buyer to make any such demand or to collect any payments from any Seller or any such other guarantor or any release of any Seller or such other guarantor shall not relieve the Guarantor of its obligations or liabilities hereunder, and shall not impair or affect the rights and remedies, express or implied, or as a matter of law, of the Buyer against the Guarantor. For the purposes hereof "demand" shall include the commencement and continuance of any legal proceedings. 6. Guaranty Absolute and Unconditional. (a) Guarantor waives any and all notice of the creation, renewal, extension or accrual of any of the Obligations and notice of or proof of reliance by the Buyer upon this Guaranty or acceptance of this Guaranty; the Obligations, and any of them, shall conclusively be deemed to have been created, contracted or incurred, or renewed, extended, amended or waived in reliance upon this Guaranty; and all dealings between any Seller or the Guarantor, on the one hand, and the Buyer, on the other, shall likewise be conclusively presumed to have been had or consummated in reliance upon this Guaranty. Guarantor waives diligence, presentment, protest, demand for payment and notice of default or nonpayment to or upon any Seller or the Guaranty with respect to the Obligations. This Guaranty shall be construed as a continuing, absolute and unconditional guarantee of payment without regard to (i) the validity or enforceability of the Repurchase Agreement, the other Program Agreements, any of the Obligations or any collateral security therefor or guarantee or right of offset with respect thereto at any time or from time to time held by the Buyer, (ii) any defense, set-off or counterclaim (other than a defense of payment or performance) which may at any time be available to or be asserted by any Seller against the Buyer, or (iii) any other circumstance whatsoever (with or without notice to or knowledge of any Seller or the Guarantor) which constitutes, or might be construed to constitute, an equitable or legal discharge of a Seller for the Obligations, or of the Guarantor under this Guaranty, in bankruptcy or in any -3- other instance. When pursuing its rights and remedies hereunder against the Guarantor, the Buyer may, but shall be under no obligation, to pursue such rights and remedies that they may have against any Seller or any other Person or against any collateral security or guarantee for the Obligations or any right of offset with respect thereto, and any failure by the Buyer to pursue such other rights or remedies or to collect any payments from any Seller or any such other Person or to realize upon any such collateral security or guarantee or to exercise any such right of offset, or any release of any Seller or any such other Person or any such collateral security, guarantee or right of offset, shall not relieve the Guarantor of any liability hereunder, and shall not impair or affect the rights and remedies, whether express, implied or available as a matter of law, of the Buyer against the Guarantor. This Guaranty shall remain in full force and effect and be binding in accordance with and to the extent of its terms upon the Guarantor and their successors and assigns thereof, and shall inure to the benefit of the Buyer, and successors, indorsees, transferees and assigns, until all the Obligations and the obligations of the Guarantor under this Guaranty shall have been satisfied by payment in full, notwithstanding that from time to time during the term of the Repurchase Agreement any Seller may be free from any Obligations. (b) Without limiting the generality of the foregoing, Guarantor hereby agrees, acknowledges, and represents and warrants to the Buyer as follows: (i) Guarantor hereby waives any defense arising by reason of, and any and all right to assert against the Buyer any claim or defense based upon, an election of remedies by the Buyer which in any manner impairs, affects, reduces, releases, destroys and/or extinguishes Guarantor's subrogation rights, rights to proceed against any Seller or any other guarantor for reimbursement or contribution, and/or any other rights of the Guarantor to proceed against any Seller, against any other guarantor, or against any other person or security. (ii) Guarantor is presently informed of the financial condition of each Seller and of all other circumstances which diligent inquiry would reveal and which bear upon the risk of nonpayment of the Obligations. The Guarantor hereby covenants that it will make its own investigation and will continue to keep itself informed of each Seller's financial condition, the status of other guarantors, if any, of all other circumstances which bear upon the risk of nonpayment and that it will continue to rely upon sources other than the Buyer for such information and will not rely upon the Buyer for any such information. Absent a written request for such information by the Guarantor to the Buyer, Guarantor hereby waives its right, if any, to require the Buyer to disclose to Guarantor any information which the Buyer may now or hereafter acquire concerning such condition or circumstances including, but not limited to, the release of or revocation by any other guarantor. (iii) Guarantor has independently reviewed the Repurchase Agreement and related agreements and has made an independent determination as to the validity and enforceability thereof, and in executing and delivering this Guaranty to the Buyer, Guarantor is not in any manner relying upon the validity, and/or enforceability, and/or attachment, and/or perfection of any Liens or security interests of any kind or nature -4- granted by any Seller or any other guarantor to the Buyer, now or at any time and from time to time in the future. 7. Reinstatement. This Guaranty shall continue to be effective, or be reinstated, as the case may be, if at any time payment, or any part thereof, of any of the Obligations is rescinded or must otherwise be restored or returned by the Buyer upon the insolvency, bankruptcy, dissolution, liquidation or reorganization of any Seller or upon or as a result of the appointment of a receiver, intervenor or conservator of, or trustee or similar officer for, any Seller or any substantial part of its property, or otherwise, all as though such payments had not been made. 8. Payments. Guarantor hereby agrees that the Obligations will be paid to the Buyer without set-off or counterclaim in U.S. Dollars. 9. Event of Default. If an Event of Default under the Repurchase Agreement shall have occurred and be continuing, the Guarantor agrees that, as between the Guarantor and Buyer, the Obligations may, in good faith, be declared to be due for purposes of this Guaranty notwithstanding any stay, injunction or other prohibition which may prevent, delay or vitiate any such declaration as against any Seller and that, in the event of any such declaration (or attempted declaration), such Obligations shall forthwith become due by the Guarantor for purposes of this Guaranty. 10. Severability. Any provision of this Guaranty which is prohibited or unenforceable in any jurisdiction shall, as to such jurisdiction, be ineffective to the extent of such prohibition or unenforceability without invalidating the remaining provisions hereof, and any such prohibition or unenforceability in any jurisdiction shall not invalidate or render unenforceable such provision in any other jurisdiction. 11. Headings. The paragraph headings used in this Guaranty are for convenience of reference only and are not to affect the construction hereof or be taken into consideration in the interpretation hereof. 12. No Waiver; Cumulative Remedies. The Buyer shall not by any act (except by a written instrument pursuant to paragraph 13 hereof), delay, indulgence, omission or otherwise be deemed to have waived any right or remedy hereunder or to have acquiesced in any Default or Event of Default or in any breach of any of the terms and conditions hereof. No failure to exercise, nor any delay in exercising, on the part of the Buyer, any right, power or privilege hereunder shall operate as a waiver thereof. No single or partial exercise of any right, power or privilege hereunder shall preclude any other or further exercise thereof or the exercise of any other right, power or privilege. A waiver by the Buyer of any right or remedy hereunder on any one occasion shall not be construed as a bar to any right or remedy which the Buyer would otherwise have on any future occasion. The rights and remedies herein provided are cumulative, may be exercised singly or concurrently and are not exclusive of any rights or remedies provided by law. 13. Waivers and Amendments; Successors and Assigns; Governing Law. None of the terms or provisions of this Guaranty may be waived, amended, supplemented or otherwise -5- modified except by a written instrument executed by the Guarantor and the Buyer, provided that any provision of this Guaranty may be waived by the Buyer in a letter or agreement executed by the Buyer or by facsimile or electronic transmission from the Buyer. This Guaranty shall be binding upon the heirs, personal representatives, successors and assigns of the Guarantor and shall inure to the benefit of the Buyer and its respective successors and assigns. 14. Notices. Notices by the Buyer to the Guarantor may be given by mail, or by telecopy transmission, addressed to the Guarantor at the Guarantor's respective address or transmission number set forth under its signature below and shall be effective (a) in the case of mail, five days after deposit in the postal system, first class certified mail and postage pre-paid, (b) one Business Day following timely delivery to a nationally recognized overnight courier service for next Business Day delivery and (c) in the case of telecopy transmissions, when sent, transmission electronically confirmed. 15. JURISDICTION. (a) THIS GUARANTY SHALL BE GOVERNED BY, AND CONSTRUED AND INTERPRETED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK. (b) GUARANTOR HEREBY WAIVES TRIAL BY JURY. GUARANTOR HEREBY IRREVOCABLY CONSENTS TO THE EXCLUSIVE JURISDICTION OF ANY COURT OF THE STATE OF NEW YORK, OR IN THE UNITED STATES DISTRICT COURT FOR THE SOUTHERN DISTRICT OF NEW YORK, ARISING OUT OF OR RELATING TO THE PROGRAM AGREEMENTS IN ANY ACTION OR PROCEEDING. GUARANTOR HEREBY SUBMITS TO, AND WAIVES ANY OBJECTION IT MAY HAVE TO, EXCLUSIVE PERSONAL JURISDICTION AND VENUE IN THE COURTS OF THE STATE OF NEW YORK AND THE UNITED STATES DISTRICT COURT FOR THE SOUTHERN DISTRICT OF NEW YORK, WITH RESPECT TO ANY DISPUTES ARISING OUT OF OR RELATING TO THE PROGRAM AGREEMENTS. 16. Integration. This Guaranty represents the agreement of the Guarantor with respect to the subject matter hereof and there are no promises or representations by the Buyer relative to the subject matter hereof not reflected herein. 17. Acknowledgments. Guarantor hereby acknowledges that: (a) Guarantor has been advised by counsel in the negotiation, execution and delivery of this Guaranty and the other Program Agreements; (b) the Buyer does not have any fiduciary relationship to the Guarantor, and the relationship between the Buyer and the Guarantor is solely that of surety and creditor; and (c) no joint venture exists between the Buyer and the Guarantor or among the Buyer, any Seller and the Guarantor. -6- [ Signature pages follow ] -7- IN WITNESS WHEREOF, the undersigned has caused this Guaranty to be duly executed and delivered as of the date first above written. American Home Mortgage Holdings, Inc., as Guarantor By: /s/ Alan B. Horn ------------------------------------- Name: Alan B. Horn Title: Executive Vice President, General Counsel & Secretary Address for Notices: American Home Mortgage Holdings, Inc. 538 Broadhollow Road Melville, NY 11747 Attn: Craig Pino Telecopier: (516) 495-5411 Telephone: (516) 495-7026 With a copy to Alan B. Horn, General Counsel at the above address.