It has been a long time since I paid homage to one of the best of the best in this business of making sense (pun intended) out of the market chaos. David Varadi has been been designing the most innovative indicators and providing access to the thinking behind his designs for over a year on his blog CSS Analytics. Do yourself a favor and make time to digest his thinking and philosophy on his blog (free, but yet priceless) or take the easier (but not quite free) route of just purchasing his indicators. No, I’m not being compensated for my remarks. Sometimes it is just important to take time out to recognize those folks who are very, very talented, yet humble and generous.
In November, 2009, Varadi published his desgin for an indicator he called the Aggregate M. I was impressed with this indicator and have used it ever since its initial publication. I have been watching the performance of the indicator very closely for the past 8 months and am still impressed. I decided that now would be a good time to review its performance as we have finally seen something besides a no-volatility market that goes straight up.
Timing the SPY: Aggregate M and All SPY History
Rules:
Buy the close when Aggregate M crosses above 50 from below.
Sell the long position when Aggregate M cross below 50 from above.
(Current Aggregate M reading on June 14th: 40.28)
Trade Stats:
Equity Curve:
Drawdowns:
So What Has a SPY Buy and Hold Done over the Same Time?
The following stats include .01/share commissions.
SPY Performance over all history: 5.41% with a max drawdown of -56.46%.
Summary:
The performance of the Aggregate M indicator speaks for itself. The indicator has signaled a return to cash on 6/2 and again on 6/11. As the indicator is showing no sign of losing its edge, I find yet another reason to remain cautious with a large cash position.
Interesting — quick question — what’s up with the long flat period in late 08-09? If it was in cash the whole time, then why’s there a drawdown?
Marshal, it was flat because the Aggregate M was beneath 50 that whole time. The drawdown starts at the highest peak equity, which would have been that big spike in 2007. It made a few trades (notice the drawdown decreases) and then goes to cash. So even if it is not making trades, it will be in a drawdown if at any point in the past equity was higher than current equity. Let me know if this is not clear. Regards, Wood.
Ah ok, that makes the drawdown more logical, thanks.
Wood, do you have a simple spreadsheet with this indicator hashed out that you’d be willing to share?
Thanks.
0x7, I don’t have it on a spreadsheet.
David released the pseudo-code for some of his earlier indicators for free. I’m not sure if this is one that is in the public domain or not. It looks like, based on his DVI page here: http://dvindicators.cssanalytics.com/indicators/dv-aggregate-dvam/ that he has tweaked it some as it is not exactly what I am using. The best thing to do is to leave him a comment on his blog or email him.
Woodshedder,
I looked at the CSS Analytics blog and tried to recreate the Aggregate M indicator in AFL. My AFL does not come close to replicating your results…it loses 23.78%. Can you give me any pointers on where I went wrong? Here is my code:
function PercentRankHLC(Data1, Data2, Data3, Periods)
{
Count = 0;
for (i = 0; i Ref(Data1, -i), 1, 0);
Count = Count + IIf(Ref(Data3, 0) > Ref(Data2, -i), 1, 0);
Count = Count + IIf(Ref(Data3, 0) > Ref(Data3, -i), 1, 0);
}
return 100 * Count / (Periods*3-1);
}
rank_Long = PercentRankHLC(High,Low,Close,252);
rank_Short = PercentRankHLC(High,Low,Close,10);
Value = (rank_Long + rank_Short)/2;
AggregateM = (Ref(Value,-1)*0.4) + (value*0.6);
Buy = Cross(AggregateM, 50);
Sell = Cross(50, AggregateM);
I think the less-than symbol (LT below) caused some of the code not to be posted…here’s another try:
function PercentRankHLC(Data1, Data2, Data3, Periods)
{
Count = 0;
for (i = 0; i LT Periods + 1; i++)
{
Count = Count + IIf(Ref(Data3, 0) > Ref(Data1, -i), 1, 0);
Count = Count + IIf(Ref(Data3, 0) > Ref(Data2, -i), 1, 0);
Count = Count + IIf(Ref(Data3, 0) > Ref(Data3, -i), 1, 0);
}
return 100 * Count / (Periods*3-1);
}
rank_Long = PercentRankHLC(High,Low,Close,252);
rank_Short = PercentRankHLC(High,Low,Close,10);
Value = (rank_Long + rank_Short)/2;
AggregateM = (Ref(Value,-1)*0.4) + (value*0.6);
Buy = Cross(AggregateM, 50);
Sell = Cross(50, AggregateM);
Dave, were you able to correct the code? If so can you or anyone else verify this is it?
It is very close Gecko, but not quite right. I’m not trying to be a pain, I just don’t know if David Varadi has released this in the public domain.
For anyone interested in an excel version, wrp123 over in the DV forums posted a link to one he created.
http://dvindicators.cssanalytics.com/community/?vasthtmlaction=viewtopic&t=31.0
Thanks Ox7!
On a side note, I’ll be curious to see what the reading is tonight after today’s melt-up!