Document:

<PAGE>

                                                                    Exhibit 10.4

                            STOCK PURCHASE AGREEMENT

         THIS AGREEMENT is made and entered into this 9th day of August, 2000 by
and between Theodore Charles and Janice Charles, (hereinafter referred to as
"Sellers") and Investors Capital Holdings, Ltd., (hereinafter referred to as
"Purchaser");

                              W I T N E S S E T H:

         WHEREAS, the Sellers are the record owners and holders of the issued
and outstanding shares of the capital stock of ICC Insurance Agency, Inc.,
(hereinafter referred to as the "Corporation"), a Massachusetts corporation,
which Corporation has issued capital stock of one thousand (1,000) shares of no
par value common stock, and

         WHEREAS, the Purchaser desires to purchase said stock and the Sellers
desire to sell said stock, upon the terms and subject to the conditions
hereinafter set forth;

         NOW, THEREFORE, in consideration of the mutual covenants and agreements
contained in this Agreement, and in order to consummate the purchase and the
sale of the Corporation's Stock aforementioned, it is hereby agreed as follows:

1. PURCHASE AND SALE. Subject to the terms and conditions hereinafter set forth,
at the closing of the transaction contemplated hereby, the Sellers shall sell,
convey, transfer, and deliver to the Purchaser certificates representing such
stock, and the Purchaser shall purchase from the Sellers the Corporation's Stock
in consideration of the purchase price set forth in this Agreement. The
certificates representing the Corporation's Stock shall be duly endorsed for
transfer or accompanied by appropriate stock transfer powers duly executed in
blank, in either case with signatures guaranteed in the customary fashion, and
shall have all the necessary documentary transfer tax stamps affixed thereto at
the expense of the Sellers.

         The closing of the transactions contemplated by this Agreement (the
"Closing"), shall be held at 230 Broadway, Lynnfield, Massachusetts, on August
9, 2000 at 10:00 a.m., or such other place, date and time as the parties hereto
may otherwise agree.

2. AMOUNT AND PAYMENT OF PURCHASE PRICE. The total consideration and method of
payment thereof are fully set out in Exhibit "A" attached hereto and made a part
hereof.

3. REPRESENTATIONS AND WARRANTIES OF SELLERS. Sellers hereby warrant and
represent:

         a. ORGANIZATION AND STANDING. Corporation is a corporation duly
         organized, validly existing and in good standing under the laws of the
         Commonwealth of Massachusetts and has the corporate power and authority
         to carry on its business as it is now being conducted.

         b. RESTRICTIONS ON STOCK. The Sellers are not parties to any agreement,
         written or oral, creating rights in respect to the Corporation's Stock
         in any third person or relating to

                                       1
<PAGE>

         the voting of the Corporation's Stock. Sellers are the lawful owners of
         the Stock, free and clear of all security interests, liens,
         encumbrances, equities and other charges. There are no existing
         warrants, options, stock purchase agreements, redemption agreements,
         restrictions of any nature, calls or rights to subscribe of any
         character relating to the stock, nor are there any securities
         convertible into such stock.

4. REPRESENTATIONS AND WARRANTIES OF SELLERS AND PURCHASER. Sellers and
Purchaser hereby represent and warrant that there has been no act or omission by
Sellers, Purchaser or the Corporation which would give rise to any valid claim
against any of the parties hereto for a brokerage commission, finder's fee, or
other like payment in connection with the transactions contemplated hereby.

5. GENERAL PROVISIONS.

         a. ENTIRE AGREEMENT. This Agreement (including the exhibits hereto and
         any written amendments hereof executed by the parties) constitutes the
         entire Agreement and supersedes all prior agreements and
         understandings, oral and written, between the parties hereto with
         respect to the subject matter hereof.

         b. SECTIONS AND OTHER HEADINGS. The section and other headings
         contained in this Agreement are for reference purposes only and shall
         not affect the meaning or interpretation of this Agreement.

         c. GOVERNING LAW. This Agreement, and all transactions contemplated
         hereby, shall be governed by, construed and enforced in accordance with
         the laws of the Commonwealth of Massachusetts. The parties herein waive
         trial by jury and agree to submit to the personal jurisdiction and
         venue of a court of subject matter jurisdiction located in Essex
         County, Commonwealth of Massachusetts. In the event that litigation
         results from or arises out of this Agreement or the performance
         thereof, the parties agree to reimburse the prevailing party's
         reasonable attorney's fees, court costs, and all other expenses,
         whether or not taxable by the court as costs, in addition to any other
         relief to which the prevailing party may be entitled.

                                       2
<PAGE>

IN WITNESS WHEREOF, this Agreement has been executed by each of the individual
parties hereto on the date first above written.

Signed and sealed:

Sellers:

/s/ Theodore E. Charles             /s/ Janice Charles
------------------------            ------------------------
Theodore E. Charles                 Janice Charles

Purchaser:

Investors Capital Holdings, Ltd.

By:      /s/  Timothy B. Murphy
         -------------------------
         Timothy B. Murphy

           8/9/00
         ------------------------
         Date

                                       3
<PAGE>

                                   EXHIBIT "A"

                      AMOUNT AND PAYMENT OF PURCHASE PRICE

1.       CONSIDERATION.

         As total consideration for the purchase and sale of the Corporation's
Stock, pursuant to this Agreement, the Purchaser shall pay to the Sellers the
sum of one hundred thousand dollars ($100,000.00), such total consideration to
be referred to in this Agreement as the "Purchase Price".

2.       PAYMENT.

         The Purchase Price shall be paid as follows:

         i. The sum of one hundred thousand dollars ($100,000.00) to be
         delivered to the Sellers upon the execution of this Agreement.

                                       4<PAGE>

                                                                   Exhibit 4.1

                            [WJ COMMUNICATIONS LOGO]

COMMON STOCK                                                     COMMON STOCK

              INCORPORATED UNDER THE LAWS OF THE STATE OF DELAWARE

                                                              CUSIP 929284 10 7

THIS CERTIFIES THAT                                           SEE REVERSE FOR
                                                             CERTAIN DEFINITIONS

IS THE RECORD HOLDER OF

  FULLY PAID AND NONASSESSABLE SHARES OF THE COMMON STOCK, $.01 PAR VALUE, OF
                              WJ COMMUNICATIONS, INC.
transferable on the books of the Corporation by the holder hereof in person
or by a duly authorized attorney upon surrender of this Certificate properly
endorsed. This Certificate is not valid unless countersigned and registered
by the Transfer Agent and Registrar.
  WITNESS the facsimile seal of the Corporation and the facsimile signatures
of its duly authorized officers.

Dated:

                                     [SEAL]

 /s/ Rainer Growitz                               /s/ Malcolm Caraballo
VICE PRESIDENT FINANCE AND SECRETARY       PRESIDENT AND CHIEF EXECUTIVE OFFICER

COUNTERSIGNED AND REGISTERED:
  CHASEMELLON SHAREHOLDER SERVICES, L.L.C.
           TRANSFER AGENT AND REGISTRAR

                AUTHORIZED SIGNATURE

<PAGE>

                              WJ COMMUNICATIONS, INC.

    THE CORPORATION WILL FURNISH WITHOUT CHARGE TO EACH STOCKHOLDER WHO SO
REQUESTS A FULL STATEMENT OF THE DESIGNATIONS, RELATIVE RIGHTS, PREFERENCES
AND LIMITATIONS OF EACH CLASS OF STOCK OR SERIES THEREOF AUTHORIZED TO BE
ISSUED AND THE AUTHORITY OF THE BOARD OF DIRECTORS OF THE CORPORATION TO
DESIGNATE AND FIX THE RELATIVE RIGHTS, PREFERENCES AND LIMITATIONS OF CLASSES
OF PREFERRED STOCK IN SERIES.

    The following abbreviations, when used in the inscription on the face of
this certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

  TEN COM -as tenants in common          UNIF GIFT MIN ACT-______Custodian______
  TEN ENT -as tenants by the entireties                    (Cust)        (Minor)
  JT WROS -as joint tenants with right         under Uniform Gifts to Minors
           of survivorship and not as          Act_______________________
           tenants in common                            (State)

    Additional abbreviations may also be used though not in the above list.

    For value received,_______________________________hereby sell, assign and
transfer unto

PLEASE INSERT SOCIAL SECURITY OR OTHER
   IDENTIFYING NUMBER OF ASSIGNEE
________________________________________
______________________________________________________________________________
______________________________________________________________________________
(Please print or typewrite name and address including postal zip code of
assignee)
______________________________________________________________________________
______________________________________________________________________________
_______________________________________________________________________ Shares
of the Common Stock represented by the within Certificate, and do hereby
irrevocably constitute and
appoint______________________________________________________________________
__________________________________________________________________ Attorney
to transfer the said Shares on the Books of the within-named Corporation with
full power of substitution in the premises.

Dated:________________________________

                                       _______________________________________
                                       NOTICE: The signature to this
                                       assignment must correspond with the name
                                       co written upon the face of the
                                       certificate in every particular, without
                                       alteration or enlargement, or any change
                                       whatever.

SIGNATURE(S) GUARANTEED:______________________________________________________
                        THE SIGNATURE(S) MUST BE GUARANTEED BY AN ELIGIBLE
                        GUARANTOR INSTITUTION (BANKS, STOCKBROKERS, SAVINGS AND
                        LOAN ASSOCIATIONS AND CREDIT UNIONS WITH MEMBERSHIP IN
                        AN APPROVED SIGNATURE GUARANTEE MEDALLION PROGRAM),
                        PURSUANT TO S.E.C. RULE 17Ad-15.

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00013-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00013-of-00352.parquet"}]]