PureBytes Links
Trading Reference Links
|
Linda,
In addition to the 'tied buys' resolution question I posed for your
consideration, I am curious as to your thoughts on the following
scenario, which is not an AmiBroker coding problem per se, but is
more of a 'strategic' trading dilemma question:
First let's rename your two systems as System A and System B (rather
than #1 and #2). Unbeknown to you, since you're not 'privy' to the
future, and a crystal ball is not available, let's say that
the 'round turn' (buy 'entry' plus associated sell 'exit') trading
signals would produce a $2000 profit for System A and a $1000 profit
for System B. Let's further assume that the trade for System A
(gain=$2000) is 'open' for 10 days, but the System B trade
(gain=$1000) would be 'open' for 5 days. Let's finally postulate
that System B generates it's 'buy' signal on Day #0, but System A
generates IT'S 'buy' signal on Day #2 right in the 'middle' of System
B's 'open' position.... But,...
I assume that your 'paired' buy-sell conditions for each system
(relative to your original question of '2 systems in 1') create
a 'mutual exclusion' of simultaneous open positions for both systems,
so that if the first system 'triggers' before the second, the second
system has to 'wait' until the first system completes its trade, and
visa versa. In other words, BOTH systems have to be 'flat' before
ANY position can be opened by either one of the two systems.... So,...
For the System A/System B scenario described above, System
B 'triggered' first and will produce a profit of $1000, but System A
(whose profit would have been $2000) is 'inhibited' from a 'buy
entry' on Day #2 (because System B created the current open
position). So, now I get to the bottom-line philosophical
(or, 'policy') question: What do you do about System A's 'inhibited'
trade at the time System B exits, 3 days into System A's 'virtual'
position IF IT COULD HAVE BEEN TAKEN? There will be (although, still
UNKNOWN to you) 7 days left for System A to POSSIBLY make (or loss)
SOME equity (since you don't really know WHERE the trend will end).
Had you 'skipped' System B's 'buy' trigger, and waited a couple of
days, System A would have triggered the 'buy' and the ITS trade would
have produced $2000 (instead of the $1000 that System B produced).
Interesting dilemma, huh? (;->) Which leads to my final curious
question regarding this whole affair.......
Does it REALLY make sense to try to 'combine' two different systems
into ONE backtest strategy, or is it better to separate the two
systems and test them INDEPENDENTLY on your chosen vehicle(s)? Then
you could decide which one might be preferable to use, OR you could
allocate 'sub-portions' of your capital to INDEPENDENTLY (as a form
of diversification) trade each of the two different systems.
Something to think about...... (;->)
Buzz
-----------------
--- In amibroker@xxxxxxxxxxxxxxx, "Herman van den Bergen"
<psytek@xxxx> wrote:
> You can cascade as many systems as you like. For the first system
you use
> Buy1, Sell1, etc. for the second you use Buy2, Sell2, etc.
>
> At the very end of your code you can then combine these signals to
create
> the final BUY, SELL, etc. For example:
>
> Buy = Buy1 AND Buy2;
> Sell = Sell1 OR Sell2;
>
> If you cascade several systems you may want to write optimizing
code to step
> systematically through all combinations of the signals, along the
line of:
>
> M = Optimize("S",0,0,3,1);
> if(M==0)
> {
> BUY = Buy1 AND Buy2;
> SELL = Sell1 OR Sell2;
> }
> if(M==1)
> {
> BUY = Buy1 and NOT Buy2;
> Sell = Sell2;
> }
>
> .... there are better ways to exhaustively test all combinations...
>
> herman.
> -----Original Message-----
> From: Linda Wilmarth [mailto:smart@x...]
> Sent: Tuesday, June 22, 2004 2:26 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Two systems in One
>
>
> I want to combine two systems I have into one BackTest.
>
> The first is to buy if Cond1B is true and sell if Cond1S is true.
>
> The second is to buy if Cond2B is true and sell if Cond2S is true.
>
> Now, I want to buy if either are true:
>
> Buy = Cond1B OR Cond1S;
>
> Then, if I bought because of Cond1B, I only want to test for
Cond1S for
> selling, and if I bought because of Cond2B, then I only want to
test Cond1S.
>
> How can I accomplish this?
>
> Linda
>
>
> 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.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|