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

RE: [amibroker] A different type of Equity analysis



PureBytes Links

Trading Reference Links


<FONT face=Verdana color=#800000 
size=2>Great idea !
To 
get mean and standard deviation for 100 stocks, try:
<FONT face=Verdana color=#800000 
size=2> 
<FONT face=Verdana color=#800000 
size=2>Eq = Foreign("Equity","Open"); 
N = 
100; //Number of stocks
<FONT face=Verdana color=#800000 
size=2>Average = lastvalue(sum(Eq,N)/N); //Average return per 
stock
Stdv 
= lastvalue((sum((Eq-Average)^2),N)/N)^0.5);//Standard deviation of return per 
stock
<FONT face=Verdana color=#800000 
size=2>Title = "Equity barchart for N100 stockx - Average = " +writeval(Average) 
+"Standard deviation= " + writeval(Stdv);
<FONT face=Verdana color=#800000 
size=2> 
<FONT face=Verdana color=#800000 
size=2>Sorry, I have no time to test it today. Hope it 
works.
<FONT face=Verdana color=#800000 
size=2> 
<FONT face=Verdana color=#800000 
size=2>Waz
<FONT face=Verdana color=#800000 
size=2> 
<FONT face=Verdana color=#800000 
size=2> 

<FONT face=Tahoma 
size=2>-----Original Message-----From: Herman van den Bergen 
[mailto:psytek@xxxx]Sent: mardi 30 avril 2002 
16:50To: AmiBrokerSubject: [amibroker] A different type 
of Equity analysisA while back there was talk about 
rating trading systems. I have always beenof the opinion that if a system 
works on many stocks this is a measure ofrobustness. Not everybody agrees 
with this and I agree that greater profitscan be made by optimizing 
systems for particular stocks however I believethat this extra gain is 
paid for with extra risk.While discussions centered around the 
analysis of composite equities I don'trecall anybody talking about 
analyzing the equity distribution forindividual stocks for a certain 
category. As a first step in doing this youcan save the individual 
equities in a composite array for later recall andanalysis. Or to display 
a bar chart of the individual equities (See attachedexample ran on the 
N100 stocks). You can use this Scan to save the"individual" equities in a 
composite:// =======Scan to save Equities in 
array===========////     place your Buy/Sell rules 
here...//V1 = LastValue(Equity());Addr = 
LastValue(Cum(1))-Status("StockNum");V2 = IIf(Addr == 
Cum(1),V1,0);AddToComposite(V2,"_Equity","X",3);To display a 
barchart for this data use this indicator:// =====Indicator to display 
Equities============Plot(Foreign("_Equity","Open"),"",4,2+4);Title = " 
Equity Bar Chart for N100 stocks ";GraphXSpace = 5;Note that this 
chart is located at the most recent part of the X-axis. Sinceit covers 
only 100 bars (for the N100) you may have to zoom in to see thechart.Also 
note that equities are displayed in order of their StockNum;StockNum "1" 
is in the most recent bar.Perhaps somebody with stats expertise can 
suggest a way to calculate theMean, StDev, etc. for the equities. This 
could be used as a measure ofrobustness.Best 
regards,Herman.Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.