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

Re: [amibroker] Re: Backtesting assumption



PureBytes Links

Trading Reference Links

in my opinion if your stoploss is about the same as your profit stop (in magnitude) you have a problem using EOD data only. Then you need intraday.  To be able to do accurate backtests using EOD data you could for instance make the stoploss large with respect to the profitstop. Then the number of winning trades will increase but the losers will be large. In this setup it is very unlikely that the profitStop and the stoploss will occur within the same bar.  Although the losers are large the system might work.
 
But there are more scenarios one may think of to exit a trade, for instance like you were planning already by looking at yesterdays high. If you do not reach yesterdays high today maybe tomorrow you reach todays high and you could exit there. However, I use loops for these kind of exit points and not the regular Applystop function.
 
ed
 
----- Original Message -----
Sent: Monday, September 20, 2004 8:28 PM
Subject: [amibroker] Re: Backtesting assumption

Hi Ed,

Thanks for your message, it was really helpful.

You said "However I can advise to avoid the situation completely.
Because what good is such a backtest if you can not really be certain
that you simulate reality?"

This is so true. It does not matter if the assumption is mine or of
Amibroker, it would be an assumption not reality. But How to avoid
this situation the only way I can see is to use Amibroker
professional version with tick data. Can you think of any other way
out?

Best regards

Rizwan



--- In amibroker@xxxxxxxxxxxxxxx, "ed nl" <ed2000nl@xxxx> wrote:
> hi,
>
> like I said the help file for ApplyStop explains this:
>
>
> If two or more different stops are triggered on the VERY SAME bar
then they are evaluated in this fixed order:
>
> Fixed Ruin stop (loosing 99.96% of the starting capital)
> Max. loss stop
> Profit target stop
> Trailing stop
> N-bar stop
>
>
> problem is that if you use EOD data you can not tell if the profit
stop is hit first or not. So if you use Applystop then it triggers
the stoploss before the profit stop. However, you could write your
own ApplyStop routine using AFL where you use for, if, else etc
statements. Then you can tell exactly what you want the priority to
be.
>
> However I can advise to avoid the situation completely. Because
what good is such a backtest if you can not really be certain that
you simulate reality?
>
> rgds, Ed
>
>
>
>   ----- Original Message -----
>   From: rizwankherati
>   To: amibroker@xxxxxxxxxxxxxxx
>   Sent: Monday, September 20, 2004 6:11 PM
>   Subject: [amibroker] Re: Backtesting assumption
>
>
>   Hi,
>
>   Thanks for your message, I wish someone could explain this a bit
>   further for me.
>
>   If I am using bar data(Open,High,Low,Close)and my stop is where
the
>   low the bar is and my profit target is at the high of the bar.
Will
>   the system show this as a profitable trade(As high comes first
and I
>   would have exited at the high when my profit target was met) or a
>   loosing trade(Assuming low would have come first and I would have
>   been stopped out at low).
>
>   Best regards
>
>   Rizwan
>
>
>
>
>   --- In amibroker@xxxxxxxxxxxxxxx, "ed nl" <ed2000nl@xxxx> wrote:
>   > i think Amibroker makes no assumptions at all when one can not
tell
>   what the sequence of events was (having EOD info only). But in
>   ApplyStop there is a fixed order of events (see online help of
>   ApplyStop). Also one may set the N-bar stop to have priority (see
>   backtester settings, Stops).
>   >
>   > ed
>   >   ----- Original Message -----
>   >   From: rizwankherati
>   >   To: amibroker@xxxxxxxxxxxxxxx
>   >   Sent: Monday, September 20, 2004 12:17 PM
>   >   Subject: [amibroker] Backtesting assumption
>   >
>   >
>   >   What are the assumptions Amibroker uses within price bars. So
>   does
>   >   price open, make a high, make a low, and then close lower. Or
>   does it
>   >   open, make a low, make a high, and then close lower.
>   >
>   >   Best regards
>   >
>   >   Rizwan
>   >
>   >
>   >
>   >
>   >   Check AmiBroker web page at:
>   >   http://www.amibroker.com/
>   >
>   >   Check group FAQ at:
>   http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>   >
>   >
>   >         Yahoo! Groups Sponsor
>   >               ADVERTISEMENT
>   >             
>   >       
>   >       
>   >
>   >
>   > ----------------------------------------------------------------
----
>   ----------
>   >   Yahoo! Groups Links
>   >
>   >     a.. To visit your group on the web, go to:
>   >     http://groups.yahoo.com/group/amibroker/
>   >      
>   >     b.. To unsubscribe from this group, send an email to:
>   >     amibroker-unsubscribe@xxxxxxxxxxxxxxx
>   >      
>   >     c.. Your use of Yahoo! Groups is subject to the Yahoo!
Terms of
>   Service.
>   >
>   >
>   >
>   > [Non-text portions of this message have been removed]
>
>
>
>   Check AmiBroker web page at:
>   http://www.amibroker.com/
>
>   Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
>
>         Yahoo! Groups Sponsor
>               ADVERTISEMENT
>             
>       
>       
>
>
> --------------------------------------------------------------------
----------
>   Yahoo! Groups Links
>
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/amibroker/
>      
>     b.. To unsubscribe from this group, send an email to:
>     amibroker-unsubscribe@xxxxxxxxxxxxxxx
>      
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.



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

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html





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

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links