Howard Bandy. This is a hefty book filled with quality information and important ideas on the topic of system development. When I first got the book I may have been a bit overwhelmed by all the information, particularly the sections devoted to machine learning and using python. A number of the trading systems are based on standard technical indicators like the RSI. The system is unique in that it uses lambda in order to exploit non-integer lookback lengths. This allows a lookback length that is not determined by the number of bars or days.
|Published (Last):||24 July 2013|
|PDF File Size:||8.41 Mb|
|ePub File Size:||4.31 Mb|
|Price:||Free* [*Free Regsitration Required]|
You will learn what mean reversion is, how to trade it, 10 steps for building a system and a complete example of a mean reversion system. Intro To Mean Reversion The two most popular types of trading strategies are momentum and mean reversion. A mean reversion trading strategy involves betting that prices will revert back towards the mean or average.
Momentum predicts prices will continue in the same direction. Markets are forever moving in and out of phases of mean reversion and momentum. A simplistic example of a mean reversion strategy is to buy a stock after it has had an unusually large fall in price. But What Is Mean Reversion? The idea of mean reversion is rooted in a well known concept called regression to the mean.
This is a theory first observed by statistician Francis Galton and it explains how extreme events are usually followed by more normal events. In other words, things tend to even out over time. For example: If a soccer team scores an unusual amount of goals in a match, the next game they will probably scorer closer to their average. If the first person you see today is unusually tall, the next person you see will probably be shorter.
The way to apply this strategy in the market is to seek out extreme events and then bet that things will revert back to nearer the average.
The tricky part is that financial markets are not normally distributed. They have a long tail and extreme events can cluster together. Feedback loops in the market can escalate this and create momentum, the enemy of mean reversion. Despite this, mean reversion is a powerful concept that traders can use to find an edge and built trading strategies around.
Later on in this article I will show the process I use to build mean reversion trading systems. Different Ways To Trade Mean Reversion A simple mean reversion strategy would be to buy a stock after an unusually large drop in price betting that the stock rebounds to a more normal level. However, there are numerous other ways that investors and traders apply the theory of mean reversion.
With Technical Indicators Technical indicators like RSI can be used to find extreme oversold or overbought price levels. These can act as good levels to enter and exit mean reversion trades.
Standard deviation, Bollinger Bands, Money Flow, distance from a moving average, can all be used to locate extreme or unusual price moves. FOX has closed below its bottom Bollinger Band. The further a stock trades from its moving average the more liable it is to revert back. With Financial Information Some investors will look at financial information such as PE ratios or earnings reports. If a company reports strong quarterly earnings way above its long term average, the next quarter it will probably report closer to its average.
There are many factors at play which can contribute to extreme results. Many of which suffer from natural mean reversion. For example, the weather. Similarly, if a stock has an unusually low PE ratio, an investor might buy the stock betting that the company is undervalued and the PE will revert to a more average level.
With Economic Indicators Some investors will look for mean reversion in economic indicators. Many investors trim their exposure to the stock market as a result. Shiller CAPE. Mean is around Historically, investor surveys have shown investors become more pessimistic near market lows and more confident near market peaks.
There are also troughs near market bottoms such as March and May Pairs Trading Pairs trading is a fertile ground for mean reversion trades because you can bet on the spread between two similar products rather than attempting to profit from outright movement which can be riskier.
If two markets are correlated for example gold and silver or Apple and Microsoft and all of a sudden that correlation disappears, that can be an opportunity to bet on the correlation returning. Let it be said that there are many other ways that you could measure mean reversion so you are limited only in your imagination. However, mean reversion as applied to financial markets, does have its critics. Markets Are Efficient Criticism Proponents of efficient market theories like Ken French believe that markets reflect all available information.
It is therefore not possible to beat the market with mean reversion or any other strategy without some form of inside information or illegal advantage. The stock has fallen to price in the latest information and there is no reason why the stock should bounce back just because it had a big fall.
CAPE has a good record of market timing over the last years which is why it has become such a popular tool. But closer inspection reveals that most of the gains came in the first first 50 years.
In the most recent 50 years, the ratio has actually done worse than buy and hold. There is an argument that some mean reversion indicators like CAPE are based on insufficient sample sizes. A hundred or two hundred years may sound like long enough but if only a few signals are generated, the sample size may still be too small to make a solid judgement.
Illogical Strategy Criticism One flaw with a mean reversion strategy is that in theory, the more a stock falls, the better the setup becomes. This can cause issues with risk management.
Even though you are losing money, a mean reversion strategy will likely see the drop as another buy signal. Mean reversion requires you to hold on to your loser or even increase your position in this scenario. From a risk management point of view it can make more sense to cut your losses at this point. But this goes against the concept of mean reversion. This results in a logical inconsistency. In reality, however, successful mean reversion traders know all about this issue and have developed simple rules to overcome it.
For example, they will use time based exits, fixed stop losses or techniques to scale in to trades gradually. Arguments For Mean Reversion Despite some of the arguments against mean reversion trading strategies there are clearly many successful investors who have taken this approach and been successful. Jim Simons has used mean reversion type strategies through his hedge fund Renaissance Capital. Many of the traders profiled in Market Wizards used mean reversion type strategies.
Paul Tudor Jones, for example. The majority of HFT firms utilise simple mean reversion strategies. Value investors like Warren Buffett and macro investors like Jim Rogers use contrarian type strategies not dissimilar to mean reversion.
On a personal level, I have found mean reversion to be a powerful way to trade the markets and I have developed numerous mean reversion systems over the last few years. Well, for 12 years, I have been missing the meat in the middle, but I have made a lot of money at tops and bottoms. I think we can break this process down into roughly 10 steps. It all begins with getting ready the right tools for the job.
Step One — Software An important part of building a trading strategy is to have a way to backtest your strategy on historical data. Backtesting does not guarantee that you will find a profitable strategy but it is the best tool we have for finding strategies that work. The first step is to get hold of a good backtesting platform and learn how to use it.
I use Amibroker which is quick and works very well for backtesting strategies on stocks and ETFs. There are numerous other software programs available and each comes with its own advantages and disadvantages. You can also do plenty of analysis with Microsoft Excel. Understanding The Software A key part of learning how to use backtesting software involves understanding any weaknesses within the program itself that might lead to backtesting errors.
For example, how easy is it to program rules that look into the future? How easy is to analyse your results and test for robustness? One of the deadliest mistakes a system developer can make is to program rules that rely on future data points. A classic example is using the closing price to calculate a buy entry but actually entering the stock on the open of the bar. In other words you trade before the signal.
This is called a future leak and it can be surprisingly easy to do if you are not careful. Generally, if your entry signal is based on the close of one bar, have the system execute its trade on the next bar along.
Step Two — Data The next step is to get hold of some good quality data with which to backtest your strategies. There are a number of questions to consider: For stocks: Is the data adjusted for corporate actions, stock splits, dividends etc? If not, the data can produce misleading backtest results and give you a false view of what really happened. In the following chart you will see how Apple underwent a stock split in Apple underwent a stock split in Having data that is clean and properly adjusted for splits etc.
The inclusion of dividends can also add an extra two or three per cent to the bottom line of your strategy. For stocks: Does the data include historical constituents? Every year, businesses go bankrupt. Some merge with other companies. Others get moved around to different market indexes. By using only the latest index constituents, your universe will be made up entirely of recent additions or stocks that have remained in the index from the start.
These tend to be the strongest performers so you will get better results than you would have in real life. For stocks: Is your data the right frequency? There can also be some difficulty in backtesting high frequency trading strategies with low frequency data which I have talked about previously. This is because stock prices are an amalgamation of prices coming from multiple different exchanges. For these intraday systems, you will need more granular data such as 1-minute data.
For stocks: Is the data point-in-time accurate?
The Original Rules
Testing The RSI Model From The Quantitative Technical Analysis Book By Howard Bandy