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

RE: [amibroker] Re: How to get backtest results with buy and sell delay to show in results?



PureBytes Links

Trading Reference Links

Hi,
 
what about using the exploration function to show the trades for the next day?
 
I have a similar setup and I set it up as follows:
 
set the delays from the backtester to 0. Instead of using the delays use buy = ref(buycondition,-1)
 
so the code looks somethink like:
 
buycondition = [your buy condition];
 
buy = ref(buycondition,-1);  // since the delay is 0, this will cause the backtester to buy on "yesterday's" signal.
 
...exploration code here ....
filter = buycondition; // the filter is actually giving you tomorrow's buys
 
Claude
 

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of spammernator
Sent: Wednesday, April 20, 2005 17:11
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: How to get backtest results with buy and sell delay to show in results?


Thanks for the tip.  Couldn't get it to work though.

I just reread the original question and thought it was a little
confusing. I should clarify my statement and the problem to this:

Basically I'm trying to use end of day data to determine a trade on
open the next morning.  The AFL is set up to give best backtest
results on a one day delay on the buy and sell. 

But even though I optimized the AFL to adapt for the delay in buying
and selling, I can't see the actual buy and sell in the results
window until after the end of day data is run. Then the results
window shows the stock should have already purchased or sold earlier
at the morning open for that same day. This causes me to miss part of
the move of the stock on purchase or sell too late.

The data that has triggered a trade is already in the system so there
shouldn't be a problem getting it to show in the results column after
running the EOD data for execution the next morning. I just don't
know how to make it happen.

Once again, I'd appreciate any more feedback/help.


--- In amibroker@xxxxxxxxxxxxxxx, "qweds_560" <qweds_560@xxxx> wrote:
>
> Not 100% about this, but try:
>
> SetOption("PriceBoundChecking",False);
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "spammernator" <atalan007@xxxx>
> wrote:
> >
> >
> > I've set up an afl that trades using end of day data with both a
> buy
> > and sell delay of several days to trade on the open several days
> > after
> > the buy or sell is triggered.
> >
> > Problem is the stock doesn't show up in the results window until
> it
> > should have already been traded a few mornings before.
> >
> > I realize I can just set the buy and sell delay back to zero and
> keep
> > track of the trade days manually, but I'm hoping the software has
a
> > way
> > to do this automatically or at least a work around or a line of
> code.
> >
> > Sorry if this has an obvious answer but I don't see it.  Yes I've
> > gone
> > thru the manual several times, done searches on the web sites,
etc.
> >
> > Any help is appreciated.





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





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