In: Math
The accompanying data set provides the closing prices for four stocks and the stock exchange over 12 days:
Date | A | B | C | D | Stock Exchange |
9/3/10 | 127.37 | 18.34 | 21.03 | 15.51 | 10432.45 |
9/7/10 | 127.15 | 18.18 | 20.44 | 15.51 | 10334.67 |
9/8/10 | 124.92 | 17.88 | 20.57 | 15.82 | 10468.41 |
9/9/10 | 127.35 | 17.95 | 20.52 | 16.02 | 10498.61 |
9/10/10 | 128.37 | 17.82 | 20.42 | 15.98 | 10563.84 |
9/13/10 | 128.36 | 18.64 | 21.16 | 16.21 | 10616.07 |
9/14/10 | 128.61 | 18.83 | 21.29 | 16.22 | 10565.83 |
9/15/10 | 130.17 | 18.79 | 21.69 | 16.25 | 10627.97 |
9/16/10 | 130.34 | 19.16 | 21.76 | 16.36 | 10595.39 |
9/17/10 | 129.37 | 18.82 | 21.69 | 16.26 | 10517.99 |
9/20/10 | 130.97 | 19.12 | 21.75 | 16.41 | 10661.11 |
9/21/10 | 131.16 | 19.02 | 21.55 | 16.57 | 10687.95 |
With the help of the Excel Exponential Smoothing tool, I was able to forecast each of the stock prices using simple exponential smoothing with a smoothing constant of 0.3 (ie, damping factor of 0.7).
I was also able to calculate the Mean Absolute Deviation (MAD) of each of the stocks: MAD of Stock A = 1.32 MAD of Stock B = 0.37 MAD of Stock C = 0.41 MAD of Stock D = 0.26 MAD of Stock Exchange = 83.85.
The Mean Square Error (MSE) of the stocks: MSE of Stock A = 2.22, MSE of Stock B = 0.17, MSE of Stock C = 0.21, MSE of Stock D = 0.08, MSE of Stock Exchange = 7963.44.
Help me to understand the concept of Mean Absolute Percentage Error (MAPE). I realize that MAPE is the average of absolute errors divided by actual observation values. I'm wondering if this is just the MAD divided by the total observation values for a particular stock. For example, for Stock A, If my understanding is correct (which I don't think it is), the MAPE of Stock A would be 1.32 / each of the observation values individually. Or, would it be [(127.15 - 127.37) / 127.15]. Or, do I need to add up all the absolute errors for Stock A and all the actual observation values for Stock A and divide the former by the latter and then multiply by 100. As you can see, I'm confused. Please help.
Solution: In order to calculate the MAPE for stock A follow steps as given below:
Step 1: Find the absolute error for the values of stock A.
Absolute error = | actual value - Forcasted value |
Step 2: Find the percentage absolute error for the values of stock A.
Absolute percentage error = (Absolute error × 100)/Actual value
Step 3: Now take the average of all the absolute percentage errors that you have calculated in step2. This average will be the Mean Absolute Percentage Error (MAPE).
The MAPE for Stock A is calculated below: