Research report written by Geir Linløkken, 4 November 2014
Published in English on 9 December 2014. Norwegian original here >>
About the author
Geir Linløkken is the Head of Analysis and Research at Investtech, and is responsible for portfolios and money management. He founded Investtech in 1997, to provide independent technical analyses based on science and investor psychology. Mr. Linløkken has an MSc. in Computer Science, specializing in Mathematical Modeling, at the University of Oslo. He is the author of the book “Technical Stock Analysis”. His daily work includes analysing stocks and developing quantitative methods for stock market investments.
Keywords: Rectangle formations, buy signal, sell signal, Oslo stock exchange, statistics, technical analysis.
Abstract:
Geometric price patterns, like rectangles, are used in technical analysis to predict future price development. Many investors use this as an important part of their decision making process when buying or selling stocks. We have looked at the price movements that followed buy and sell signals from rectangle formations on the Oslo Stock Exchange in a period of 19 years, from 1996 to 2014. Stocks with buy signals have on average increased by 6.2 % after three months, while stocks with sell signals have increased 0.3 %. Compared to average stock exchange development in the same period, buy signals did 2.9 percentage points better and sell signals did 3.0 percentage points worse.
This research report is part of a bigger research project conducted by Investtech into price development following technical formations in stock prices. This report is on medium long term rectangle formations on the Oslo Stock Exchange in Norway.
Short term | Medium term | Long term | |
Rectangle | Report | Present | Report |
Inverse/ head and shoulders | Report | Report | Report |
Double top, double bottom | Report | Report | Report |
Identification of geometric price patterns in stock prices is an important area of technical analysis. The idea is that these patterns describe the investors’ mental state, i.e. whether they will want to sell or buy stocks in the time ahead, and they thereby indicate the future direction of the stock price. Rectangle formations are one type of such patterns.
The development of a rectangle formation indicates that the investors are unsure about the future direction of the stock. The price moves sideways between a support level and a resistance level. A break upwards mirrors the investors’ increasing optimism. According to technical analysis theory, the price will then rise by at least as much as the height of the rectangle, see figure 1.
In technical analysis terminology we say that a break upwards triggers a buy signal. Similarly a break downwards from a rectangle formation triggers a sell signal. We have investigated the price movements following buy and sell signals from rectangle formations on Norway’s Oslo Stock Exchange.
Identification
Identification of rectangle formations in stock prices is no simple task. The figure above shows that the price moves sideways between a clearly defined support level and a similar resistance level. However, stock prices are rarely as even as those in the illustration. Often there are rectangle-like figures where the support and resistance lines may be a little crooked or otherwise diverge.
Many investors identify rectangle formations by looking at price charts and drawing support and resistance lines by hand. This method has many weaknesses, most of all that it is subjective, allowing you to see the formations you want to see, and it is very time consuming. Therefore we need an automatic algorithm whereby computers identify the formations and the signals they trigger.
Investtech has studied technical and quantitative analysis since 1997. We have developed mathematical algorithms for automatic identification of rectangle formations in stock prices. The formations are entered into the technical analysis charts, shows in signal lists and presented updated daily to Investtech’s subscribers.
In this report we have looked at the price movements that follow buy and sell signals from rectangle formations on the Oslo Stock Exchange. The statistics are based on rectangle formations automatically recognized by Investtech’s computer programs. No parameter optimization or changes to algorithms have been made during this study. This is an analysis based on the existing historical material.
We have used stock prices from 1.1.1996 to 10.10.2014 as the basis for the statistics. In this period, the main index on the Oslo Exchange rose from 106.9 to 573.6 points, which is 437 % or approximately 9.3 % a year. Compared to the risk free interest rate in this period, this is approximately what can be expected for similar periods of time.
In eight of these 19 years, the exchange rose by over 30 %, while it fell by more than 10 % in five of the years, and varied between minus 10 % to plus 30 % in five of the years. We have had both good and bad periods, and several sideways periods as well, and consider this representative for a normal period of time on the exchange.
All stocks that have been listed in the period are included. Stocks that have been delisted due to for instance mergers, takeovers and bankruptcy are included. However, we only have data for these companies for as long as they were listed. A company which went bankrupt will then have a final trading price which is not zero, which is a weakness in this study. However, this is only the case for a small number of companies. Most companies also fall a lot before they are delisted, so the difference between the price fall from when they were listed and a price fall down to zero will be small.
It is also very rare that new buy signals are generated from rectangle formations when a company’s stock price is falling. Therefore it matters very little to the statistics for buy signals. Return from sell signals would however have been a little weaker had we corrected for bankruptcies. Combined it is our opinion that these conditions have minimal impact on the results of this study.
All prices are adjusted for splits, dividend payments, reverse splits, and other corporate capital changes, in order to reflect the actual value development of the stocks.
715 time series are included, of which 597 are stocks with at least 66 days of trading. At the end of the period, approximately 220 stocks were listed on the exchange.
The stock’s daily closing price is used. We have only used prices and turnover figures from the stock’s primary market place. Alternative markets like Chi-X, Bats and Burgundy are excluded.
We have used Investtech’s algorithms for automatic identification of rectangle formations. The algorithms were run on medium term charts made up of 395 price days, approximately 18 calendar months. We consider the algorithms good at identifying actual rectangle formations, and they do not classify indistinct rectangles as actual rectangles.
At identification of signals, only data up to the date the signal was triggered were used. The later data were hidden from the algorithm.
Basically all signals identified from rectangle formations are used. Normally each formation only triggers one signal. However, in rare cases they may trigger several signals. This happens if the price following the break reacts back into the formation, creates a modified formation and then breaks out again.
Sometimes one stock can also trigger several signals on the same day. This happens if the algorithms have recognized several formations of different length and height which are broken out from at the same time.
In order to have the data set as representative for the Oslo Stock Exchange as possible, we remove certain signals from the data set:
Our data set now consists of 1,084 identified buy signals and 776 sell signals from rectangle formations in stocks and equity certificates on the Oslo Stock Exchange in the period 1996 to 2014.
Figure 4: Price development following buy and sell signals from rectangle formations on the Oslo Stock Exchange identified by Investtech’s automatic algorithms in medium term charts. Click the image for bigger version.
The chart shows average price development following buy and sell signals from rectangle formations. The signals are triggered on day 0. Only days when the exchange is open are included, so 66 days equal approximately three months. Buy signals are the blue line and sell signals are the red one. The shaded areas are the standard deviation of the calculations. Benchmark index is the black line.
Buy signal | Day 1 | 10 | 22 | 66 |
Absolute | 100.27 | 101.57 | 102.63 | 106.20 |
Benchmark index | 100.05 | 100.48 | 101.06 | 103.31 |
Relative | 0.22 | 1.10 | 1.57 | 2.89 |
T-value | 2.09 | 4.12 | 3.89 | 3.72 |
Buy signals from rectangle formations identified in Investtech’s medium term charts have historically given increasing prices in the following months. On average, stocks that triggered buy signals have risen 6.2 % in the following three months. This is much better than index, which rose 3.3 % in the same period of time.
The increase is stronger the first few days following the signal, but the stocks keep rising both in absolute terms and relative to index during the whole period. In the first 22 days, equal to about the first month, the signal stocks rise by 0.11 % on average per day, estimated with least-squares method adapted to the yield curve. In the next 44 days, the stocks on average rise by 0.07 % per day.
The average figures are calculated based on 1,084 observations. This is a high number, which ensures that the estimates have quite good significance. The blue shaded area shows the standard deviation of the estimates. Assuming normal distribution, the average price development following buy signals from rectangle formations has a 68 % probability of falling within this interval.
After 66 days the return is t=3.72 standard deviations from the benchmark index. This high figure indicates that the results are significant. If we assume that conditions which influence stock market pricing, including the combined acts of investors, remain constant over time, the estimates indicate high probability that buy signals from rectangle formations identified in Investtec’s medium term charts will give better average return than index.
The average figures are significantly positive. However there is a great deal of variation from signal to signal. A count showed that 59.8 % of the signals gave return which was positive or zero after 66 days, while 41.2 % gave negative return. As such there is fairly high probability of losing money from one investment based on one buy signal from one rectangle formation. However, the statistics show that if this strategy is repeated many times, the probability is high that the combined return from all the trades will be markedly positive.
Sell signal | Day 1 | 10 | 22 | 66 |
Absolute | 100.13 | 99.50 | 99.39 | 100.28 |
Benchmark index | 100.05 | 100.48 | 101.06 | 103.31 |
Relative | 0.08 | -0.98 | -1.67 | -3.04 |
T-value | 0.56 | -2.81 | -3.33 | -3.25 |
Sell signals from rectangle formations identified in Investtech’s medium term price charts have historically given a small price decrease the following weeks, and considerably weaker development than index. On average the stocks have risen 0.3 % the following three months, which is 3.0 percentage points lower than benchmark index.
The fall is stronger the first few weeks following the signal, but the stocks keep falling relative to benchmark index during the whole period.
The average figures are calculated based on 776 observations and are considered to be significant. As is the case with buy signals, there is great variation from signal to signal. 49.9 % of signals gave return that was negative or zero after 66 days, while 51.6 % had positive return.
Figure 5: Price development at buy and sell signals from rectangle formations on the Oslo Stock Exchange. The chart includes price development for 10 days before the signals were triggered to 66 days after. Click the image for bigger version.
The chart has the same content as the chart in figure 4, except that we have included price development for 10 days before the signals were triggered. Interestingly this shows that stocks with buy signals have risen a lot before the signal is triggered, whereas stocks with sell signals have fallen a lot.
The chart shows that stocks with buy signals from rectangle formations on average increased by some seven per cent the last 10 days up to and including the day the signal was triggered. It can be psychologically difficult to buy a stock which has risen so much in such a short time. This may be part of the reason why the signals work as well as they do. In fact the stock ought to increase more, based on the news or other fundamental issues that may have triggered the signal, but due to investor psychology and human weakness it does not. Over time investors accept the basis for the price increase and become more positive, which gives a nice rise and good excess return relative to index in the following months.
The same is true for sell signals. The chart shows that stocks with sell signals from rectangle formations on average fall by some eight per cent in the ten days up to and including the day the signal was triggered. And they still continue to underperform relative to index in the following weeks and months. It can be psychologically difficult to sell a stock which has become so much “cheaper” in such a short time. It takes time before the actual conditions are understood, fundamental analyses are adjusted, and investors overcome their own psychological resistance to selling at lower prices. Thus the stock’s development is weaker than that of the index also in the period after the price fall which triggered the sell signal.
The results are based on average return figures. If any individual stock is extremely volatile, for example has a price increase of several hundred per cent, this may strongly impact the average figures. To investigate this, we have calculated how much each stock weighs in the calculation of the average figures.
In the case of buy signals, the ten most heavily weighted stocks make up 16 % of the total. The remaining 84 % consists of 281 different stocks. For the sell signals, the most heavily weighted stocks make up 16 % of the total. The remaining 84 % consists of 247 different stocks.
This shows that the average return figures are based on a wide selection of signals, and thus that the results are likely not due to extreme volatility in individual stocks.
In the calculations above we have included signals from stocks with an average daily turnover of at least half a million Norwegian krone on the Oslo Stock Exchange at the time the signal was triggered. Varying the liquidity parameters allows us to investigate if there is a difference in signal strength for smaller and bigger companies.
Drawing the line at five million krone splits the companies into two roughly similar groups. Signals from stocks with turnover below five million come to 1,049 signals, and those with turnover above five million come to 811 signals.
Figures 8 and 9 show that buy signals from the group of smaller companies have done better than buy signals from the bigger companies. At the same time, sell signals from the bigger companies have been better, i.e. the price development has been weaker, than for the smaller companies. A closer look at the numbers shows that return 66 days after buy signal is 7.3 % for the smaller companies and 4.9 % for the bigger ones. Return after sell signals is 1.7 % for the smaller companies and -1.6 % for the bigger ones.
This indicates that buy signals from rectangle formations are stronger for smaller companies, while sell signals are stronger for bigger companies.
We have studied return from stocks on the Oslo Stock Exchange following breaks through rectangle formations in a period of 19 years, from 1996 to 2014. Investtech’s automatic algorithms identified a total of 1,084 buy signals and 776 sell signals from such formations. Buy signals gave an average return of 6.2 % in the following three months, while sell signals gave a return of 0.3 %. Relative to average benchmark index development, the buy signals have an excess return of 2.9 percentage points, while the sell signals gave a negative excess return of 3.0 percentage points.
The time period for the study is fairly long, the quality of the data is considered to be good and the algorithms used are entirely automatic and deemed to identify only actual rectangle formations. Statistical measures suggest a high degree of significance. If we assume that conditions that influence pricing in the stock market remain steady over time, we believe that buy signals from rectangle formations will give similar results in the future.
Keywords: Buy signal,Oslo Stock Exchange,rectangle formation,Sell signal,statistics.
Investtech ei takaa analyysien tarkkuutta tai kattavuutta. Kaikkien analyysien tuottamien neuvojen ja signaalien käyttäminen on täysin käyttäjän vastuulla. Investtech ei vastaa mistään tappioista, jotka saattavat syntyä Investtechin analyysien käytön seurauksena. Mahdollisten eturistiriitojen yksityiskohdat mainitaan aina sijoitusneuvon yhteydessä. Lisätietoja Investtechin analyyseistä löytyy täältä disclaimer.
Investtech ei takaa analyysien tarkkuutta tai kattavuutta. Kaikkien analyysien tuottamien neuvojen ja signaalien käyttäminen on täysin käyttäjän vastuulla. Investtech ei vastaa mistään tappioista, jotka saattavat syntyä Investtechin analyysien käytön seurauksena. Mahdollisten eturistiriitojen yksityiskohdat mainitaan aina sijoitusneuvon yhteydessä. Lisätietoja Investtechin analyyseistä löytyy täältä disclaimer.