Honing An Algorithmic Trading Strategy
Honing An Algorithmic Trading Strategy
Honing An Algorithmic Trading Strategy
41 Chapter 4
Choosing the right algorithm for your trading strategy
51 Chapter 5
Anonymity and stealth
59 Chapter 6
Customising the broker’s algorithms
■ Chapter 4
Undetermined benchmarks
still try to complete the order even Algorithms can generally be split
if this would cause additional into two types of benchmark, pre-
determined and undetermined.
market impact.” First generation algorithms try to
obtain a yet undetermined bench-
mark, such as VWAP, where the
information that is electronically benchmark will be determined
fed to it, it cannot participate in over the life of the order. The more
off market prints and it cannot recently developed
make phone calls to negotiate Implementation Shortfall algo-
block trades. rithms will be measured against a
Secondly, you have to decide benchmark predetermined at
42 what proportion of the order you order creation.
want to execute via an algorithm. VWAP (Volume Weighted
You might want to put your Average Price) has been the most
entire order into an algorithm if commonly used algorithm histor-
it suits your benchmark or you ically. As things have evolved,
may want to combine algorithms VWAP has gained its critics but it
with more of a traditional trading still has its uses. Ultimately used
service, such as Block Trading or with the aim to minimise market
DMA. impact, VWAP is useful for exe-
Making the process even more cuting trades where you don’t
complex for the client is the fact necessarily have a view on a stock
that not all algorithms are equal. and want to obtain a fair price by
Brokers have different names for sampling market levels over a
algorithms that have similar trad- specified period. Due to its sensi-
ing styles and sometimes two tivity to changes in volume distri-
firms will offer an algorithm bution, VWAP will participate
under the same name, which will relative to liquidity. However,
execute very differently. This cre- VWAP algorithms do not gener-
ates a minefield for the client. ally take into account absolute
Only through education from bro- volume levels and will still try to
kers on what to expect of their complete the order even if this
algorithms and through actually would cause additional market
te
although this potentially means 2005/07/29 2005/07/29
Da
the order will not complete. 2,800,000 2,800,000
The expectation of VWAP is
Volume
2,400,000 2,400,000
not just about mean perfor-
2,000,000 2,000,000
mance; we know that if you exe-
1,600,000 1,600,000
cuted an order each and everyday
1,200,000 1,200,000
of the year in the same stock, the
800,000 800,000
mean performance would be
400,000 400,000
acceptable, however this is an 0 0
unlikely scenario. Therefore, the 8.00 16.35
Time
risk-adjusted performance and
the standard deviation of the
returns become important. Due
to VWAP’s sensitivity to volume Figure 2: LogicaCMG PLC 43
distributions, the performance
risk is affected by its ability to 8.00 16.35
2004/07/12 2004/07/12
predict changes in these distribu- 2005/01/11 20,050,111
2005/01/11
tions. The majority of trading
te
2005/07/25 2005/07/25
Da
Order execution
Implementation
The proportion of your order exe-
Probability density
Arrival
Price Shortfall cuted via an algorithm is also
important. If you are executing a
high frequency of smaller orders,
the generation of which are often
triggered by the price of the stock,
Implementation Shortfall algo-
rithms are the most suitable. Given
Price achieved the entirety of the order the algo-
rithm can work out how best to
optimise execution and minimise
benchmark they become very the shortfall on average. However,
aggressive until the order is com- if you had a large order that was
48 plete. If the stock is moving away also measured relative to the price
from the benchmark they become at which the investment decision
much more passive. was made, a standard
This results in a different distri- Implementation Shortfall algo-
bution of returns to that given by rithm may not be suitable; one rea-
the Implementation Shortfall algo- son being optimal execution may
rithm (Fig. 3). In Implementation take several days. The algorithm
Shortfall we get a relatively sym- will need to know completion is
metrical distribution of returns. not required by the end of day one
However, with Arrival Price we get and each day following, it would
a skewed distribution. This is need to know all the details of the
because we often complete our previous algorithms.
order before we get the chance to In this scenario we don’t neces-
participate at more favourable sarily have to rule out algorithmic
prices and as we slow down when execution, it just means more con-
the stock moves away we poten- trol will need to be taken. You can
tially participate at very still utilise a combination of algo-
unfavourable levels. This skewed rithms to achieve the desired
distribution of returns can be seen results. Many people will start
in any algorithm with macro price trading aggressively with a small
sensitivity. Inline algorithms that part of their order using an Arrival
vary their participation rate Price or Inline algorithm. As and
Anonymity and
stealth
What assurances can the sell-side offer to safeguard the client’s alpha
capture and minimise information leakage?
Richard Balarkas*
■
money manager is perceived to be
at stock selection and timing, the “The retention of alpha gained
greater the informational compo- through anonymity and
nent of the trade, and the greater
the likelihood that if this infor- stealth are hard components for a
mation leaks out the market will broker to measure.”
■ ALGORITHMIC TRADING ■ A BUY-SIDE HANDBOOK ■ THE TRADE 2005
■ Chapter 5
Game theory
Although game theory has been studied since the 1940s, it has only recently been
applied to the world of finance. Game theory champions garnered the 1994 Nobel
Prize in Economics, and, today, this theory is used to analyse everything from the
baseball strike to auctions. Increasingly, game theory is making its mark as a potent
tool for traders.
In simple terms, game theory is the study of conflict based on a formal approach
to decision-making that views decisions as choices made in a game. Whether
playing individually or in a group, each player in a conflict has more than one course
of action available to him, and the outcome of the ‘game’ depends on the interaction
of the strategies pursued by each party. Algorithms can take advantage of the fact
that game theory and probability often have the edge over human intuition. To
illustrate this, here are some problems where the answer does not appear to be
intuitive, and in one case is actually counter-intuitive (for answers and explanations,
see pages 56 and 57):
Problems 55
Example 1.
If you throw a die until the running total exceeds 12, what is the most likely final
total?
Example 2.
This is a demonstration of the power of faith in random decision-making over simple
logic and probability. It was inspired by the format of an old USA TV gameshow ‘Let’s
Make A Deal’, hosted by Monty Hall.
The conundrum is that you are on a game show and given the choice of three
doors: Behind one door is £1million, behind the others nothing. You are invited to
pick a door. The host, who knows what’s behind the doors, opens one of the two
remaining doors to reveal there is nothing behind it. He then invites you to pick again
between the two remaining doors. Is it to your advantage to switch your choice?
Example 3.
You are in a game of Russian roulette, but this time the gun (a six-shooter revolver)
has three bullets in sequence in three of the chambers. The barrel is spun only once.
The two players then take it in turn to pull the trigger. If they live, the gun is passed
to the other player who then pulls the trigger, etc. Would you rather be first or
second to shoot? Continues overleaf ➧
Example 1.
Answer: 13
The way to get a final total of 13 is to build up some total between 7 and 12
inclusive, then make a single throw of the appropriate value.
The way to get a final total of 14 is to build up some total between 8 and 12
inclusive, then make a single throw of the appropriate value.
Thus if we take the list of sequences producing 14, then subtract 1 from the final
throw of each sequence, we will have part but not all of the list of sequences
producing 13. Moreover, corresponding sequences are equally likely to occur,
because they contain the same number of throws. Thus 13 is strictly more likely than
14. A similar argument shows that 14 is strictly more likely than 15, and so on. Hence
13 is the most likely total
56 Example 2.
Answer: You should change your choice.
The problem is called ‘counter-intuitive’, because the answer seems for many to defy
instinct and logic, even after it’s been explained several times. Most contestants on
Monty Hall’s show were apparently reluctant to change their original choice for fear
that it was right, or because intuitively they felt that probability could not be altered
by revealing one of the ‘losing’ doors.
The door you originally chose was a 1-in-3 chance – i.e., the likelihood of your
guessing the winning door was 1-in-3. The ‘other’ door is now a 1-in-2 chance, and
the likelihood of your guessing the ‘other’ door to be the winning door is 1-in-2. You
are 50% more likely to correctly guess a 1-in-2 chance than a 1-in-3 chance, so pick
the other door in preference to your original choice of door.
If you’re still in doubt, imagine there are 20 doors – one has the money, the
others nothing. You pick a door. Then 18 doors are opened revealing nothing, leaving
your choice and the one other door. Would you change your choice now? By
switching doors you’d improve your chances from 1-in-20, to 50:50 evens, or
(depending on how you look at it) arguably 19-in-20. Still sceptical? How about 100
doors? Pick a door. Open 98 revealing nothing, leaving two doors, one a winner and
the other a loser. Would you still prefer your original 99-to-1 shot compared to the
alternative that is at worst 50:50, and arguably a massive 99% chance?
Game theory
Answers & explanations
Example 3.
Answer: Player 2 is preferable.
All you need to consider are the six possible bullet configurations:
57
How much flexibility does the buy-side trader require to adjust and
fine-tune the broker’s algorithmic models?
Richard Balarkas*
■
might ask for the TEX strategy
to default to very aggressive
mode for these stocks.
“Customisation has been
■ A trader who trades VWAP in around from the start. Indeed,
the morning period but wants
the curve skewed to be more
it is hard to see how the product
aggressive/overweight at the could have worked had it not.”
■ ALGORITHMIC TRADING ■ A BUY-SIDE HANDBOOK ■ THE TRADE 2005
■ Chapter 6
FAQ
Customisation has been around
■
from the start. Indeed, it is hard to
see how the product could have “There is a view,
worked had it not. There is a view,
inaccurate in our opinion, that bro- inaccurate in our
62 ker algorithms are canned and opinion, that broker
therefore inflexible. Hopefully, the
examples that have been outlined algorithms are canned
prove otherwise. There are also and therefore
views expressed that all broker algo-
rithms deliver the same perfor- inflexible.”
mance, that they are ‘commoditised’.
We have not been presented with
evidence that shows this to be the
case, but it is understandable how
this viewpoint might add weight to
the argument that the only valuable
algorithm is a customised algo-
rithm. In our experience, even using
the ‘plain vanilla’ versions of our
algorithms, different clients achieve
different results – from good to
excellent!
As with all aspects of the buy-
side/sell-side relationship, be it
research, trading or the develop-
ment and use of trading