EXHIBIT 10.40

EXECUTION VERSION

TERMINATION AND MUTUAL RELEASE AGREEMENT

This Termination and Mutual Release Agreement (this “Agreement”) is made and entered into as of the 5th day of June, 2012 (the “Effective Date”), by and among Broadridge Financial Solutions, Inc. (“Broadridge Financial”), Ridge Clearing & Outsourcing Solutions, Inc. (“Ridge”), Broadridge Financial Solutions (Canada) Inc., (“Broadridge Canada” and, together with Broadridge Financial and Ridge, collectively “Broadridge”), Penson Worldwide, Inc. (“PWI”), Penson Financial Services, Inc. (“PFSI”) and Penson Financial Services Canada Inc. (“PFSC” and, together with PWI and PFSI, collectively “Penson”) (Broadridge, PWI, PFSC and PFSI is referred to each as a “Party” and collectively, as the “Parties”).

RECITALS:

WHEREAS, Broadridge Financial and PWI entered into that certain Master Services Agreement dated as of November 2, 2009, as amended from time to time prior to the date hereof (as amended, the “MSA”);

WHEREAS, Broadridge Financial and PWI agreed to cause their respective affiliates to enter into schedules governed by the terms of the MSA (including, without limitation, any and all attachments thereto, each a “Schedule” and collectively, the “Schedules,” and the MSA, the Schedules and all attachments and other documents, agreements and instruments related thereto referred to as the “MSA Documents”), by which certain affiliates of Broadridge (the “Ridge Local Affiliates”) would provide certain services to certain affiliates of PWI, including PFSI and PFSC, (the “Penson Local Affiliates”) in Canada, the United States and the United Kingdom 1;

WHEREAS, Broadridge, the Ridge Local Affiliates, Penson and the Penson Local Affiliates (each of the foregoing, an “MSA Party,” and, collectively, the “MSA Parties”) did enter into certain Schedules to provide certain services, which are governed by the terms of the MSA;

WHEREAS, PFSI has advised Broadridge that it has been directed by FINRA to enter into a transaction that calls for the transfer of customer accounts to a new SEC registered broker-dealer by June 8, 2012 or FINRA will seriously consider asking PFSI to accede to a SIPC liquidation, thereby triggering a termination of certain Schedules under the MSA Documents (the “FINRA Letter”);

WHEREAS, as a result of the FINRA Letter noted above, PFSI and Penson have determined that a termination of the MSA documents is imminent and unavoidable;

1 | All capitalized terms not defined herein shall have the meanings given to them in the MSA Documents.

WHEREAS, Broadridge Financial has agreed, at the request of Penson, which has advised Broadridge that it is acting in furtherance of the FINRA Letter, to transfer (the “Ridge Transaction”) the equity interests in Ridge to Apex Clearing Holdings LLC (“Newco”);

WHEREAS, Penson has informed Broadridge that subsequent to completion of the Ridge Transaction, in furtherance of the FINRA Letter, it intends to transfer to Ridge certain correspondent clearing contracts, and related underlying customer accounts, including those of PFSI (collectively, the “Transferred Accounts”), which prior to the date hereof were supported indirectly through the services provided by Broadridge and the Ridge Local Affiliates pursuant to the MSA Documents (the “Acquisition Transaction”);

WHEREAS, Broadridge has determined, despite the imminent termination of those Schedules (the “Terminating Schedules”) pursuant to which certain of the Ridge Local Affiliates provide services to certain of the Penson Local Affiliates in the United States and the United Kingdom, to allow the termination of such Terminating Schedules on the terms and conditions hereof without triggering the full termination damages described in Section 3 hereof;

WHEREAS, Penson has determined that it is in the best interests of Penson and its customers that Broadridge and the Ridge Local Affiliates cooperate in transferring the Transferred Accounts and to continue to provide services related to such Transferred Accounts; and

WHEREAS, Ridge has requested that Broadridge and the Ridge Local Affiliates provide services to Ridge in the United States similar to those governed by the MSA Documents pursuant to a new services contract with Ridge in form and substance acceptable to Broadridge and Ridge (the “New Services Agreement”) concurrent with or immediately following the transfer of the Transferred Accounts.

NOW THEREFORE, in consideration of the terms and conditions set forth herein, and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, and intending to be legally bound hereby, the Parties agree as follows:

Section 1. Termination of Agreements. On the terms of and subject to the conditions set forth in this Agreement, and effective as of the Effective Date, the Parties hereby terminate each of the Terminating Schedules and acknowledge and agree that, except as otherwise expressly provided in this Agreement, no Party has any further obligations or shall derive any consideration or other benefit under any of the Terminating Schedules.

Section 2. Termination of Broadridge Seller Note. Broadridge agrees that, subject to and conditioned upon the occurrence of the Closing (as defined below), and subject to the terms of Section 8 hereof, that certain Amended and Restated Seller Note, dated effective as of July 1, 2011 (the “Broadridge Seller Note”), in the original principal amount of $20,578,155, shall be cancelled and all obligations of PWI under the Broadridge Seller Note, including but not limited to any liabilities with respect to legal, accounting or other expenses or reimbursements, are hereby discharged and released in full.

2

Section 3. Transition Assistance. Notwithstanding anything in Section 1 above or in the MSA Documents, (a) Penson agrees that it will assist in the transfer of Transferred Accounts to Ridge, as may be reasonably requested by Broadridge subsequent to the date hereof; and (b) Broadridge agrees that, notwithstanding anything to the contrary in any MSA Documents, it will allow Penson continued use of, and will continue to provide to Penson, without charge, the Software and Services pursuant to the MSA Documents, as necessary to enable Penson to complete the orderly transfer of Transferred Accounts and related assets in accordance with all applicable legal and regulatory requirements.

Section 4. Termination Claims. Broadridge contends that as a result of the termination of the Terminating Schedules, it has incurred and suffered and has the right to assert claims, including for Damages, against PWI and PFSI in an amount not less than $87 million (the “Termination Claims”). Penson disputes the Termination Claims and contends that it possesses valid defenses to such claims. The Parties now desire and intend to settle, compromise and resolve the Termination Claims on the terms set forth herein, subject to the terms of Section 8 hereof, and to that end, enter into this Agreement and the Releases contained in Section 7 hereof.

Section 5. Remaining MSA Termination Claims. In order to induce Broadridge to enter into this Agreement, to agree to the termination of the Terminating Schedules, and to waive certain of its rights, claims and interests under the MSA Documents, the parties agree that from and after the Effective Date, subject to the terms of Section 8 hereof, Broadridge’s claims in respect of the MSA Documents shall be limited to an aggregate of $20 million and shall be further limited solely to those claims that Broadridge may have against PFSC in connection with the termination of the MSA Documents to the extent related to PFSC (the “Remaining MSA Termination Claims”), which the parties acknowledge shall not be subject to the Releases contained in Section 7 hereof, and PFSC shall not release any of its defenses with respect to the Remaining MSA Termination Claims, which the parties acknowledge shall not be subject to the Releases contained in Section 7 hereof.

Section 6. Conditions Precedent to Closing. The effectiveness of this Agreement is subject to and conditioned on the satisfaction of each of the following conditions precedent (or waiver by the Party entitled to the benefit of such condition precedent) (the time of such satisfaction or waiver of all of the following conditions is referred to herein as the “Closing”), and thereafter this Agreement shall be binding upon and inure to the benefit of the Parties and their respective successors and assigns. Penson agrees that the failure to satisfy any of the conditions set forth in this Agreement shall in no way affect or impair the obligations of any Party or be construed as a waiver by any Party of any of Broadridge’s rights under any of the MSA Documents or hereunder.

(a) Broadridge shall have received each of the following:

(i) this Agreement, duly authorized, executed and delivered by PWI, PFSC and PFSI;

(ii) written confirmation from Penson, in a form reasonably acceptable to Broadridge, that the Acquisition Transaction has closed;

3

(iii) written confirmation from Penson, in a form reasonably acceptable to Broadridge, that Penson consents to Broadridge’s entry into the New Services Agreement with Ridge concerning the Transferred Accounts;

(iv) written confirmation from Penson that Newco has received all expected equity contributions from Apex Clearing Solutions LLC (or an affiliate thereof);

(v) the New Services Agreement, fully executed, authorized and delivered by Ridge; and

(vi) such other agreements, documents, instruments and certificates as Broadridge may reasonably request related to the transactions contemplated by this Agreement and the Acquisition Transaction.

(b) Penson shall have received each of the following or the following shall have occurred (as applicable):

(i) this Agreement, duly authorized, executed and delivered by Broadridge;

(ii) written confirmation from Broadridge that it consents to the Acquisition Transaction; and

(iii) the Acquisition Transaction has closed.

Section 7. Releases.

(a) In consideration of Broadridge’s execution of this Agreement, subject to and conditioned upon the occurrence of the Closing, Penson, on behalf of itself, the Penson Local Affiliates, and their respective current and former agents, servants, officers, directors, shareholders, employees, subsidiaries, divisions, branches, units, affiliates, parents, attorneys, successors, predecessors, heirs, personal representatives, and assigns, and any other party, person or entity claiming under or through Penson and the Penson Local Affiliates, but in no event including Ridge or Newco (each, a “Penson Party” and collectively, the “Penson Parties”), hereby generally, irrevocably and forever releases, discharges and acquits Broadridge and the Ridge Local Affiliates and their respective current and former agents, servants, officers, directors, shareholders, employees, subsidiaries, divisions, branches, units, affiliates, parents, attorneys, successors, predecessors, heirs, personal representatives, and assigns (each, a “Broadridge Party” and collectively, the “Broadridge Parties”), to the fullest extent permitted by law, from all manners of action, causes of action, judgments, executions, debts, demands, rights, damages, costs, expenses and claims of every kind, nature, and character whatsoever, whether in law or in equity, whether based on contract (including, without limitation, quasi-contract or estoppel), statute, regulation, tort (including, without limitation, intentional torts, fraud, misrepresentation, defamation, breaches of alleged fiduciary duty, recklessness, gross negligence, or negligence) or otherwise,

4

accrued or unaccrued, known or unknown, matured, unmatured, liquidated or unliquidated, certain or contingent, that such releasing Penson Party ever had or claimed to have or now has or claims to have presently or at any future date, against any Broadridge Party arising under or related to any matter or thing whatsoever, including, without limitation, the Broadridge Seller Note, the MSA Documents and their negotiation, execution, performance, any breaches thereof, or their termination and the relationship between Broadridge and Penson; provided, however, that (A) neither of the Acquisition Transaction nor the New Services Agreement (including their respective terms and conditions and the transactions contemplated thereby) shall affect the rights, interests and obligations of the Parties under this Agreement; (B) this release shall not release Broadridge from any obligations under this Agreement; and (C) nothing under this Agreement shall affect the rights, interests and obligations of the parties under either of the Acquisition Transaction or the New Services Agreement. Notwithstanding anything contained in this Agreement to the contrary, PFSC retains and preserves any and all defenses that PFSC may have against the Remaining MSA Termination Claims under the MSA Documents or under applicable law.

(b) In consideration of Penson’s execution of this Agreement, subject to and conditioned upon the occurrence of the Closing, Broadridge, on behalf of itself and the Broadridge Parties (but not including Newco for any purpose of this paragraph b), hereby generally, irrevocably and forever releases, discharges and acquits the Penson Parties, to the fullest extent permitted by law, from all manners of action, causes of action, judgments, executions, debts, demands, rights, damages, costs, expenses and claims of every kind, nature, and character whatsoever, whether in law or in equity, whether based on contract (including, without limitation, quasi-contract or estoppel), statute, regulation, tort (including, without limitation, intentional torts, fraud, misrepresentation, defamation, breaches of alleged fiduciary duty, recklessness, gross negligence, or negligence) or otherwise, accrued or unaccrued, known or unknown, matured, unmatured, liquidated or unliquidated, certain or contingent, that such releasing Broadridge Party ever had or claimed to have or now has or claims to have presently or at any future date, against any Penson Party arising under or related to any matter or thing whatsoever, including, without limitation, the Broadridge Seller Note, the MSA Documents and their negotiation, execution, performance, any breaches thereof, or their termination and the relationship between Broadridge and Penson; provided, however, that (A) neither of the Acquisition Transaction nor the New Services Agreement (including their respective terms and conditions and the transactions contemplated thereby) shall affect the rights, interests and obligations of the Parties under this Agreement; (B) this release shall not release Penson from any obligations under this Agreement; (C) this release shall not release PFSC from the Remaining MSA Termination Claims; (D) nothing under this Agreement shall affect the rights, interests and obligations of the parties under either of the Acquisition Transaction or the New Services Agreement, or under any other new commercial arrangements between any Penson Party and either Ridge or Newco that become effective at any time from and after the Closing; and (E) this clause (b), including the release, discharge and acquittal set forth herein, shall not apply to, or limit the rights, claims, remedies, indemnities or causes of action of, Ridge for periods of time, or claims, indemnities or rights arising, at or after the closing of the Ridge Transaction, including all rights of Ridge under the Assignment and Assumption Agreement dated as of May 31, 2012, by and among PFSI and Newco (the “Assignment Agreement”), and related transaction documents.

5

(c) In entering into this Agreement, the Parties, and each of them, expressly waive any and all rights that they have or may have under California law (including California Civil Code Section 1542) or under any other similar state or federal statute or under any common law principle that is of similar effect as California Civil Code Section 1542. California Civil Code Section 1542 provides as follows:

A general release does not extend to claims which the creditor does not know or suspect to exist in his or her favor at the time of executing the release, which if known by him or her must have materially affected his or her settlement with the debtor.

The consequences of the foregoing waiver have been explained by counsel to the Parties. The Parties, and each of them, acknowledge that they may hereafter discover facts different from, or in addition to, those which they now know or believe to be true with respect to the Agreement and agree that this Agreement and the releases contained herein shall be and remain effective in all respects notwithstanding such different or additional facts or the discovery thereof.

Section 8. Reinstatement. In the event that this Agreement, the Assignment Agreement or the Purchase and Sale Agreement by and among Broadridge Financial, Broadridge Securities Processing Solutions, Inc. and Apex Clearing Holdings LLC dated as of May 31, 2012 shall be invalidated, declared to be null and void, or declared to be unenforceable by a court of competent jurisdiction, (i) the Broadridge Seller Note shall be reinstated in the original principal amount of $20,578,155 and the provisions of Section 2 hereof shall be void, shall not be enforceable against Broadridge, and shall be of no further force and effect; (ii) the Termination Claims shall be reinstated against PWI and PFSI (in an amount not less than $87 million); (iii) the Remaining MSA Termination Claims shall not be limited to an aggregate of $20 million, and the provisions of Section 5 hereof shall be void, shall not be enforceable against any party, and shall be of no further force and effect; (iv) the provisions of Section 7 hereof shall be void, shall not be enforceable against any party, and shall be of no further force and effect; and (v) the Letter Agreement of even date herewith between Ridge (whose name is to be changed to Apex Clearing Corporation) and Broadridge Financial shall be terminated and of no further force or effect.

Section 9. Representations. Each Party represents and warrants to each other Party, that (i) the execution, delivery and performance by such Party of this Agreement is within the powers of such Party and have been duly authorized by all necessary action on the part of such Party, (ii) this Agreement has been duly executed and delivered by such Party and constitutes a valid and binding obligation of such Party, enforceable against such Party in accordance with the terms hereof, (iii) it is not relying upon any statements, understandings, representations, expectations or agreements other than those expressly set forth in this Agreement, (iv) it has had the opportunity to be represented and advised by legal counsel in connection with this

6

Agreement, which it enters into voluntarily and of its own choice and not under coercion or duress, (v) it has made its own investigation of the facts and is relying upon its own knowledge and the advice of its counsel, (vi) it has no expectation that any of the other Parties will disclose facts material to the MSA Documents or this Agreement except as contemplated herein, and (vii) it knowingly waives any and all claims that this Agreement was induced by any misrepresentation or non-disclosure and knowingly waives any and all rights to rescind or avoid this Agreement based upon presently existing facts, known or unknown. Broadridge represents and warrants that as of the date hereof, it has not sold, assigned or otherwise transferred any rights or claims arising hereunder or otherwise as a result of the termination of the Broadridge Seller Note and the Terminating Schedules.

Section 10. Further Assurances. The Parties, other than Ridge, agree to execute and deliver, at no cost to Broadridge, such further documents and instruments evidencing, pertaining to or facilitating the transactions contemplated by this Agreement and the New Services Agreement as may be reasonably requested by another Party from time to time.

Section 11. General.

(a) Assignment. Neither this Agreement, nor any of the rights, duties or obligations hereunder, may be delegated or assigned by a Party hereto or thereto without the prior written consent of the other Parties hereto except to an affiliate, including, without limitation, any merger, consolidation acquisition or amalgamation in which all or substantially all of its assets or equity ownership are transferred or as part of any sale of all or substantially all of the capital stock or assets. This Agreement shall be binding upon and shall inure to the benefit of the Parties hereto and their respective successors and permitted assigns.

(b) Obligations Several. The obligations of the Parties, other than Ridge, shall be deemed to be several and not joint with the obligations of any other Party. Ridge’s obligations under this Agreement shall be limited to the releases it is providing pursuant to Section 7(b) hereof. Ridge shall have no liability for the obligations of any other Broadridge Party under this Agreement, and no Party shall proceed or make any claim against Ridge in respect of such obligations.

(c) Interpretation. Capitalized terms not otherwise defined herein shall have the meanings ascribed to them in the MSA Documents. In this Agreement (i) the words “hereof,” “herein,” “hereto,” “hereunder” and the like mean and refer to this Agreement as a whole and not merely to the specific Article, Section, subsection, paragraph or clause in which the respective word appears; (ii) the meaning of defined terms shall be equally applicable to both the singular and plural forms of the terms defined; (iii) the words “including,” “includes” and “include” shall be deemed to be followed by the words “without limitation;” (iv) the term “or” shall not be limiting; (v) references to agreements and other contractual instruments shall be deemed to include all subsequent amendments and other modifications thereto.

(d) Severability. If any provision of this Agreement (or any portion hereof) is held to be invalid, illegal or unenforceable, then the validity, legality or enforceability of the remainder of this Agreement shall not in any way be affected or impaired thereby.

7

(e) Notices. All notices, consents, approvals, agreements, authorizations, acceptances, rejections, requests and waivers under this Agreement must be in writing and shall be forwarded by registered or certified mail or nationally recognized overnight courier and sent to:

To Broadridge:

Broadridge Financial Solutions, Inc.

1981 Marcus Avenue

Lake Success, NY 11042

Telephone: (516) 472-5458

Attn: General Counsel

With a copy to:

Squire Sanders (US) LLP

221 E. Fourth Street, Suite 2900

Cincinnati, OH 45202

Telephone: (513) 361-1200

Attn: Stephen D. Lerner

To Penson:

Penson Financial Services, Inc.

1700 Pacific Avenue, Suite 1400

Dallas, TX 75201

Telephone: (415) 409-1531

Attn: General Counsel

With a copy to:

Morgan, Lewis & Bockius LLP

1111 Pennsylvania Ave., NW

Washington, DC 20004-2541

Telephone: (202) 739-3000

Attn: Steven W. Stone

(f) Headings. The headings in this Agreement are intended for convenience of reference and shall not affect their interpretation.

(g) Counterparts. This Agreement and any document necessary for closing the transactions contemplated by this Agreement may be executed in counterparts, each of which shall be deemed an original agreement, but all of which together shall constitute one and the same instrument. This Agreement may be executed by facsimile signature.

8

(h) Governing Law. This Agreement shall be governed by, and construed and enforced in accordance with, the Laws of New York applicable to agreements wholly to be executed and to be performed therein.

(i) Third-Party Beneficiaries. This Agreement is by and between Broadridge and Penson only and is not intended to confer and shall not confer any benefits or rights upon any other persons not expressly made parties hereto, including, without limitation, customers of Penson or service providers of Broadridge.

(j) Integration; No Modification. This Agreement and the agreements, instruments and documents referred to in this Agreement contain the entire agreement of the parties with respect to its subject matter and supersede all existing agreements and all other oral, written or other communications between them concerning their subject matter. This Agreement shall not be modified in any way except by a writing signed by both parties.

[Signature Pages Follow]

9

IN WITNESS WHEREOF, the undersigned have executed, or have caused to be executed, this Agreement on the date first written above.

PENSON WORLDWIDE, INC.
By: |  | /s/ Philip A. Pendergraft
Name: |  |
Title: |  | Chief Executive Officer

PENSON FINANCIAL SERVICES, INC.
By: |  | /s/ Philip A. Pendergraft
Name: |  |
Title: |  | Chairman

PENSON FINANCIAL SERVICES CANADA INC.
By: |  | /s/ Philip A. Pendergraft
Name: |  |
Title: |  |

10

IN WITNESS WHEREOF, the undersigned have executed, or have caused to be executed, this Termination and Mutual Release Agreement on the date first written above.

BROADRIDGE FINANCIAL SOLUTIONS, INC.
By: |  | /s/ John Hogan
Name: |  |
Title: |  |

RIDGE CLEARING & OUTSOURCING SOLUTIONS, INC.
By: |  | /s/ Joseph Barra
Name: |  |
Title: |  |

BROADRIDGE FINANCIAL SOLUTIONS (CANADA) INC.
By: |  | /s/ Adam D. Amsterdam
Name: |  | Adam D. Amsterdam
Title: |  | President

11