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

[amibroker] Re: Scan vs Backtest



PureBytes Links

Trading Reference Links

Yes I do.  I provided my "Explore" results of 7/21, and "Backtest"
result of 7/24, which is the next trading day.

My plan is to buy stocks that had been signaled a day before, so
Backtester "seeing" the same thing as "Explore" is critical.
As I had said, I understand that the Backtester doesn't necessarily
take all siginaled positions due to constraints, but at least it needs
to "recognize" the same things as "Explore."

Regards,

intermilan04

--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> do you have delays in the settings? looks like you have 1 bar delays
setting
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
> 
> 
> On 25/07/06, intermilan04 <intermilan04@xxx> wrote:
> > Hi Graham,
> >
> > Thank you for your very prompt reply.
> > I am sorry if I'm mistaken, but my understanding was that the Detailed
> > Trade Log of below
> >
> > Entry signals(score):CXG=Buy(1.05648), NYNY=Buy(1.0541),
> > > TWMC=Buy(1.02888), SWFT=Buy(1.02825), FLOW=Buy(1.02709),
> > BCR=Buy(1.00364),
> >
> > contain all the raw trade signals that "Scan" would see, and Backtest
> > picks from the pool?
> >
> > What's happening to me is that the Backtester doesn't see the same
> > Entry signals as Scan.
> >
> > Regards,
> >
> > intermilan04
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@> wrote:
> > >
> > > Scan gives all raw trade signals
> > > Portfolio backtest gives actual trades allowable given the limits of
> > > Equity/Trade Size, MaxOpenPositions and any other
> > > settings/options/code specified that will affect the trades taken.
> > >
> > >
> > > --
> > > Cheers
> > > Graham
> > > AB-Write >< Professional AFL Writing Service
> > > Yes, I write AFL code to your requirements
> > > http://e-wire.net.au/~eb_kavan/ab_write.htm
> > >
> > >
> > > On 25/07/06, intermilan04 <intermilan04@> wrote:
> > > > Hi all,
> > > >
> > > > I think I have a case where the backtester does not "see" all
signals
> > > > which appear when I scan for signals.  Here are the details:
> > > >
> > > > OS: Windows XP
> > > > Amibroker: 4.80.2
> > > >
> > > > I have a long system with the following setup:
> > > >
> > > > SetOption("InitialEquity", 30000);
> > > > SetOption("AllowSameBarExit", True);
> > > > SetOption("ActivateStopsImmediately", True);
> > > > SetOption("CommissionMode", 2);
> > > > SetOption("CommissionAmount", 7);
> > > > SetTradeDelays(1, 1, 1, 1);
> > > > PosQty = 4;
> > > > SetOption("MaxOpenPositions", PosQty);
> > > > PositionSize = -100/PosQty;
> > > >
> > > > Here is the result of running "Explore" on 2006/7/21 with the
> > > > following setup, sorted by PositionScore:
> > > >
> > > > Filter = Buy;
> > > > AddColumn(PositionScore, "PositionScore", 1.4);
> > > >
> > > > Ticker  Date/Time       PositionScore
> > > > BTU     2006/7/21       1.0794
> > > > WFT     2006/7/21       1.0648
> > > > CXG     2006/7/21       1.0565
> > > > CNX     2006/7/21       1.0557
> > > > EXPD    2006/7/21       1.0554
> > > > VSH     2006/7/21       1.0543
> > > > NYNY    2006/7/21       1.0541
> > > > TSAI    2006/7/21       1.0465
> > > > CMG     2006/7/21       1.0356
> > > > TWMC    2006/7/21       1.0289
> > > > SWFT    2006/7/21       1.0282
> > > > ECOL    2006/7/21       1.0277
> > > > FLOW    2006/7/21       1.0271
> > > > TEN     2006/7/21       1.0171
> > > > PQ      2006/7/21       1.0168
> > > > SHFL    2006/7/21       1.0055
> > > > BCR     2006/7/21       1.0036
> > > > CNW     2006/7/21       1.0006
> > > >
> > > > I then backtested the system between 2006/1/1 to 2006/7/24. 
Here is
> > > > the result from 7/24:
> > > > 2006/07/24,
> > > > Entry signals(score):CXG=Buy(1.05648), NYNY=Buy(1.0541),
> > > > TWMC=Buy(1.02888), SWFT=Buy(1.02825), FLOW=Buy(1.02709),
> > BCR=Buy(1.00364),
> > > > Exit signals:CNW=Sell, ECOL=Sell,
> > > > Enter Long, CXG, Price: 24.6, Shares: 300, Commission: 7, Rank:
> > > > 1.05648, Equity 37812.5, Margin Loan: 0, Fx rate: 1
> > > > Enter Long, NYNY, Price: 5.4, Shares: 1700, Commission: 7, Rank:
> > > > 1.0541, Equity 37798.5, Margin Loan: 0, Fx rate: 1
> > > > Enter Long, TWMC, Price: 5.54, Shares: 1700, Commission: 7, Rank:
> > > > 1.02888, Equity 37784.5, Margin Loan: 0, Fx rate: 1
> > > > Exit Long, ECOL, Price: 21.33, (Avg. exit pr. 21.33), Shares: 400,
> > > > Commission: 7, (Total comm.: 14), Profit: -230 (-2.63 %), Entry
> > > > rank:1.05599, Equity: 37784.5, Fx rate: 1
> > > > 3 Open Positions: , CXG (+300), , NYNY (+1700), , TWMC (+1700),
> > > > Equity: 38836.5, Cash: 11827.5
> > > >
> > > > If you see the Entry signals(score) line, the Backtester clearly
> > > > missed BTU and WFT, which scored the highest PositionScore.  The
> > > > Backtester missed other signals too.  I am aware that
Backtester does
> > > > not always take position in what are being signaled, but it
seems to
> > > > me that the Backtester doesn't even see the same thing as
"Scan" or
> > > > "Explore."
> > > >
> > > > I am willing to disclose more codes if necessary to troubleshoot.
> > > > Any help regarding this matter is greatly appreciated.
> > > >
> > > > Regards,
> > > >
> > > > intermilan04
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 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 other support material please check also:
> > > > http://www.amibroker.com/support.html
> > > >
> > > >
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>