McClellan Summation Index
Author: Sammy_G
Creation Date: 10/2/2010 10:07 PM

Sammy_G

#1
Hi Eugene,

The formula for McC summation index is wrong; it should be:
CODE:

Also, please consider adding the Ratio-adjusted calculations for both the McC Osc and SI http://www.mcoscillator.com/learning_center/kb/market_data/ratio_adjusted_summation_index/. Its more robust than the classic version, in my opinion, as it makes the calculations essentially impervious to changes in the number of issues traded over the years making long term comparisons more reliable.

Eugene

#2
"The Summation Index is the total of all previous McClellan Oscillator values, and it is neutral at +1000 when calculated and calibrated properly." - says mcoscillator.com.

What is the "should be" code above is actually doing? It's not summing up the values at all like McC summation index should, so it appears to be further from the truth than the Wiki example code.

Sammy_G

#3
http://www.stator-afm.com/mcclellan-summation-index.html

The 1000 is basically the "neutral value" arbitrarily established by the original authors - the McClellans - and one which they, as well as the world, still use.

But the proof of the pudding is in the eating, as they say. Compare the values for Summation Index generated by your formula vs the formula given in the 2 links above (the one which I quoted) against the de facto standard - www.mcoscillator.com [http://www.mcoscillator.com/market_breadth_data/].

Eugene

#4

Based on the 2nd link above and mcoscillator.com itself (the resource I previously used to verify the Community Indicators' MCO against their Excel table), my calculation was correct - but considered "old school" by today's standards.

However if we compare the formulas, they all are different.

mcoSumIdx[bar] = 1000 + ( 19*emaLT[bar] - 9*emaST[bar] );

2. Here's the Stator-AFM formula:
mcoSumIdx_a[bar] = (19*emaLT[bar] + 9*emaST[bar]) + 1000;

3. And here's James Miekka's formula (aka new method) from the DecisionPoint link:
mcoSumIdx_d[bar] = 1000 - 19*emaLT[bar] + 9*emaST[bar];

They produce very different results. So which one is closest to the money?

CODE:

Sammy_G

#5
Eugene, all 3 formulas are the same.

Before I solve them, let me define a couple of archaic terms still used:
10% trend = short-term (19 bar) trend = what I labeled as emaST
5% trend = longer-term (39 bar) trend = what I labeled as emaLT

Symbols I used are from Fidelity: ".MB_ADV.N" for NYSE advances, ".MB_DEC.N" for NYSE declines.
=============================================

The Stator-AFM formula is:
Summation Index (SI) = McClellan Oscillator - ((10*10% trend) + 20*5% trend)) + 1000

This appears to be a typo; should really be:
Summation Index (SI) = McClellan Oscillator - ((10*10% trend) - 20*5% trend)) + 1000
since we are logically supposed to subtract the 5% trend from the 10% trend [the 10*10% trend and 20*5% trend if not subtracted would lead to approx 200% (10*10% + 20*5%) trend].

This solves to:
SI = (emaST[bar] - emaLT[bar]) - (10*emaST[bar] - 20*emaLT[bar]) + 1000
= emaST[] - emaLT[] - 10emaST[] + 20emaLT[] + 1000
= - 9emaST[] + 19emaLT[] + 1000
= 1000 + 19emaLT[] - 9emaST[]
===========================

James Miekka's formula from DecisionPoint is:
Summation Index (SI) = 1000 - (9 * 10% Index) + (19 * 5% Index)

This solves to:
SI = 1000 - 9*emaST[] + 19*emaLT[]
= 1000 + 19emaLT[] - 9emaST[]
(you mixed up the + and - signs in the latter)

As you can see, they are really the same. And as I had written previously, just compare the values obtained to what is published daily on www.mcoscillator.com; you can d/l their Daily Oscillator Data xls file to compare values going further back in time.

Eugene

#6
After fixing a typo in the stator-afm's formula (that's why it always makes sense to double check the free web-based sources of information) and correcting my error in Miekka's formula, they all return the same value as you say, which is (almost) in line with mcoscillator.com's Excel sheet (because I'm not using the Fidelity data but rather the numbers coming from our Market Sentiment static data provider that reports more accurate median values based on several data sources).

Thank you. Wiki example edited.

WEALTHPRO25

#7
using the above code and wiki code for mcClellan Summation Index i get invalid symbol NYSE_advn

Eugene

#8
As both the above code...
CODE:

...AND the Wiki code...
QUOTE:
This example illustrates how to plot McClellan Oscillator using Market Sentiment provider's symbology, as well as construct McClellan Summation Index

repeatedly suggest,

"NYSE_advn" is created by the Market Sentiment data provider. More information is available in provider's online guide in the Wiki.

In general, don't hesitate to be curious about an error you're getting. Here's some simple steps you can take before asking on the forum. Notice the line, find the method which triggered it, highlight it and hit F1 to open the QuickRef tool with more details about possible errors. In addition, try to read // comments in the code you're executing: they're there for a purpose.

seanml55

#9
I can't get the data set that is in instructions. this is all I get

Eugene

#10
The Market Sentiment data provider is an extension. Since you don't have it installed, there is no choice in the New DataSet Wizard. Solution: install the extension and restart WLP.

Before you're able to install, please create a support ticket to verify your WLP entitlement.