<PAGE>

                                                                   EXHIBIT 10.23

                            STOCK PURCHASE AGREEMENT

         This Stock Purchase Agreement (this "Agreement"), dated as of August 8,
2002, is entered into by and between Benedict Gambino (the "Seller") and
TradeStation Group, Inc. (the "Purchaser" or the "Company").

                              W I T N E S S E T H:

                  WHEREAS, the Purchaser desires to purchase from the Seller,
and the Seller desires to sell to the Purchaser, the number of shares of common
stock (the "Common Stock") of TradeStation Group, Inc., a Florida corporation
(the "Company"), par value $.01 per share, listed under the Seller's name on
Schedule A attached hereto (such shares, collectively, the "Shares").

                  NOW, THEREFORE, in consideration of the mutual covenants and
agreements hereinafter set forth and other good and valuable consideration, the
receipt and sufficiency of which are hereby acknowledged, the parties hereto
agree as follows:

         1.       Sale and Purchase of the Shares. The Seller hereby sells to
the Purchaser, and the Purchaser hereby purchases from the Seller, the Shares to
be sold by the Seller as set forth on Schedule A attached hereto. The purchase
and sale of the Shares shall be effective as of the date of, and the closing
transactions shall occur pursuant to the terms of, this Agreement.

         2.       Payment for the Shares. Concurrently with the execution and
delivery of this Agreement, the Purchaser is hereby delivering or designating
authority to Marc J. Stone, General Counsel of the Company, as escrow agent (the
"Escrow Agent"), over a wire transfer or a Company check, in an amount equal to
the purchase price for all of the Shares being purchased and sold, as listed on
Schedule A attached hereto, as payment in full of the purchase price for all of
the Shares. Escrow Agent shall release the funds to the Seller upon Escrow
Agent's receipt of all the documents listed in Section 3.

         3.       Deliveries by Purchaser and Seller. The Purchaser and the
Seller are hereby delivering to the Escrow Agent at least one executed
counterpart of this Agreement. Concurrently with the execution and delivery of
this Agreement, the Seller is hereby delivering to the Escrow Agent a duly
executed stock power, signature guaranteed, from the Seller (the "Stock Power")
transferring those shares of Common Stock that are owned by the Seller and are
represented by a stock certificate(s) registered in the name of the Seller (the
"Stock Certificate(s)"), and the original Stock Certificate(s). Escrow Agent
shall deliver the Stock Power and the Stock Certificate(s) to the Company's
transfer agent with appropriate instructions.

         4.       Representations and Warranties by Seller. The Seller
represents and warrants the following to the Purchaser in order to induce the
Purchaser to purchase the Shares:

                  (a)      Seller has the power and authority to execute and
deliver this Agreement and to consummate the transactions to be consummated by
Seller. The execution and delivery by Seller of this Agreement and the
consummation by Seller of the transactions contemplated by this Agreement have
been duly authorized by Seller, and no action on the part of Seller or any

<PAGE>

other person or entity is necessary to authorize the execution and delivery of
this Agreement by Seller or the consummation by Seller of the transactions
contemplated by this Agreement. This Agreement has been properly and validly
executed and delivered by Seller and is a valid, binding and enforceable
agreement of and against Seller.

                  (b)      Seller has full right, power and authority to
transfer the Shares to be sold by Seller to the Purchaser as contemplated
herein, free and clear of all liens, security interests, charges, claims,
pledges, encumbrances and restrictions and rights and interests of any other
party whatsoever and of any nature (other than restrictions imposed by federal
or state securities laws).

                  (c)      The execution and delivery of this Agreement and the
performance and compliance with its terms by Seller will not (i) conflict with,
or result in the breach of, or trigger or accelerate any right or obligation
(including prepayment penalties), or constitute a default or an event of default
or an occurrence, circumstance, act or failure to act that, with the passage of
time, the giving of notice, or both, would become a default, or give rise to any
right of contingent payment, termination, cancellation, acceleration or
non-renewal, or (ii) result in the creation of any liens, charges, rights,
claims, interests, options or other encumbrances, restrictions or limitations of
any kind upon the Shares to be sold by Seller, whether tangible or intangible,
under (A) any contract, understanding, covenant, commitment, understanding,
arrangement, or other agreement or instrument of any kind whether oral or
written, (B) any law, rule, regulation, policy, ruling or other interpretation,
guideline, circular, judgment, order, decree or other directive or advice of any
kind of any governmental or quasi-governmental authority, agency or
instrumentality or (C) any restriction, condition, covenant or commitment
relating to or concerning the Shares to be sold by Seller.

                  (d)      There is no lawsuit, action, complaint, claim,
demand, notice, hearing, arbitration, investigation, inquiry or any other
proceeding, at law or in equity or before any administrative or enforcement
agency or body (a "Lawsuit") pending or threatened, affecting, directly or
indirectly, the Shares to be sold by Seller and Seller does not know of any
valid basis for any such Lawsuit. There is no judgment, order, writ, injunction,
decree or other similar command or directive of any court or federal, state,
local or foreign governmental or quasi-governmental authority, agency or
instrumentality that restricts Seller from consummating the transactions
contemplated by this Agreement.

                  (e)      Seller has sufficient knowledge and experience with
the Company including, without limitation, as a co-founder of TradeStation
Securities, Inc., a Florida corporation that is currently the primary operating
subsidiary of the Company, and otherwise, so as to be able to evaluate the risks
and merits of consummating the transactions contemplated by this Agreement.

                  (f)      Seller is fully familiar with all facts and
circumstances attendant to Seller's decision to sell the Shares to be sold by
Seller, has reviewed all of the Company's filings with the Securities Exchange
Commission and its recent press releases, has had an opportunity to ask
questions of, and receive answers from, representatives of the Company and has
available to him or it such information related to the Company and its business,
prospects, affairs and plans as

                                      2

<PAGE>

Seller deems necessary and sufficient to make Seller's decision to sell his
Shares, and all investigations, due diligence, and questions have been completed
or answered to Seller's satisfaction.

                  (g)      Seller has such knowledge and experience in financial
and business matters so as to be capable of evaluating the merits and risks of
selling his or its Shares.

                  (h)      Seller has reviewed, among other things, the
Company's Annual Report of Form 10-K (and its audited financial statements
included therein) for the fiscal year ended December 31, 2001 and its Quarterly
Reports on Form 10-Q for the fiscal quarter ended March 31, 2002 and June 30,
2002, as well as the Company's August 2, 2002 Proxy Statement. However, Seller
specifically understands and agrees that any business outlook information
included in any such documents represents only a prediction of future events and
is based largely on current expectations and beliefs concerning future events,
occurrences and circumstances that are subject to substantial risks,
uncertainties and change; accordingly, no assurance can be given that the
operating results forecasted will prove to be accurate and, in fact, the actual
operating results of the Company may prove to be materially different than those
forecasted.

                  (i)      Seller has been represented by such business, legal
and tax counsel and advisors and others, each of whom has been personally
selected by Seller, as Seller has found necessary to consult concerning the
consummation of the transactions contemplated by this Agreement, and such
representation has included an examination of all tax, financial and legal
aspects of the transactions contemplated by this Agreement.

         5.       Confidentiality. The Seller agrees that it will not issue any
press release or make any other public disclosure of this Agreement or the
contents hereof or of the transactions contemplated herein without the prior
approval of the Purchaser, which may be withheld in the sole discretion of the
Purchaser, unless such disclosure is required by law. The Purchaser acknowledges
that the Seller may be required to make disclosure regarding certain terms of
this Agreement under federal or state securities laws. To the extent any such
disclosure is required to be made, the Seller will be permitted to make such
disclosure (including, without limitation, any Schedule 13D or amendment thereof
and Form 4), but, before taking this step (the making or filing of such
disclosure) the Seller shall (a) consult with the Purchaser and its counsel and
(b) provide the Purchaser and its counsel, for comment, drafts of the proposed
disclosures, and shall include any additions or changes to such proposed
disclosures requested by the Purchaser or its counsel.

         6.       Miscellaneous.

                  (a)      Amendment. This Agreement may be amended only by an
instrument in writing signed by all of the parties hereto.

                  (b)      Survival. All representations and warranties
contained herein shall survive the execution and delivery of this Agreement and
the sale and delivery of the Shares.

                  (c)      Entire Understanding. This Agreement constitutes the
entire understanding among the parties relative to the purchase and sale of the
Shares and supersedes

                                      3

<PAGE>

all prior written or oral understandings, agreements, conditions and
representations, if any, relating to the purchase and sale of the Shares.

                  (d)      Governing Law. This Agreement shall be deemed a
contract made under the laws of the State of Florida and together with the
rights and obligations of the parties hereunder shall be construed under and
governed by the laws of such State without regard to the conflict of law
provisions thereof. Each of the parties hereto irrevocably consents to the
exclusive jurisdiction and venue of any federal or state court located within
Miami-Dade or Broward County in the State of Florida in connection with any
matter based upon or arising out of this Agreement or the matters contemplated
herein, agrees that process may be served upon them in any manner authorized by
the laws of the State of Florida for such persons and waives, and covenants not
to assert or plead, any objection which they might otherwise have to such
jurisdiction, such venue and such process.

                  (e)      Counterparts. This Agreement may be executed in one
or more counterparts or counterpart signature pages, each of which shall be
deemed an original, but all of which together shall constitute one and the same
instrument. Confirmation of execution by telefax of a facsimile signature page
shall be binding upon that party so confirming.

                         [SIGNATURES ON FOLLOWING PAGE]

                                      4
<PAGE>

         IN WITNESS WHEREOF, the parties hereto have executed and delivered this
Agreement as of the date set forth above.

                                    SELLER:

                                    /s/ Benedict Gambino
                                    --------------------------------------------
                                    BENEDICT GAMBINO

                                    PURCHASER:

                                    TRADESTATION GROUP, INC.

                                    By: /s/ Marc J. Stone
                                        ---------------------------------------
                                        Marc J. Stone, Vice President

                                      5

<PAGE>

                                   SCHEDULE A

                             IDENTITY OF SELLER AND
                 NUMBER AND PURCHASE PRICE OF SHARES TO BE SOLD

Seller: Benedict Gambino

Number of Shares to be sold: 1,500,000

Purchase Price: $2,025,000 ($1.35 per Share)