~~~ Algorithmic Trading - how it works ~~~
Any algorithmic trading system has 3 components:
The trading algorithm is normally realized by a software
program or 'script'. But a computer is not always involved. The
'Turtle Trading' system of the 1980s was a manually executed
algorithm, and backtesting was done with pen and paper. However,
this simple system would not work anymore today. Since the markets
have changed and large hedge funds have switched to algo trading,
more complex algorithms are needed for achieving continuous profit
with algorithmic trading. This does not mean that private traders
are excluded. Advanced software tools such as Zorro
allow algo trading with the same methods and algorithms that large
hedge funds apply.
Algorithmic trading: Why and when does it work?
All methods of algorithmic trading seek to exploit a market inefficiency, usually for predicting a price trend or establishing a statistical advantage. Market inefficiencies cause price curve anomalies - deviations of the price curve from pure randomness. Obviously, trading strategies can only work when those inefficiencies really exist and are large enough to overcome transaction costs. In a perfect, efficient market, prices would only be affected by real events, such as the invention of a new technology or the publication of company results. All traders are 'informed', decide rationally and act immediately. The price curves in such a hypothetical market would be pure random-walk curves that contain no information for predicting future prices.
Fortunately for algo trading strategies, real markets are far from this theoretical ideal. Market inefficiencies are everywhere. They are caused by slow reaction on news, incomplete information, rumors, patterns of repetitive behavior, and irrational trading (such as following advices by 'analysts'). Such effects can be described by market models. The problem: the effects are small in relation to the ubiquitous 'noise', the randomness in price curves. They are normally not visible to the human eye. Nor can they be reliably detected by classical "technical indicators". Serious statistical methods, such as spectral analysis, or machine learning algorithms are normally required for effectively exploiting market inefficiencies.
There are four main categories of trading algorithms:
Risk premium strategies
The most often used method by professional algo traders. They accept a certain amount of risk in exchange for a certain amount of profit. The expected profit, of course, should exceed the risk. The algorithms often accumulate small frequent profits with a low, or ideally negligible, risk of a rare high loss. The most trivial example is buying and holding a stock with a high historical performance. Classical risk premium examples are options selling systems and mean-variance optimization. Algo trading systems that exploit volatility anomalies, such as grid traders, can also fall in that category.
Model based strategies
These strategies are based on a model of behavior patterns of market participants, resulting in market inefficiencies and price curve anomalies. A correct model allows limited price prediction and thus profitable trading. Model based strategies can exploit market regimes, market cycles, price borders or channels, price differences of correlated assets (statistical arbitrage), or price differences of similar assets at different exchanges (HFT arbitrage). More examples and details about building model based strategies can be found in an article series on the Financial Hacker blog.
Data mining strategies
They have nothing to do with mining bitcoin, but evaluate the market with a machine learning algorithm for predicting short-term price trends. For this they use signals that are usually derived from the order book or the price curve, but sometimes also from fundamental data, like earnings reports or the Commitment Of Traders (COT) report. Even exotic data sources such as blockchain parameters or twitter keywords can be used for data mining algorithms. Just as model based system, data mining also exploits market inefficiencies and would not work on a totally random market. But the details of those inefficiencies and the derived trading rules are unknown to the developer - the system is a 'black box'. More information and an example of a deep learning forex system can be found in this Data Mining article.
They are usually based on 'technical analysis' - the belief that technical indicators, geometric price curve properties, or price patterns can predict future prices. Indicator soups are often used by retail traders and found on trader forums or in trading books. They do not always use indicators, but can also derive trade signals from traditional candle patterns or with exotic methods such as Elliott Waves or Harmonic Patterns. Although many studies have revealed that technical analysis is mostly useless, some complex indicator soups were in fact profitable in certain market situations, at least for a limited time. If you like playing roulette, you will probably also like algorithmic trading with technical analysis and a soup of indicators.