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 );
--- 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" <[EMAIL PROTECTED]com >
To: <[EMAIL PROTECTED]ps.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 ---
