[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Dimensionally Coherent Relative Strength



PureBytes Links

Trading Reference Links

DIMITRIS TSOKAKIS wrote:
> Franko,
> A function[transformation] F is defined as linear when
> F(x+y)=F(x)+F(y)
> F(k*x)=k*f(x), k is a constant
> The linearity of a function has nothing to do with coherence.
> A simple example: The RSI transformation is obviously non-linear [do 
> not expect RSI(10*C)=10*RSI(C), 
> simply because 10*RSI(C) will vary from 0 to 1000.
> On the other side, the RSI transformation should pass the c-test. To 
> avoid boring maths, simply 
> x=C;
> y=10*C;
> Plot(RSIA(x),"RSI[C]",4,1);
> Plot(RSIA(y),"RSI[10*C]",1,1);
> and you will see two identical plots.
> BTW, the same definition implies that MACD is not a coherent 
> transformation, although it is pretty linear.
> See the simple
> x=C;
> y=10*C;
> MACDofx=EMA(x,12)-EMA(x,26);
> MACDofy=EMA(y,12)-EMA(y,26);
> MACDofxplusy=EMA(x+y,12)-EMA(x+y,26);
> Plot(MACDofxplusy,"MACD of (x+y)",2,1);
> Plot(MACDofx+MACDofy,"MACD of x +MACD of y",9,1);
> Plot(MACDofy,"MACD of 10*x",1,1);Plot(10*MACDofx,"10*MACD of x",4,1);
> to agree that MACD passes the linearity test, 
> although it does not pass the c-test [do not expect MACDofy and 
> MACDofy to have the same graph !!]
> 
> In practical terms, is there any limitation when we apply RSI or 
> MACD, 
> based on the fact that RSI is coherent and MACD is not ?
> Dimitris Tsokakis

Dimytris,

to say that the linearity of a function has nothing to do with coherence needs 
at least the exact definition of dimensionally coherence.

A dimensionally coherent function y is expressed as

y = f(x) = f(c*x)

only if the definition "A system can be said to be dimensionally coherent if its 
results do not change even though the units of measure do" refers to the exact 
value of the indicator. This is probably achieved only by normalized indicators 
in form of ratio. (properties of logs will explain this)

But if the definition "A system can be said to be dimensionally coherent if its 
results do not change even though the units of measure do" refers to a set of 
results represented by points (buy and sell points) then a liner function does 
not change any of its x points of minimum or maximum

y' = f'(x) = f'(c*x)

or any other characteristics.

Try again plotting your example but this way
x=C;
y=10*C;
MACDofx=EMA(x,12)-EMA(x,26);
MACDofy=EMA(y,12)-EMA(y,26);
Plot(MACDofy,"MACD of 10*x",colorBlue,1);
Plot(MACDofx,"MACD of x",colorRed,1 + styleOwnScale);

They perfectly overlap.

In trading, *every* linear function is dimensionally coherent. But it may be 
that not every dimensionally coherent system is a linear one.
So, that's why 'Systems based on absolute indicator values will not be
coherent, but systems based on indicator crossovers of moving averages
(of the indicator), for example, will' as Mark put it. But, you could even make 
it coherent transforming accordingly the absolute value of the threshold levels.

And 'F(x+y)=F(x)+F(y) F(k*x)=k*f(x), k is a constant' is the same as f(a*x + .. 
+ n*z) = a*f(x) + .. + n*f(z) in a less compact way.

-- 
Franco Gornati <fgornati@xxxxxxxxxxx>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/