We cannot start without a cheap quip: Technical analysis is an astrology for men. 🙂
Market technicians believe that prices currently contain all information about any asset. It is undoubtedly an oversimplified assumption, as the market is much more complex than that. But suppose you try to use fundamental analysis too harshly. In that case, you assume that you have all the possible information about market fundamentals and assets and that the others have complete information too. That seems to be too far from the truth. Now suppose you base your trading only on looking at charts. In that case, you also deal with seeing and basing your decisions on seeing different psychology of market participants, where during price spikes, you often find explanations in the news afterward.
But markets are driven partly by fundamentals and partly by psychology/prices. Therefore it would be unwise to overlook the Technical Analysis (TA) as just some hocus-pocus.
In case you are interested, our recommended readings include classical introductory books: Steve Nison’s Japanese Candlestick Charting Techniques and Encyclopedia of Chart Patterns by Bulkowski, Thomas N. They are taken as traditional studies on how to read candlestick chart patterns and praised for bringing TA wisdom we will discuss further to the modern trading world.
Technical analysis has been evolving, and slowly but surely, quantitative analysis using statistical theory has taken over. The last frontier of believers in pure TA (when you stare at your screen and watch and read a price chart) is still found in retail traders and practitioners selling various courses on its interpretation. The added value of that pure TA interpretation (without the statistical analysis) is questionable.
But we can try to use TA in a quantitative fashion.
One of TA’s most prolific figures and so-called founders is Sokyu Honma, who lived in Japan in the 1600s and is said to gain a fortune in trading rice markets. Fast forward, one of the first in the modern world was Dow Theory, still living and looked at by some older market analysts.
Classical and almost most general things are to look for supports and resistances in prices, where both buyers and sellers are again and again found, marking most important areas where often most of the interests from various market participants (producents, suppliers, consumers, speculators, etc.) are found. Often, the price is being warped in areas of whole (.00s) and half (.5s) price amounts.
Other than focusing on various pattern recognition (candle price formations, filling/fading/running away from the gap plays), many other approaches use price in various calculations resulting in simple and exponential moving averages (SMAs and EMAs) of various lengths. A large following of TA users also use various oscillators such as MACD, RSI, MFI, stochastic, etc.
While averages are good in trending markets and are used for trend-following and momentum strategies, oscillators find more use in ranging markets and are useful in mean-reversion (return to statistical mean) strategies, trying to determine where the market is over-bought/sold.
Others also combine price with volume for various applications such as VSA (Volume Spread Analysis) and draw Volume Profiles, trying to find low- and high- liquidity areas, which might market revisit.
Technical analysis terms that are easy to quantify, like indicators (momentum, moving averages etc.) and candlestick patterns, are very often a target of academic research examination as they are easy to test in a quantitative/statistical way. Our Screener contains many strategies based on these types of predictors, and they often offer pretty satisfactory results.
But some of the more vague terms in Technical Analysis are really hard to quantify as nearly every TA user defines and interprets them differently. We mean mainly TA patterns like supports, resistances, trend lines, double tops, double bottoms, and/or more complex patterns like head-and-shoulders.
Now, what we can do with that?
We tried to spend some time and fought a little with some of these TA terms, and the following article/study results from our attempts to quantify a tiny subset of the world of Technical Analysis patterns.
The idea for the Technical Analysis study was brought up internally in our team and was based on emails that we received over the years. It seems that Technical Analysis is still a popular subject, so people are asking questions about it. We picked one of the most popular technical analysis terms for our study – double bottom and double top patterns.
Double tops and bottoms patterns are usually used as reversal indicators. They mark the area in the chart where the price chart forms a strong resistance (in case of the double top) or strong support (in case of the double bottom pattern). Double tops/bottoms may mark price areas where either bull or bear sides are expected to express their strong preference in buying/selling.
Source: Finviz.com
There are many trading approaches to exploit double top/bottom. We can wait until the price revisits the support/resistance area and play for the bounce. Or, we can expect a breach of the support/resistance area. We are not TA experts; we do not have any strong opinion, what’s the correct way to trade these patterns. We just wanted to try to find one way (from probably many ways) how to define those patterns and then look for some fundamentally sound trading idea that would use those patterns.
In our calculations, we have chosen to use close prices only, as they are more representative of medium to longer time-frame investors and/or swing traders. Intraday highs/lows are more important for (intra)day traders, and those are not a majority of our readers.
So, what are our rules?
Approach
Firstly, we try to find local lows/highs. As standard, we use a rolling period of 30 days to look back and forward (into history and the future) around a potential local high or low and we find and mark only local price chart highs and lows. If the distance between two potential lows (or highs) is closer to each other than 30 days, then one of them is not a local high/low.
Up to this point, all those potential lows/highs are stored.
We look for potential Double Tops/Bottoms from those local highs/lows. The maximal distance between two local highs/lows is set arbitrarily to 1000 trading days, whilst the minimal distance is again the same as in point 1., which is 30 trading days.
Another important arbitrary parameter is called maximum percentage = 2%, which is the maximal vertical distance between two local highs/lows to entitle a potential Double Top/Bottom real one.
We connect the last Top with some of the previous Tops in a way that forms the trendline with the biggest angle and the last Bottoms with some of the previous Bottoms to create a trendline with the biggest angle.
Application in Report
Trend lines and possible double tops/bottoms are displayed for each individual asset/component selected in the Portfolio Manager. (If you have three assets in your portfolio, we create three charts, if 1, then 1, etc.)
The report aims to help to look for possible better entry/exit points in strategies that have a longer trading/rebalancing window (monthly/quarterly/yearly). As we mentioned in our previous blog, some visuals can, from time to time, deliver different perspectives on the markets.
Trading Strategy
Our next step was to try to use the double tops/bottoms methodology to build a trading strategy.
Firstly we tried to build a long/short forex trading strategy, but reversal signals based on bounces from the double top/bottoms showed little success. If there was some potential, it was in the breakouts from the double top/bottom formation. But we were not interested in a breakout strategy; that’s a form of trend-following/momentum trading, and we already have a lot of these strategies in our database. It would be just another “momentum-like” strategy.
So we moved to a different market, and our second idea was to build a reversal trading strategy in equities. The stock market naturally tends to grow and trend in an upside direction. So it would be fine to use the double-bottom signal as a timing signal for a swing trading strategy that would buy country ETFs for a short period of time when the ETF hits a support level. We have chosen the country ETFs as our investment universe due to the ease of trading and diversification. Plus, we wanted to avoid troubles with trading a universe of a lot of stocks. Therefore iShares ETFs seemed the most useful.
So, in the end, our investment universe consists of 24 country ETFs (mostly iShares MSCI, along with iShares China Large-Cap ETF [FXI], and the U.S. is represented by SPDR S&P 500 ETF [SPY]). We model with starting capital of 100 000 USD and backtest from 2000.
These are the aforementioned ETFs in summary:
Traded country ETFs
EWA
iShares MSCI Australia Index ETF
EWO
iShares MSCI Austria Investable Mkt Index ETF
EWK
iShares MSCI Belgium Investable Market Index ETF
EWZ
iShares MSCI Brazil Index ETF
EWC
iShares MSCI Canada Index ETF
FXI
iShares China Large-Cap ETF
EWQ
iShares MSCI France Index ETF
EWG
iShares MSCI Germany ETF
EWH
iShares MSCI Hong Kong Index ETF
EWI
iShares MSCI Italy Index ETF
EWJ
iShares MSCI Japan Index ETF
EWM
iShares MSCI Malaysia Index ETF
EWW
iShares MSCI Mexico Inv. Mt. Idx
EWN
iShares MSCI Netherlands Index ETF
EWS
iShares MSCI Singapore Index ETF
EZA
iShares MSCI South Africa Index ETF
EWY
iShares MSCI South Korea ETF
EWP
iShares MSCI Spain Index ETF
EWD
iShares MSCI Sweden Index ETF
EWL
iShares MSCI Switzerland Index ETF
EWT
iShares MSCI Taiwan Index ETF
THD
iShares MSCI Thailand Index ETF
EWU
iShares MSCI United Kingdom Index ETF
SPY
SPDR S&P 500 ETF
As mentioned before, the strategy is focused on finding a double bottom in country indexes that have long-term rising prices. We do not consider shorting index ETFs based on this condition. We will try to follow the other well-known Wall Street adage, often attributed to trend-following Ed Seykota: “The trend is your friend until the end when it bends.” It means that we will try to enter the supposed trend at the best prices, and if it does not work, we will bail out with asmall loss.
We tried to find two bottoms with at least 30 trading days of space between them. It seems an ideal parameter for a lazy swing trading strategy. A shorter time frame gives too many trades, and longer time frames (like 50 or 100) give too a low number of trades in total (we have a low number of double bottoms).
When the condition for the double bottom is fulfilled, we buy ETF. We have also set some constraints:
The maximal number of concurrent open positions is 4, and
maximum portfolio leverage is 2:1, so the maximal weight of an ETF in the portfolio is 50%
We look/scan for new double tops and double bottom formations once a month. But trading decisions are executed on a daily basis (entering and exiting from positions). We place a limit order for ETFs at the double bottom level, and set up a fixed SL of 3% with Profit-Target with a Risk-to-Reward (R:R) ratio of 1:2, so Target Profit is set up at 6%.
Backtesting Results
Here is the summary of the results:
Furthermore, as you are used to knowing, we share snippets of back-tested strategies in Quantconnect:
As we can see, strategy produces reasonable results. With CAR 7.79 % p.a. and Sharpe Ratio 0.47, the annual volatility is 16.57 %. Strategy suffered the highest drawdown of 30.38 % in September 2011. We can also see a steadily rising equity curve without higher volatility. Still, there is a stagnant period from 2010 to 2015 where a better strategy suited for that sideways period in country ETFs would be better.
Authors:
Cyril Dujava, Quant Analyst, Quantpedia Filip Kalus, Quant Developer, Quantpedia
Quantpedia is The Encyclopedia of Quantitative Trading Strategies
We’ve already analysed tens of thousands of financial research papers and identified more than 700 attractive trading systems together with hundreds of related academic papers.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.