Technical analysis works well only if the rules governing price fluctuations in a stock do not change.
A report on statistical tests for stationarity or the lack of it.
The predictability or otherwise of stock price movements is a debate which turns normal rational people into rabid evangelists. The views expressed by individuals usually depend on their investment styles and predelictions rather than concrete empirical evidence.
Many academics subscribe to the Random Walk hypothesis which supposes that stock prices vary unpredictably and randomly given an efficient market mechanism and information transparency. In contrast, fundamental analysts create earnings-based models and attempt to judge likely levels of market discounts with the implicit assumption that stock prices vary broadly in consonance with changes in earnings patterns.
Technical analysts believe that stock prices don't vary randomly, and that their future patterns can be predicted by studying the patterns of their past behaviour. All three schools have their spectacular successes and failures and very few adherents of any viewpoint have ever tried to exhaustively study the underpinnings of their beliefs.
The argument can be encapsulated into three key questions - all of which can be answered by employing statistical methods to test for the three key concepts of stationarity, randomness and independence.
Lets try and clearly distinguish between the three terms - stationarity, randomness and independence.
This is simplest with an example. Assume a fairly-balanced roulette wheel with 100 partitions, 50 of which are coloured white, 25 red and 25 blue. A rolling ball will come to rest randomly in any of the slots. It is twice as likely to land in a white slot as either of the others. This is a stationary system because the rules of probability theory and the colour distribution governing the ball's progress don't change.
It is also a random system since the ball is equally likely to land in any given slot. It is an independent system since previous rolls of the wheel and their results in no way affect the next outcome.
Now, if you change the colour coding of the partition, say by painting 25 of the white partitions yellow, the underlying rules of colour distribution change and the stationarity of the system is affected.
The system remains random and independent however.
The first key question for a technical analyst is whether the underlying rules that generate market price changes remain consistent ? If the rules themselves change very often, then previous price history will not have much predictive value. If the rules remain stationary, then technical analysis would work.
Technical analysts argue that mob psychology is what generates price changes and crowd behaviour has remained consistent over centuries hence the answer to question one is yes.
The second key question is whether the price changes are random even if the underlying rules remain consistent ? If the changes remain random then, even assuming the underlying rules are consistent and stationary, there isn't much point in studying pricelines because the changes are unpredictable. If the changes are not random, then technical analysis will work. Hence randomness is undesirable. The tandard argument for non-random price ha-nges is that prices would vary more dramatically over day to day and even minute to minute periods if they were truly random.
The thrid key question is whether new prices depend on previous prices ? If they are independent of previous prices, then obviously technical analysis will not yield optimal results. So a degree of serial dependence is desirable. The technical believer's position is that, since previous prices form a benchmark for new investment decisions, new prices are clearly dependent on previous price history.
Quite recently Dr Clifford Sherry who is chief researcher at the American journal "Technical Analysis of Stocks and Commodities", published a book "The Mathematics of technical Analysis" detailing actual tests to resolve these fundamental questions of stationarity, randomness and ind- ependence. Applying these tests to
Indian markets leads to some fascinating conclusions.
The first concept - that of stationarity is the one most often ignored. A stock's priceline may vary non-randomly and be dependent on previous prices, but if the rules which govern its variance keep changing, a technical analyst will be foxed, unless he can diagnose when exactly the stationarity is disturbed. So this feature is an attempt to explain the basic methods of testing for stationarity and working out how much it has changed.
We have taken three different pricelines to illustrate the testing process for the period beginning January 1992 till the present. One of those pricelines is the Sensex weekly closing values over this period. The other two are the weekly pricelines of Reliance and ITC over this period.
Now, there have been huge changes in trading methods in these 5 and a half years. Exchanges have gone online, circuit breakers have been imposed, Badla has been banned etc. The stationarity of all three scrips could have been affected by these market mechanism changes.
In addition, ITC and Reliance have both undergone fundamental upheavals so their stationarity could well have been disturbed. The Sensex has also been revamped with half its consitutuents replaced seamlessly in the same period. So the stationarity of the market's most popular index could also have been disturbed.
The basic tests of stationarity involves frequency distribution analysis of prices and their fluctuation. If price changes on a point to point basis maintain similar levels over a time period, the chances are that the rules underlying their fluctuation remain stationary.
Rather than pure price movements, the percentage price changes on a week -to-week basis have been studied. This is because price movements over a long period tend to give confusing results, because there is often a pronounced secular trend in either direction.
But if the stationarity remains consistent, price percentage changes will show similar distribution patterns while remaining trend neutral.
So the calculation for the analyst is to work out the price changes on a weekly basis as a percentage of the previous week's price. In order to study possible frequency distribution fluctuations, this data has to be further split up into equal subdivisions which can be compared with each other.
In this instance we have split the data into two equal halves. It could as easily have been split into quarters, or fifths or tenths -so long as the divisions are equal. A shorter time period could be focussed upon or a longer. These changes would be a matter of personal convenience.
Here, for example, a total of 272 weeks were considered for each scrip. This data was first divided into two halves of 136 weeks each.
The first half covered the period from January 1992 to September 1994 and the second half covers the period September 1994 to last week ( May 9, 1997). The price changes of each half were calculated and there were 135 changes in each half.
Once the price changes had been calculated, the frequency distribution of the changes were studied. A frequency range of 41 `bins' ranging from minus 20 per cent to plus 20 per cent were created. Each bin had a one percent range except for the zero bin which signified no price change. The number of changes falling into each bin was noted.
This has been graphically shown in the frequency distribution bar graphs of the first and second half of each priceline. If the bar graphs of the first and second halves appear similar, the chances are high that stationarity is being maintained.
All the six halves appear to feature normal distributions - bell curves spiking up round a central point and bunched closely around the midpoint.
The first halves of ITC, Reliance and the Sensex feature a tilt to the right of the zero which signifies that there was indeed a positive uptrend in the form of more positive price changes. The second halves are slanted slightly to the left which signifies downtrends, but all six are more or less balanced around the midpoint and the frequency histogram of the first half of each stock corresponds reasonably closely to the second half. We thus have reason to hope that the price changes are stationary.
The next more critical test is to create cumulative frequency density functions. This involves merely adding the frequency distribution numbers across the whole bin range. The cumulative frequency is then turned into a running percentage number by expressing it as a percentage of the total number of price changes.
For example, in the case of the first half of ITC, there was a cumulative frequency distribution of 50 price changes in the region of minus 20 per cent to minus one per cent. There were 16 strikes in the zero region. Expressed as a percentage of a total 135 changes this was a density of 48.8 per cent over this (minus 20 to 0) region. For the Sensex, there was a cumulative frequency of 46.66 per cent with 63 strikes between minus 20 per cent and zero for the first half, and Reliance had 71 changes in this region logging 52.59 per cent.
For the second halves of the Sensex, ITC and Reliance, the density of the same minus 20 to 0 region works out to 58.82 per cent, 54.81 per cent and 57.04 per cent respectively. That reflects the fact that there has been a pronounced downtrend in the period September 1994 to the current point.
The cumulative densities are then matched against each other for two halves of the same stock by plotting them versus each other. If stationarity of the stock has been maintained across both halves then the density graph will have a slope that is close to 45 degrees.
The closer the graph comes to bisecting a right angle the more rigidly stationarity has been maintained.
Examining the three density match graphs we note that the Sensex has veered furthest from the ideal. The origin of the Sensex density match has shifted to the right implying that the second has seen fewer large negative changes.
But there have been a greater number of changes in the negative region - again not a surprise. ITC corresponds almost exactly to the ideal fit, in fact so closely that it appears nearly contrived. Reliance has shifted more from the ideal than ITC, but less than the Sensex.
Still, all in all the corrrespondence is very close and we can unhesitatingly say that these three scrips pass the test of stationarity across the most turbulent period of economic change and changes in trading systems.
The density matches show an amazing correspondence. All three graphs run extremely close to the 45 degree angle as even a cursory visual inspection shows.
What are the implications for a trader basing his strategies on technical analysis ? First and foremost, the maintenance of stationarity implies that the underlying rules for stock price changes in these two pivotals and the Sensex have not changed a great deal in the last five years.
Of course, the sensex has changed more than ITC and RIL - part of those changes could be accounted for by the revamping of the index when the stationarity must have been disturbed by the advent of 15 new scrips and the exit of 15 old faithfuls.
It was really surprising to discover that ITC and Reliance have maintained such close adherence to stationarity given the various upheavals in thos two companies. Again the only explanation I can vouschafe is that the mob perception of these two scrips hasn't changed all that much.
This we can say regardless of the fact that we may not be able to identify the exact rules. If stationarity is maintained to this extent across this timeframe it is also possible to use previous prices dating back at least to that era when making trades. Incidentally across shorter timeframes which we don't have the space to explore in this piece, the correspondences appear even closer.
The tool of stationarity testing can be utilised as a failsafe before doing an exhaustive technical analysis of any stock. If the scrip fails the initial test try shortening the time period or splitting it into smaller divisions and retesting. If the scrip shows stationarity on shorter timeframes then adjust your analysis accordingly.
If the scrip doesn't exhibit stationarity even on reasonably short timeframes, avoid trading it on technical grounds. The rules are changing too fast for comfort or profit.
What about the other two key factors - randomness and independence. Well they are more familiar concepts to most people and we don't have the space to explore tests for either in any detail.
Perhaps we can go into them sometime in the future. In the meantime, remember to check for stationarity whenever a scrip seems to possess a puzzling technical profile. It could help finetune your trading skills.