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

[amibroker] Need help setting up back test settings



PureBytes Links

Trading Reference Links


I have a program, for loop, that can have two outstanding trades. I 
will take one trade when the market moves up or down 4% and another 
trade when the market moves in the same direction another 5%. Then I 
close both traces when the market rolls over 4% and at the same time 
take one position in this new trend.

My problem is that when I run back test the trades at the 5% point 
are not recorded, or the trades sheet does not show them. How can I 
set the back test settings to show all trades? Currently the 
settings are set as follows:

Initial Equity: 5000  Periodicity/Positions: Weekly/Long Short 
Commissions: 7.00 per trade  Annual interest rate: 0.00% 
Range: 1/1/1994 00:00:00 - 10/31/1998  Apply to: Current Symbol 
Margin requirement: 99.999  Futures mode: No 
Def. round lot size: 1  Def. Tick Size 0 
Drawdowns based on: Open prices      
Long trades 
Buy price: Close  Sell price: Close 
Buy delay: 0  Sell delay: 0 
Short trades 
Short price: Close  Cover price: Close 
Short delay: 0  Cover delay: 0 
Stops 
Maximum loss: disabled  Profit target: disabled 
Value: 2.00  Value: 10.00 
Exit at stop? yes  Exit at stop? yes 
  
Trailing stop: disabled      
Value: 10.00      
Exit at stop? yes      

This is the trade list:
Trade list Ticker Trade Entry Exit % change Profit Shares Pos. value 
Cum. profit # bars Profit/bar MAE/MFE 
^RUT Short (121) 3/31/1994
251.06 8/19/1994
249.69 -0.55% 12.03
0.25% 19 4770.14 12.03 21 0.57 -6.14%
5.11% 

^RUT Long (121) 8/19/1994
249.69 11/11/1994
249.38 -0.12% -20.20
-0.40% 20 4993.80 -8.17 13 -1.55 -1.08%
4.25% 

^RUT Short (116) 11/11/1994
249.38 12/23/1994
244.73 -1.86% 74.35
1.57% 19 4738.22 66.18 7 10.62 -1.65%
6.21% 

^RUT Long (45) 12/23/1994
244.73 10/6/1995
301.82 23.33% 1127.80
23.04% 20 4894.60 1193.98 42 26.85 -1.96%
29.52% 

^RUT Short (53) 10/6/1995
301.82 12/1/1995
309.74 2.62% -172.40
-2.86% 20 6036.40 1021.58 9 -19.16 -2.84%
3.50% 

But the program has trades as follows: ( this is actually the excel 
output of a C++ program I am trying to dupliate in AB. But the AB 
program also shows the folowing trades on the explore sheet.)  
Date            Position Ticker Gain
19940331	Sell	250.98	0.549845
19940819	Buy	249.6	-0.180288
19941111	Sell	249.15		0
19941209	Sell	235.09	-2.18598
19941223	Buy	244.56		0
19950303	Buy	256.83	41.33
19951006	Sell	302.32	-2.54035
 
As you can see there are 2 sells in a row followed by 2 buys in a 
row. But the Trades sheet does not show the second trade of the same 
type, i.e. it does not show the trade for 12/9/94 or 3/3/95. What do 
I need to do to have these trades added to the output?

I was not sure about the margin setting. The progran takes 100% of 
the portfolio on the first trade and then 100% margin on the second 
trade. So I set the margin to 99.999%.

Since I am trading right after the close I used 0 delay.

What am I doing wrong? Why won't the back test show all trades?

Thanks,
Barry 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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