PureBytes Links
Trading Reference Links
|
I hope your note generates a fruitful discussion, hopefully on the group list instead of offline.
Cordially,
Richard
----- Original Message -----
From: Dimitris Tsokakis
To: amibroker@xxxxxxxxxxxxxxx
Sent: Monday, July 29, 2002 4:41 AM
Subject: [amibroker] Tranformations
Suppose you trade INTC with a Stochastic CCI [6,12,70] system.
The total % net profit, after 18trades/12 winners/6losers is -15.85%
See INTC1.gif
[buy,sell,short,cover at open, delay +1, commission 0.5%, all stops disabled] with the use of the code:
/*Smoothed Stochastic CCI*/
P =6;D=DateNum()>1000301;
Blevel =Optimize("BL",12,10,20,1);Slevel = Optimize("SL",70,70,90,1);
StOcci=100*(CCI(6)-LLV(CCI(6),14))/(HHV(CCI(6),14)-LLV(CCI(6),14));
stocci=MA(stocci,5);
Buy=Cross(STOCCI,BLEVEL);Sell= Cross(STOCCI, Slevel);
Buy=D*(Buy);Sell=D*Sell;Short = Sell;Cover = Buy;
Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
E1=Equity();EM40=MA(E1,40);
XB=Flip(Buy,Sell);XS=Flip(Sell,Buy);
XSH=2*Flip(Short,Cover);XCO=2*Flip(Cover,Short);
XBSH=(XB+XSH);
XSXCO=(XS+XCO);
ASC=Cross(E1,EM40);DESC=Cross(EM40,E1);
// Buy=ASC*(XBSH==1);Sell=DESC*(XSXCO==1);Short=ASC*(XBSH==2);Cover=DESC*(XSXCO==2);
Do you want to transform the -15.85% to a +126% somehow automatically ?
Simply delete the // from the last line !!
6trades/5winners/1loser and thatīs it.
See INTC2.gif
Dimitris Tsokakis
PS1. Any volunteers to improve this method and reach its final form with a co-operative work ??
We may create a method belonging to this excellent list.
This is my ambition. I know what to do for myself. With or, sometimes, without strict coding.
PS2. The above combination [6,12,70] is just for the example
PS3. Some other examples
CSCO from +39% to +364%
MSFT from -11% to +87%
QQQ from +158% to +328%
but
ORCL from +36% to +9% etc. etc
Yahoo! Groups Sponsor
ADVERTISEMENT
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
------=_NextPart_001_01CC_01C236DD.73E38C80
Content-Type: text/html;
charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-7">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Very interesting, Dimitris. I am unable to
duplicate your results, although the behavior is maintained, because I don't
believe you included the date range and perhaps other minor parameters. If
you would attach the html report, it would have those data included and provide
a convenient format for communicating systems, more convenient, in my opinion,
than the gifs which cannot be imported into, say, a spreadsheet. (I have
attached such a report as an example.)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I hope your note generates a fruitful discussion,
hopefully on the group list instead of offline.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cordially,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Richard</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=TSOKAKIS@xxxx href="mailto:TSOKAKIS@xxxx">Dimitris
Tsokakis</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=amibroker@xxxxxxxxxx
href="mailto:amibroker@xxxxxxxxxxxxxxx">amibroker@xxxxxxxxxxxxxxx</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, July 29, 2002 4:41 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [amibroker] Tranformations</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>Suppose you trade INTC with a Stochastic CCI [6,12,70]
system.<BR>The total % net profit, after 18trades/12 winners/6losers is
-15.85%<BR>See INTC1.gif<BR>[buy,sell,short,cover at open, delay +1,
commission 0.5%, all stops disabled] with the use of the code:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>/*Smoothed Stochastic CCI*/<BR>P
=6;D=DateNum()>1000301;<BR>Blevel =Optimize("BL",12,10,20,1);Slevel =
Optimize("SL",70,70,90,1);<BR>StOcci=100*(CCI(6)-LLV(CCI(6),14))/(HHV(CCI(6),14)-LLV(CCI(6),14));<BR>stocci=MA(stocci,5);<BR>Buy=Cross(STOCCI,BLEVEL);Sell=
Cross(STOCCI, Slevel); <BR>Buy=D*(Buy);Sell=D*Sell;Short = Sell;Cover =
Buy;<BR>Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);<BR>Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);<BR>E1=Equity();EM40=MA(E1,40);<BR>XB=Flip(Buy,Sell);XS=Flip(Sell,Buy);<BR>XSH=2*Flip(Short,Cover);XCO=2*Flip(Cover,Short);<BR>XBSH=(XB+XSH);<BR>XSXCO=(XS+XCO);<BR>ASC=Cross(E1,EM40);DESC=Cross(EM40,E1);</FONT></DIV>
<DIV><FONT size=2>//
Buy=ASC*(XBSH==1);Sell=DESC*(XSXCO==1);Short=ASC*(XBSH==2);Cover=DESC*(XSXCO==2);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Do you want to transform the -15.85% to a +126% somehow
automatically ?<BR>Simply delete the // from the last line
!!<BR>6trades/5winners/1loser and thatīs it.</FONT></DIV>
<DIV><FONT size=2>See INTC2.gif<BR>Dimitris Tsokakis<BR>PS1. Any volunteers to
improve this method and reach its final form with a co-operative work
??</FONT></DIV>
<DIV><FONT size=2>We may create a method belonging to this excellent
list.</FONT></DIV>
<DIV><FONT size=2>This is my ambition.</FONT><FONT size=2> I know what to
do for myself. With or, sometimes, without strict coding.</FONT></DIV>
<DIV><FONT size=2>PS2. The above combination [6,12,70] is just for the
example</FONT></DIV>
<DIV><FONT size=2>PS3. Some other examples</FONT></DIV>
<DIV><FONT size=2>CSCO from +39% to +364%</FONT></DIV>
<DIV><FONT size=2>MSFT from -11% to +87%</FONT></DIV>
<DIV><FONT size=2>QQQ from +158% to +328%</FONT></DIV>
<DIV><FONT size=2>but</FONT></DIV>
<DIV><FONT size=2>ORCL from +36% to +9% etc. etc </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2><BR> </FONT></DIV><BR><BR><TT>Your
use of Yahoo! Groups is subject to the <A
href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of Service</A>.</TT>
<BR></BLOCKQUOTE></BODY></HTML>
------=_NextPart_001_01CC_01C236DD.73E38C80--
Title: AmiBroker System Test Report
Settings
Initial Equity:
10000
Periodicity/Positions:
Daily/Long Short
Commissions:
0.00 %
Annual interest rate:
0.00%
Range:
1/1/2000 - 7/29/2002
Apply to:
Current Symbol
Long trades
Buy price:
Open
Sell price:
Open
Buy delay:
1
Sell delay:
1
Short trades
Short price:
Open
Cover price:
Open
Short delay:
1
Cover delay:
1
Stops
Maximum loss:
disabled
Profit target:
disabled
Value:
40.00
Value:
10.00
Exit at stop?
yes
Exit at stop?
no
Trailing stop:
disabled
Value:
7.00
Exit at stop?
no
Formula/*Smoothed Stochastic CCI*/
P =6;D=DateNum()>1000301;
Blevel =Optimize("BL",12,10,20,1);Slevel = Optimize("SL",70,70,90,1);
StOcci=100*(CCI(6)-LLV(CCI(6),14))/(HHV(CCI(6),14)-LLV(CCI(6),14));
stocci=MA(stocci,5);
Buy=Cross(STOCCI,BLEVEL);Sell= Cross(STOCCI, Slevel);
Buy=D*(Buy);Sell=D*Sell;Short = Sell;Cover = Buy;
Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
E1=Equity();EM40=MA(E1,40);
XB=Flip(Buy,Sell);XS=Flip(Sell,Buy);
XSH=2*Flip(Short,Cover);XCO=2*Flip(Cover,Short);
XBSH=(XB+XSH);
XSXCO=(XS+XCO);
ASC=Cross(E1,EM40);DESC=Cross(EM40,E1);
// Buy=ASC*(XBSH==1);Sell=DESC*(XSXCO==1);Short=ASC*(XBSH==2);Cover=DESC*(XSXCO==2);
Overall performance summary
Total net profit:
-319.20
Total commissions paid:
0.00
Return on account:
-3.19 %
Open position gain/loss
733.96
Buy&Hold profit:
-5752.95
Bars (avg. days) in test:
643 (936)
Buy&Hold % return:
-57.53%
System to Buy&Hold index:
94.45%
Annual system % return:
-1.26%
Annual B&H % return:
-28.39%
System drawdown:
-5059.02
B&H drawdown:
-6094.06
Max. system drawdown:
-18621.16
B&H max. drawdown:
-14305.56
Max. system % drawdown:
-92.75%
B&H max. % drawdown:
-78.55%
Max. trade drawdown:
-18621.16
Max. trade % drawdown:
-92.75%
Trade drawdown:
-16878.25
Total number of trades:
18
Percent profitable:
61.1%
Number winning trades:
11
Number losing trades:
7
Profit of winners:
17744.54
Loss of losers:
-18797.69
Total # of bars in winners:
393
Total # of bars in losers:
210
Commissions paid in winners:
0.00
Commissions paid in losers:
0.00
Largest winning trade:
4792.35
Largest losing trade:
-12767.62
# of bars in largest winner:
80
# bars in largest loser:
82
Commission paid in largest winner:
0.00
Commission paid in largest loser:
0.00
Average winning trade:
1613.14
Average losing trade:
-2685.38
Avg. # of bars in winners:
35.7
Avg. # bars in losers:
30.0
Avg. commission paid in winner:
0.00
Avg. commission paid in loser:
0.00
Max consec. winners:
5
Max consec. losers:
3
Bars out of the market:
51
Interest earned:
0.00
Exposure:
92.1%
Risk adjusted ann. return:
-1.37%
Ratio avg win/avg loss:
0.60
Avg. trade (win & loss):
-58.51
Profit factor:
0.94
Performance for INTC
Total net profit:
-319.20
Total commissions paid:
0.00
Return on account:
-3.19 %
Open position gain/loss
733.96
Buy&Hold profit:
-5752.95
Bars (days) in test:
643 (936)
Buy&Hold % return:
-57.53%
System to Buy&Hold index:
94.45%
Annual system % return:
-1.26%
Annual B&H % return:
-28.39%
System drawdown:
-5059.02
B&H drawdown:
-6094.06
Max. system drawdown:
-18621.16
B&H max. drawdown:
-14305.56
Max. system % drawdown:
-92.75%
B&H max. % drawdown:
-78.55%
Max. trade drawdown:
-18621.16
Max. trade % drawdown:
-92.75%
Trade drawdown:
-16878.25
Total number of trades:
18
Percent profitable:
61.1%
Number winning trades:
11
Number losing trades:
7
Profit of winners:
17744.54
Loss of losers:
-18797.69
Total # of bars in winners:
393
Total # of bars in losers:
210
Commissions paid in winners:
0.00
Commissions paid in losers:
0.00
Largest winning trade:
4792.35
Largest losing trade:
-12767.62
# of bars in largest winner:
80
# bars in largest loser:
82
Commission paid in largest winner:
0.00
Commission paid in largest loser:
0.00
Average winning trade:
1613.14
Average losing trade:
-2685.38
Avg. # of bars in winners:
35.7
Avg. # bars in losers:
30.0
Avg. commission paid in winner:
0.00
Avg. commission paid in loser:
0.00
Max consec. winners:
5
Max consec. losers:
3
Bars out of the market:
51
Interest earned:
0.00
Exposure:
92.1%
Risk adjusted ann. return:
-1.37%
Ratio avg win/avg loss:
0.60
Avg. trade (win & loss):
-58.51
Profit factor:
0.94
Trade list for INTC
Trade
Entry date
Entry price
Exit date
Exit price
Net Profit
Equity value
Short
3/16/2000
61.63
4/5/2000
64.94
-537.53
9462.47
Long
4/5/2000
64.94
5/2/2000
62.94
-291.43
9171.04
Short
5/2/2000
62.94
7/5/2000
66.56
-528.22
8642.82
Long
7/5/2000
66.56
7/13/2000
70.19
470.69
9113.51
Short
7/13/2000
70.19
8/2/2000
65.25
641.11
9754.62
Long
8/2/2000
65.25
8/14/2000
64.44
-121.47
9633.15
Short
8/14/2000
64.44
11/15/2000
41.69
3401.04
13034.19
Long
11/15/2000
41.69
11/22/2000
42.25
175.87
13210.06
Short
11/22/2000
42.25
5/17/2001
28.77
4213.64
17423.70
Long
5/17/2001
28.77
5/23/2001
29.37
359.54
17783.24
Short
5/23/2001
29.37
9/20/2001
21.45
4792.35
22575.59
Long
9/20/2001
21.45
9/28/2001
20.73
-756.36
21819.23
Short
9/28/2001
20.73
1/25/2002
32.87
-12767.62
9051.61
Long
1/25/2002
32.87
1/31/2002
34.61
479.80
9531.41
Short
1/31/2002
34.61
5/2/2002
28.51
1680.37
11211.78
Long
5/2/2002
28.51
5/14/2002
29.91
553.06
11764.84
Short
5/14/2002
29.91
6/3/2002
27.43
977.07
12741.91
Long
6/3/2002
27.43
7/18/2002
19.26
-3795.06
8946.85
Open Short
7/18/2002
19.26
7/26/2002
17.68
733.96
9680.80
|