Where do Algorithmic Trading Strategies Come From?
Analysis!
Whenever you see someone describing the performance of their
fund/system/algorithm, you'll see the standard qualifier "past performance is not an indicator of future results".
Actually this is an over-done legal statement. It's not exactly true, otherwise people would not even bother showing you their past performance.
Past performance can be an indicator for future results (unless it has been faked
- for a well-known example look at the behaviour of
Bernard Madoff, but
that's another story). It's just a very weak indicator. However, given a choice
between no indicator, and a weak indicator, you would probably choose the weak
one. This is the basis behind algorithmic trading strategy development. By
analyzing past price history, and particularly patterns therein, people aim to
find means of predicting future behaviour. Amazingly, this actually works.
However, there are many pitfalls and it takes experience to be able to do this
without finding false positives. I won't list any secrets here, but will point
out a few of the well-known things that you need to
be careful of when looking for patterns.
- Patterns in the clouds: The single biggest trap is seeing patterns that are not going to repeat themselves in the future.
If you have ever looked at a cloud and seen some image, like a face, or a shoe, you have probably wondered how it got there.
While some people go for religious or mystical explanations, I just stick with the idea that there are lots of clouds, lots of
wind gusts, and every now and then by chance you see some half-recognizable image. If you study price histories for long enough,
you will see patterns that just happen to be there by chance.
- Unusable patterns: Once you work out how to avoid spotting false
positives, you'll probably begin by finding a number of strategies that would
make millions if not for transaction costs. Transaction costs eat up a little
bit of money every time you make a trade and if you don't account for this, you
can get very inaccurate pictures of strategy performance. This effect is
more important the higher the frequency of trading.
- Structural change in the markets: Patterns do not
persist forever. Patterns come about because of the collective
behaviour of many market participants. As participants come and go,
particularly big players who trade large volume, the patterns themselves
change. Other factors can affect these patterns as well. Changes
in the rules of the game (for example, a temporary ban on short-selling
certain securities) can also have a striking effect. As a trader,
whether discretionary or algorithmic, you must be prepared for such
situations.
Finding patterns is where analysis comes in.
Technical Analysis versus Statistical Modeling
There are many ways you can think about finding patterns. Some people like to do
this visually. However, this generally doesn't lead to good codeable algorithms.
Perhaps the industry standard for some time has been technical analysis.
People do use this successfully. Very loosely speaking, technical analysis is a
system for looking at price history plots ("charts") and using them to decide
when to enter and exit trades. While this is a perfectly reasonable thing to
do, and many people do this successfully, I avoid this approach because I have a
strong preference (because of my background) for statistical modeling. I
use a mixture of regression and time series analysis, along with a few of my own
custom tools, to analyze prices and develop strategies.
Interestingly, the results are not always different. There are many cases
where the signals generated by regression models are approximately aligned with
signals that could be obtained using methods from technical analysis.
The key difference between the two approaches is the following. While
technical analysis looks for patterns that will tell you if the price is about
to go up or down, statistical models make statements about the probability
distributions of price movements. In other words, technical analysis tells you
when to go long or short, but it doesn't make any statement beyond that.
Statistical modeling has at least two advantages:
- it provides tools for evaluating model goodness-of-fit, i.e. assessing how appropriate a certain description of price data may be, and
- it generates probabilistic statements about the future, which can be balanced against transaction costs to decide how to enter/exit positions.
Statistical modeling also has a disadvantage that is worth noting. That
is,
- statistical model-fitting algorithms are typically limited to
simple linear Gaussian models.
There are many nonlinearities apparent in markets. I won't explain the
ones I use (trade secrets). But to summarize, technical analysis
indirectly provides ways of using important nonlinearities, while the common
statistical models are not well-suited to capture these nonlinearities.
Ideally, one would aim for the best of both worlds - that is to have good
nonlinear statistical models that capture some of the things that technical
analysis makes use of.On a side note, the lack of probabilistic content in technical analysis is
recognized. The book
Evidence-Based Technical Analysis: Applying the Scientific Method and
Statistical Inference to Trading Signals, by David Aronson, appears to be a
nice effort to address
this problem.
Next: Allocation of Capital
Back to Index