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

[amibroker] Rotational Backtester entering & exiting trades on the same day



PureBytes Links

Trading Reference Links

 When I run the backtester, it seems to be entering and exiting on the same day. What is wrong with my settings?

Thanks

Mohan

Report:

Date	Information										
1/3/2005											
	Scores:FX5=9995.25	 SPY=9991.38	 QQQQ=9990.54	 XLE=9968.17	 ILF=9963.1	 FXI=0	 				
	Enter Long	 FX5	 Price: 277.7	 Shares: 90.0252	 Commission: 0	 Rank: 9995.25	 Equity 100000	 Margin Loan: 0	 Fx rate: 1		
	Enter Long	 SPY	 Price: 120.3	 Shares: 207.814	 Commission: 0	 Rank: 9991.38	 Equity 100000	 Margin Loan: 0	 Fx rate: 1		
	Enter Long	 QQQQ	 Price: 39.5	 Shares: 632.911	 Commission: 0	 Rank: 9990.54	 Equity 100000	 Margin Loan: 0	 Fx rate: 1		
	Enter Long	 XLE	 Price: 34.98	 Shares: 714.694	 Commission: 0	 Rank: 9968.17	 Equity 100000	 Margin Loan: 0	 Fx rate: 1		
	Exit Long	 FX5	 Price: 277.7	 (Avg. exit pr. 277.7)	 Shares: 90.0252	 Commission: 0	 (Total comm.: 0)	 Profit: 0 (0.00 %)	 Entry rank:9995.25	 Equity: 100000	 Fx rate: 1
	Exit Long	 SPY	 Price: 120.3	 (Avg. exit pr. 120.3)	 Shares: 207.814	 Commission: 0	 (Total comm.: 0)	 Profit: 0 (0.00 %)	 Entry rank:9991.38	 Equity: 100000	 Fx rate: 1
	Exit Long	 QQQQ	 Price: 39.5	 (Avg. exit pr. 39.5)	 Shares: 632.911	 Commission: 0	 (Total comm.: 0)	 Profit: 0 (0.00 %)	 Entry rank:9990.54	 Equity: 100000	 Fx rate: 1
	Exit Long	 XLE	 Price: 34.98	 (Avg. exit pr. 34.98)	 Shares: 714.694	 Commission: 0	 (Total comm.: 0)	 Profit: 0 (0.00 %)	 Entry rank:9968.17	 Equity: 100000	 Fx rate: 1
	0 Open Positions: 	 Equity: 100000	 Cash: 100000								


The afl code is what is included with AB installation:

// Simple example of rotational trading system
// This is contrarian strategy - 
// it buys 4 "worst" stocks - the ones that suffered the most in last year
// (4 stocks having worst 252-bar rate-of-change)
// 
// 4 positions
MaxPositions = 4;
SetOption("MaxOpenPositions", MaxPositions  );
SetOption("WorstRankHeld", MaxPositions + 2 );
SetPositionSize( 100 / MaxPositions, spsPercentOfEquity ); 

// trade on next day open
SetTradeDelays( 1, 1, 1, 1 );
BuyPrice = Open;

SetBacktestMode( backtestRotational );

// offsetting by large positive number 
// makes sure that our score is always positive and we don't enter short trades
PositionScore = 10000 - ROC( C, 252 ); 



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/
 
--- Begin Message ---

Microsoft Visual C++ 6.0 SP6 for 32 bit version and Visual C++ 2005 for 64 bit version.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "pierre8rou" <pierre8r@xxxxxxcom>
To: <amibroker@xxxxxxxxxps.com>
Sent: Friday, January 04, 2008 11:27 AM
Subject: [amibroker] Hello Tomasz, Which C++ compiler do you use to compile AmiBroker ?

> Hello Tomasz,
>
> Which C++ compiler do you use to compile AmiBroker ?
>
> Thanks,
>
> Tintin92
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
>
>
>
>
>


--- End Message ---