by Mark Harris
In "Pseudo Stocks," STOCKS & COMMODITIES, December 1990, I showed some stock charts from a
random number generator resembling real life to an astonishing degree and some simple rules for price
transitions. Now, I would like to model a "specialist." This will add volume to the charts and,
additionally, we can see which situations are good or bad for our hypothetical market maker.
As a disclaimer, let me state right at the outset that I haven't a clue how a real-life specialist goes about
making a market for the stocks in which he specializes, how he manages financial accounting, nor what
he does when a large imbalance of orders exists. In this simulation, a "specialist" is simply a Smalltalk
program object (that is, a class) that responds to certain messages (requests).
My so-called specialist runs the price transitions in the simulation. For a first cut, the specialist will fill
buy orders at one tick above the current price (the asked price) and fill sell orders at one tick below (the
bid price). For now, the specialist will be indifferent to the size of the order — 10,000 shares will be
treated the same as a single lot of 100 shares. (There are no odd lots in this simulation.) In the simulation,
a market day is 20 transactions — which is totally arbitrary.
A random number generator produces a random number in the range of -1.0 to +1.0. The sign of the
number determines if it's buy or sell (plus is buy, minus is sell). The size of the number determines how
many shares. Thus, over a large number of samples, the ratio of buy to sell orders should be very nearly 1.
Even more arbitrary is setting the range for volume. Absolute values don't mean anything, since
everything in the simulation is scaled. But there needs to be some way to set the probability for the size of