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

[amibroker] An application on Siligardos method , II



PureBytes Links

Trading Reference Links




For easier reference, here is a variation for IB.
 
// Outperforming OR Underperforming Stocks
Plot( Close, "" , 1, 
64);Value=Foreign("~SUMRSI","C")/Foreign("~Count","V");WildPer = 
14;ExpPer = 2 * WildPer - 1;AUC = EMA( Max( C - Ref( C, -1 ), 0 ), ExpPer 
);ADC = EMA( Max( Ref( C, -1 ) - C, 0 ), ExpPer );x = (WildPer - 1) * ( 
ADC * Value / (100-Value) - AUC);RevEngRSI = IIf( x >= 0, C + x, C + x * 
(100-Value)/Value );Plot( 
RevEngRSI,"",4,4);ratio=IIf(revengrsi<C,100*(-1+C/revengrsi),100*(-1+revengrsi/C));Title=Name()+" 
Close "+WriteIf(RevEngRSI>C," underperforms the market by "+
WriteVal(ratio,1.2)+" %"," outperforms the market by 
"+WriteVal(ratio,1.2)+" %");
 
You may see from the last Close that MSFT is below its neutral 
market value by 8.11% and INTC is 2.63% above its
virtual Close.
The index ^NDX itself is outperforming the N100 market by 
1.15%
Since the N100 market is directional enough, every stock tends 
to neutralise its % relative to the market.
A 10% gap between the real and the virtual Close tends to 
close soon.
Of course, there are two ways : Either the stock will go 
higher faster than the market or the market will slow down.
It depends if the stock is between the "leaders" or the 
followers.
For long time frames there must be a theoretical equilibrium 
between out- and under- performance.
Is it true ?
The answer is very interesting : Very few stocks [14] are 
49%-51% to 51%-49%
[the equilibrium model is MERQ, equally distributed around the 
market for the test period, Feb2000 till now]
The index ^NDX itself is an underperformer [another proof that 
it is not carefully selected and weighted...]
and it was the 68% of the test period "below" its neutral 
value.
Explore for the n=1 last quotation with
 
// Outperforming OR Underperforming Stocks 
ExplorationValue=Foreign("~SUMRSI","C")/Foreign("~Count","V");WildPer = 
14;ExpPer = 2 * WildPer - 1;AUC = EMA( Max( C - Ref( C, -1 ), 0 ), ExpPer 
);ADC = EMA( Max( Ref( C, -1 ) - C, 0 ), ExpPer );x = (WildPer - 1) * ( 
ADC * Value / (100-Value) - AUC);RevEngRSI = IIf( x >= 0, C + x, C + x * 
(100-Value)/Value 
);Filter=1;AddColumn(100*Cum(C<=RevEngRSI)/Cum(IsTrue(RevEngRSI)),"underperformance 
%");AddColumn(100*Cum(C>RevEngRSI)/Cum(IsTrue(RevEngRSI)),"outperformance 
%");
 
For a quick IB view, paste also in a free window 
the
 
// Outperforming/Underperforming 
PeriodsValue=Foreign("~SUMRSI","C")/Foreign("~Count","V");WildPer = 
14;ExpPer = 2 * WildPer - 1;AUC = EMA( Max( C - Ref( C, -1 ), 0 ), ExpPer 
);ADC = EMA( Max( Ref( C, -1 ) - C, 0 ), ExpPer );x = (WildPer - 1) * ( 
ADC * Value / (100-Value) - AUC);RevEngRSI = IIf( x >= 0, C + x, C + x * 
(100-Value)/Value 
);Plot(1,"",(C<=RevEngRSI)*4+(C>RevEngRSI)*5,2);Plot(0,"",1,1);Title=Name()+" 
outperforms the market the "+
<FONT 
size=2>WriteVal(100*Cum(C>RevEngRSI)/Cum(IsTrue(RevEngRSI)),1.2)+
" % of the last 
"+WriteVal(Cum(Month()!=Ref(Month(),-1)),1.0)+" months";
 
to see the green [outperform]/red [underperform] ratio for the 
last 40 months.
 
I hope this analysis will help make your own upgrade/downgrade 
objective estimation
and avoid some "strange" [and suspect] 
presentations.
Dimitris Tsokakis
Ref: <A 
href="">http://groups.yahoo.com/group/amibroker/message/41412






Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.



Attachment:
OUT-under II.gif

Attachment: Description: "Description: GIF image"