Entropic Analysis of Equity Prices
Original article by Ron McEwan
AIQ Code by Richard Denning
The AIQ code for Ron McEwan’s “Entropic Analysis of Equity Prices” from the November 2006 issue is given below. To test the effectiveness of the entropic indicator, I devised two trading systems based on the suggestions of the author as follows:
System 1 (test EPS1):
Enter a long position if:
1) Two days ago the entropic indicator is less than 50 and
2) Yesterday and today the entropic is greater than 50
Exit the long position if the entropic drops below 50 for two days.
Reverse the rules for a short position (not tested).
System 2 (test EPS2):
The author suggests that the indicator can be used as a buy signal when it turns up from a low value and as a sell short signal when it turns down from a high value. I tried the fixed values suggested but, on the NASDAQ 100 stocks, there were not enough trades during my test period. Instead of fixed values, I decided to put standard deviation bands around the indicator as over bought and over sold levels to trigger entries. I also added a trend filter so that the second system only trades in the direction of the intermediate trend:
Enter a long position if:
1) The entropic crosses up from below a two standard deviation band based on a 20 day simple moving average of the indicator and
2) The 50 day simple moving average of the NASDAQ 100 index is sloping upward based on a 5 day linear regression line on the average.
Exit the long position if:
1) The entropic indicator crosses above the upper standard deviation band set to two standard deviations from a 20 day simple moving average of the indicator or
2) The 5 day linear regression slope of the 50 day simple moving average of the NASDAQ 100 index is sloping downward.
I used a 30 day relative strength (strongest first) to select the trades taking 2 per day and maximum of 5 at 20% of the account balance each.
Enter a short position if:
1) The entropic crosses down from above a 2.5 standard deviation band based on a 20 day simple moving average of the indicator and
2) The 50 day simple moving average of the NASDAQ 100 index is sloping downward based on a 5 day linear regression line on the average.
Exit the short position if:
1) The entropic indicator crosses below the upper standard deviation band set to two standard deviations from a 20 day simple moving average of the indicator or
2) A profit protect set to 100% above 1% is violated or
3) A stop loss of 5% is violated or
4) The 5 day linear regression slope of the 50 day simple moving average of the NASDAQ 100 index is sloping downward.
I used a 30 day relative strength (weakest first) to select the trades taking 2 per day and a maximum of 5 at 20% of the account balance each.
Both systems were tested over the period 10/30/1998 to 11/06/2007 using the Nasdaq 100 stock list. A comparison of the two systems, trading the long side, is shown in the Figure above. System 2 (EPS2) is shown as the dark blue line and it outperforms system 1. System 1 shows a 58.5% maximum drawdown, which is much higher than the drawdown of 16.4% for system 2. In addition, the Sharpe ratio of 1.26 is better on system 2 versus system 1's Sharpe ratio of 0.76. The short side on system 2 was tested and it turned out to have a consistent, downwardsloping equity curve (not shown), losing 24% over the test period (annualized loss of 3.4%) with a Sharpe ratio of 1.25. The rate of loss is not large enough to make it worth trying to trade the short side in reverse.
EDS Code for Entropic Analysis
EPS Sys1.EDS





