Hello and Merry Xmas!
We had been recently contacted by a reader of our blog who couldn’t find much difference using the IMA. The main question was that a simple (50, 200) EMA did the best on several indices.
The way IMA is constructed does not necessarily mean that IMA is always better to the usual MA indicator which is based on. However, if there is an active trader who constructs her strategy using MA rules (exclusively), our claim is that it is highly likely that she will be better off using the IMA backtesting all combinations.
Click here to download an .xlsx file as an example on SPY. The data was collected from Yahoo, starting from 2004-01-01 to 2011-12-22 using the code we have uploaded on our site. (click here for the code) (To keep thing simple, exit threshold is zero).
If someone is interested entirely on SMA, then she has to look at table 1 (only). In this table we see that IMA does not provide better results and the investor is better off using the MA cross-over rule with short MA = 50 days, long MA = 200 days. Please note that Sharpe in this case is 0.511 and Cumulative Return is 0.533.
Our suggestion is that the investor should not trust the SMA at all cases (or just one MA strategy). She should use backtesting and try different combinations for short and long MA periods as well as different MA methods (i.e. weighted MA, exponential MA etc). If we look at table 2, that provides the output for different EMA combinations, we see that the best strategy (across all tables) is the one based on the long EMA with 100 days. The Sharpe Ration here is 0.787 and the Cumulative Return is 0.733 (20% more!).
Hence, the above could be summarized in the following algorithm.
Using the Improved MA Criterion:
- Set different combinations for short and long MAs (e.g. (k1,k2)={(10, 20), (20, 50), (20,100), (50,100), (20,200), (50,200), (100,200)} (or anything you find useful)
- Use the above lengths in SMA, WMA, EMA and their Improved MA versions
- Compare their performance in backtesting (The choice of Exit Threshold is advised to be chosen using backtesting as well)
Then, it is highly likely (but not 100% guaranteed!) that the investor is better off using an Improved version of a criterion.
Here is the comparison.
| Simple MA (50,200) | ||||||||||
| Ret-MA1 | Ret-MA2 | Ret-MAC | Ret-IMA1 | Ret-IMA2 | Ret-IMC | Ret-IV1 | Ret-IV2 | Ret-IVC | Ret-BnH | |
| Average | 0.041 | 0.037 | 0.061 | 0.051 | 0.010 | -0.003 | 0.046 | 0.041 | 0.056 | 0.060 |
| Volatility | 0.107 | 0.105 | 0.119 | 0.107 | 0.062 | 0.012 | 0.105 | 0.101 | 0.116 | 0.220 |
| Sharpe | 0.380 | 0.350 | 0.511 | 0.471 | 0.165 | -0.246 | 0.435 | 0.403 | 0.485 | 0.272 |
| Max | 0.040 | 0.044 | 0.047 | 0.044 | 0.026 | 0.010 | 0.040 | 0.044 | 0.047 | 0.145 |
| Min | -0.046 | -0.039 | -0.065 | -0.048 | -0.039 | -0.030 | -0.046 | -0.039 | -0.065 | -0.098 |
| Cumulative | 0.322 | 0.283 | 0.533 | 0.428 | 0.068 | -0.024 | 0.376 | 0.327 | 0.482 | 0.328 |
| Drawdown | 0.258 | 0.233 | 0.173 | 0.231 | 0.198 | 0.042 | 0.240 | 0.182 | 0.177 | 0.552 |
| Duration | 652 | 620 | 450 | 497 | 1119 | 635 | 507 | 587 | 460 | 1062 |
| Profit/Loss | 0.854 | 0.840 | 0.860 | 0.874 | 0.856 | 0.442 | 0.869 | 0.843 | 0.864 | 0.855 |
| Win Rate | 0.316 | 0.346 | 0.350 | 0.269 | 0.140 | 0.002 | 0.302 | 0.332 | 0.341 | 0.550 |
| Expectation | -0.414 | -0.364 | -0.349 | -0.497 | -0.741 | -0.997 | -0.437 | -0.388 | -0.364 | 0.020 |
| Exponential MA (20,100) | ||||||||||
| Ret-MA1 | Ret-MA2 | Ret-MAC | Ret-IMA1 | Ret-IMA2 | Ret-IMC | Ret-IV1 | Ret-IV2 | Ret-IVC | Ret-BnH | |
| Average | -0.010 | 0.046 | 0.030 | 0.026 | 0.073 | 0.019 | 0.016 | 0.048 | 0.027 | 0.060 |
| Volatility | 0.123 | 0.107 | 0.111 | 0.103 | 0.093 | 0.059 | 0.117 | 0.104 | 0.100 | 0.220 |
| Sharpe | -0.077 | 0.430 | 0.268 | 0.254 | 0.787 | 0.316 | 0.133 | 0.460 | 0.270 | 0.272 |
| Max | 0.072 | 0.035 | 0.044 | 0.047 | 0.044 | 0.023 | 0.072 | 0.034 | 0.044 | 0.145 |
| Min | -0.089 | -0.042 | -0.047 | -0.089 | -0.042 | -0.028 | -0.089 | -0.042 | -0.039 | -0.098 |
| Cumulative | -0.127 | 0.378 | 0.206 | 0.182 | 0.733 | 0.143 | 0.072 | 0.402 | 0.192 | 0.328 |
| Drawdown | 0.439 | 0.199 | 0.254 | 0.300 | 0.147 | 0.097 | 0.352 | 0.182 | 0.202 | 0.552 |
| Duration | 1151 | 561 | 544 | 909 | 527 | 1157 | 846 | 561 | 614 | 1062 |
| Profit/Loss | 0.832 | 0.860 | 0.825 | 0.871 | 0.890 | 0.926 | 0.871 | 0.859 | 0.804 | 0.855 |
| Win Rate | 0.315 | 0.348 | 0.348 | 0.250 | 0.279 | 0.116 | 0.295 | 0.335 | 0.313 | 0.550 |
| Expectation | -0.422 | -0.353 | -0.364 | -0.532 | -0.474 | -0.777 | -0.448 | -0.377 | -0.435 | 0.020 |








