Is EWMA and MA are efficient in explaining the future prices of stock? Which one is better at predicting prices?

Thu, Feb 7, 2019 4:58 PM on Exclusive, Recommended, Stock Market,

We know that the movement of the market cannot be predicted with 100% accuracy, however, we try to predict market movements using various tools. Every successful investor is trading in the market with his/her own strategy which can be technical/fundamental/quantitative/rumor based/ news trading/trading by considering world or country's economic health or anything.

There are various methods of analyzing the market and some of the popular ways of market analysis are technical and fundamental analysis.

In this article we will explore, the effectiveness of technical analysis in the Nepalese capital market using regression (ordinary least square) analysis with two simple and popular technical indicators:

  • Simple Moving Averages (MA).
  • Exponential Weighted Moving Averages (EWMA).

Simple Moving Averages:

These are simply an average price of the chosen period. For example, if I want to calculate the MA of last five days then I just have to add the five days' price and divide it by 5.

In this research, we have chosen MA of a time period of 20-days and 50-Days respectively.

The first 5 rows of our data are given below:

  Last Five rows of our data are Given below:

We want to find the relationship between the current value of Moving Averages and Closing Price of the NEPSE after 20 days.

In the process, we examine the relationship between each moving averages with the closing price after 20-Days. The picture below shows the scatter plot of moving averages with the closing price after 20-days.

The red colored scatter plot represents MA-50 in the y-axis and Closing Price after 20-D in the x-axis. Similarly, the green colored scatter plot represents MA-20 in the y-axis and Closing Price after 20-D in the x-axis.

By looking at the plots, we can say that there is a linear relationship between the closing price after 20-days and the Moving Averages.  Further, we can say that the moving averages and closing price after 20-days is directly proportional.

However, we are more concerned with the effect of multiple EMA's to the Closing price after 20-D rather than their independent effect.

To find the relationship, we used linear regression analysis by taking Closing Price after 20-D as the dependent variable and moving averages as the independent variable. We have tried a different combination of independent variables and chosen 20-Days Moving Average and 50-Days Moving Average as a dependent variable.

We had a total of 1601 data with two independent variables and one dependent variable.

The result of the regression is shown below:

The null hypothesis of regression analysis is "The coefficient of all the dependent variable is zero or in other words, there is no relationship between any of the dependent variable and independent variable."

As shown in the table above the F-statistics of this regression analysis is more than 5 thousand thus, we have strong evidence to reject the null hypothesis. Now, we can say that there is a relationship between the MA's and the Close price after 20-D.

The log-likelihood of the regression analysis is more than negative 10 thousand which simply states that the probability of all the dependent variables coefficient to be zero is 10^ (-10228).

In the result table, R-squared is 0.876, which means the regression line has explained 87.6% of the data.

P-value of T-statistics for each coefficient of the dependent variable with null hypothesis: "Coefficient is equal to zero" is significant at 0.005% of significance level which simply means they are not zero.

The result of the regression analysis is strongly supporting the relationship of the Moving averages and NEPSE value after 20-Days and it supports the technical analysis in the Nepalese Capital Market statistically.

By looking at the table above we can make an equation of the closing price after 20-days based on the current moving averages.

P20 = 1.17M20 – 0.27M50 +142.

Exponential Weightage Moving Averages:

In an exponential moving average, recent data are given more weight than the older one.

To find the EMWA, first, we need to calculate the weight (or Exponential Smoothing). There is a different formula for calculating exponential smoothing, depending on the available data. Here, we have calculated weight with the formula given below.

  alpha= 2/ (Number of observation +1)

The formula for the EMA is given below:

Where Pt-i     represents the value of NEPSE on the date (t- i), where t represents today's date and n is the time period.  

The relation between the EWMA's and NEPSE index value after 20 Days is linear and proportional. The relationship is given by the scatter plot shown below.

 

The plot is similar to the plot of Simple moving averages. We did the linear regression analysis of the EWMA and Closing Price after 20-D. The result of the regression is shown below

 

The result is similar to that of the Simple moving average, additionally, the result strongly supports the relationship between the future price of NEPSE index and current exponential weighted moving averages. P-value of all the test is zero till the 5th decimal or we can say that the result is significant even at the 99.99999% confidence level.

The equation of the Close Price after 20 days for EWMA is given below

P20=1.46E20 -0.56E50 +144

Next question, Is it good to make a move by looking at the Dead cross or golden cross in the market?

To verify this, we simplified the regression equation.

NEPSE index will increase if;

∆E20> 0.36 ∆E50

The above equation states that for the price to increase the change in 20 days moving average should at least be greater than the 36% of the change in the 50 days EWMA.

Now, golden cross occurs when the value of fast moving averages cross the slower moving averages from downward. In other words, we can say that in the dead cross, the change in fast moving averages will be more than the change in slow moving averages. Thus, our equation justifies this statement. In the same way, we can justify dead cross.

Further, we tried to simplify the equation for the Price change in NEPSE index using the regression equation and slope of EWMA of 50-days and EWMA of 20-days.

The equation derived to

Change in Price = (9/10) Change in E20

At last, we have tested the efficiency of our result by considering the prices 2018 data till August.

The total number of observation is 131 and on average the MA and EMA had predicted 86 point's higher value of NEPSE index in 2018.

The Standard deviation of the difference between the EWMA Predicted price and real Price is comparatively less than the standard deviation of the difference between the MA Predicted price and real price.

We can conclude this article with a few points

  • There is an efficiency of the technical analysis in the Nepalese capital market.
  • Changes in Moving Averages are effective in analysis rather than their absolute value.
  • In 2018, the MA's predicted around 86 point's high prices.
  • Exponential Moving Averages are comparatively better than the Moving Averages at Predicting Prices.