Get Complete Project Material File(s) Now! »

**Research method**

*In this chapter I intend to give a thorough description of the tests and models used to examine the validity of technical analysis for OMXS30. The chapter is divided into two parts. The first part will concentrate on two random walk tests: the Box-Pierce Q-test and Lo & MacKinlay’s single variance ratio test. The second part will focus on technical trading rules related to financial theory and previous studies.*

**Random Walk Tests**

As technical analysis asserts that successive returns are dependent, I seek evidence support-ing the first hypothesis: that OMXS30 followed a non-random walk between 2001-12-28 and 2011-12-30. I will evaluate the random walk hypothesis with two random walk tests: the Box-Pierce Q-tests and Lo & MacKinlay’s single variance ratio tests.

**The Box-Pierce Q-test**

The Box-Pierce Q-test (Box & Pierce, 1970) is a method to test for serial correlation in a time series. I will use the Box-Pierce Q-statistic to test the weakest form of the random walk hypothesis (RW3) with a null hypothesis of no serial correlation. The Q-statistic is a linear equation of equally weighted squared autocorrelation coefficients and is asymptoti-cally distributed as the chi-squared distribution. As defined by Box & Pierce (1970) the sta-tistic is calculated as:

turns out that this assumption is a bit problematic since many stock markets exhibits a lep-tokurtic distribution. Nonetheless, since the asymptotic normality of the autocorrelation coefficients does not require that the innovations are normally distributed (Anderson Walker, 1964) the Box-Pierce Q-statistic should still be considered a useful tool to detect serial correlation.

**Lo & MacKinlay’s Variance Ratio Test**

The second random walk test I will employ is Lo & MacKinlay’s (1988) single variance ra-tio test. As many random walk tests concentrate on testing RW3 (such as the Box-Pierce Q-test), Lo and MacKinlay’s variance ratio test is used to evaluate the strongest form of the random walk hypothesis (RW1). Furthermore, variance ratio tests are superior to other random walk tests when more than 256 observations are regarded (Chow & Denning, 1993). As such, the variance ratio test should provide more meaningful results when analys-ing the nature of stock market price movements.

The idea behind Lo and MacKinlay’s single variance ratio test is that the increments of the variance of stock returns should be proportional to the observation interval. For the ran-dom walk hypothesis to hold, the variance of the increments in the trajectory must be line-ar. Consider the following equation:

where q is the observation interval of different variance estimator, ̂( ) is the j-th order autocorrelation coefficient of the first differences of and ̅ ( ) is the unbiased variance ratio estimator. Since ̅ ( ) approaches zero under the null hypothesis that the variance ratio equals one, only the asymptotic variance of ̅ ( ) needs to be computed to perform the standard inference (Lo & MacKinlay, 1988). Given the variance ratio statistic, the null hypothesis of equal variances can be defined as:

Following Lo & MacKinlay (1988) I will use two different test statistics: The first test statis-tic in the case of homoscedasticity assumes i.i.d. error terms and is calculated as:

The second test statistic is the robust z-statistic in the case of heteroscedasticity. Since hetroscedasticity can explain the rejection of the random walk hypothesis (RW1), the ro-bust test statistic is of great importance. In other words, if the robust z-statistic is signifi-cant, the rejection of the random walk hypothesis is not due to changing variances because of heteroscedasticity (time varying variances). The robust test statistic is calculated as:

where ( ) is the heteroscedasticity-consistent estimator of the variance of the autocorrela-tion coefficient estimator. ( ) is computed as:

where ̂ is the average return. In this paper, I will use observation intervals (q) of 2, 4, 8 and 16.

**Trading Rules**

This section seeks evidence supporting the second hypothesis that technical trading rules did have predictive power over future price movements of OMXS30 between 2001-12-28 and 2011-12-30. I will assume that OMXS30 follow trends in the primary market move-ment. I therefore adopt two trend determinants: the standard moving average (SMA) and the exponential moving average (EMA). Following Säfvenblad’s (2000) findings that OMXS30 exhibit negative feedback trading, where investors sell after price increases (profit taking), I also introduce two oscillators: the relative strength index and the RSIstoch. As these oscillators measures the power of directional price changes, they might be a useful tool to detect price reversals generated from profit taking behaviour. In addition, I have al-so followed up on successful trading rules for OMXS30 examined by Metghalchi et al (2005): the Arnold and Rahfeldht moving average technique and price relative to an SMA. For brevity, descriptions for the two trading rules are found in the appendix (section 1.1).

To evaluate the different trading rules I will use the Welch t-statistic. The Welch t-test is employed when population variances are assumed to be different and when the sample siz-es are not equal. A description of the Welch t-statistic is found in the appendix (section 2.2). All trading rules will be tested at the 5% significance level. Furthermore, I will assume that the index level remains stable during the last few minutes of trading. An investor will therefore be able to place next day’s market position at the close.

**Standard Moving Average**

Standard Moving Average (SMA) techniques are some of the most popular trend calcula-tions (Kaufman, 2003). The main use of the SMA is to smooth out day-to-day fluctuations in security prices and by that identify assumed trends. The standard moving average takes the average from past closing prices over a predetermined time period and is calculated as:

is the number of days in the predetermined time period and is the price level. Alt-hough the 200-day moving average seems to be the benchmark, investors can choose themselves how long or short the time period should be. There are no specific rules in re-gard to that. However, while shorter time periods tends to be more responsive to price changes, longer time periods will provide more reliable estimates on the long-term trend.

In this paper, a “buy-signal” is generated when a short SMA moves above a long SMA. Likewise, a “sell-signal” is generated when a short SMA moves below a long SMA. The main reason for using a short SMA instead of the index price level is to avoid being whip-sawed by erratic price movements.

**Exponential Moving Average**

While the SMA assign equal weights to past observations, the exponential smoothening ef-fect incorporated in the exponential moving average (EMA), assign exponentially decreas-ing weights to past observations over time. Hence, EMA brings the exponential value clos-er to the last closing price by assigning greater importance to recent data. The starting value of the EMA is usually the simple moving average for N days. The following values of the EMA are calculated as:

it is important to remember that while smaller values of tends to produce trend values more responsive to price changes, larger values of will provide more reliable estimates on the long-term trend. I will however adopt a more common practice and calculate the smoothing factor with the following formula:

where is the number of observations included in the starting value. The trading rule for EMA is similar to the trading rule for the SMA. A “buy-signal” is generated when a short EMA moves above a long EMA. Consequently, a “sell-signal” is generated when a short EMA moves below a long EMA.

**The Relative Strength Index**

First introduced by Wells Wilder, the relative strength index (RSI) provides a ratio of the upward price movement relative to the total price (Kaufman, 2003). To be more specific, the RSI is a measure of the power of directional price changes. The RSI is computed as:

the RSI is that a security can be considered “overbought” if the price level moves up very rapidly. Once a security is considered “overbought” the price is assumed to rebound and fall. Hence, the RSI can be used to exploit profit taking behavior. Normally, a security is considered “overbought” when the RSI is above 70 (Murphy 1999).

A common usage of the RSI is to detect potential market entry and exit points once a long term positive trend has been established (Kirkpatrick & Dahlquist, 2007). As such, the RSI will not be used as a single indicator. Instead I will use the RSI in combination with SMAs and EMAs. I will consider the index to be “overbought” when the RSI is above 70. At this point, I will expect the market to rebound as investors lock in gains from winning stocks and thereby exit the market.

**RSI stoch**

The RSIstoch is an extension of the RSI. However, instead of applying the stochastic for-mula on price movements, RSIstoch applies it on the relative strength index. Developed by Chande & Kroll (1994) the RSIstoch aims to mitigate problems related to the RSI. Chande and Kroll argued that the RSI often register below 70 for longer periods but seldom reach levels of “overbought”. Thus, investors can be left with very few trades based on the RSI if only following the fundamental tenets. By measuring the level of the RSI relative to its range over a predefined period, the RSIstoch tries to combat this shortcoming. In other words, the RSIstoch is a more sensitive measure of the power of directional price changes. The RSIstoch is calculated as:

where is the lowest low for the RSI for the given time period and the highest high for the RSI for the given time period. Investors can choose themselves how long or short the time period should be. I will however use the same time period as for the RSI of 14 trading days.

As for the RSI, the RSIstoch will not be used as a single indicator. The RSIstoch will in-stead be used to detect potential market entry and exit points once a positive trend has been established using SMAs and EMAs. I will assume that the index will rebound and thereby exit the market once the RSIstoch is above 0.80.

**Data Selection**

I will use closing prices from OMXS30. OMXS30 is an index which involves OMX Stock-holm’s most traded stocks and should provide a good general picture of the Swedish stock exchange. Furthermore, using the OMXS30 index I will mitigate biases related to illiquidity. In other words, an investor should be able to buy and sell shares quickly without seeing a relevant change in price. The data I will use is taken from NasdaqOMX. The time period I will examine is between 2001-12-28 and 2011-12-30. I have chosen this time period since it includes periods of both high and low volatility. In addition, I believe that a time period of ten years is substantial for examining the topic at hand.

Abstract

1 Introduction

1.1 Background and Problem Discussion

1.2 Previous Research

1.2 Method

2 Theoretical framework

2.1 The Random Walk Theory

2.2 The Efficient Market Hypothesis

2.3 Behavioural Finance

2.4 The Dow Theory

2.5 Technical analysis

3 Research method

3.1 Random Walk Tests

3.2 Trading Rules

3.3 Data Selection

4 Empirical Results

4.1 Empirical Results for the Random Walk Tests

4.2 Empirical Results from Technical Trading Rules

4.3 Empirical Results for Different Investment Strategies

5 Summary and Conclusion

References

Appendix

GET THE COMPLETE PROJECT

The Validity of Technical Analysis for the Swedish Stock Exchange Evidence from random walk tests and back testing analysis