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

[amibroker] Re: PairTrading on Amibroker



PureBytes Links

Trading Reference Links

Hi Angelo,

I have followed Tomasz's instructions and created a code sample based
on it, and I get results pretty much just like your picture. So now I
know of two ways to do this:

1. Create a composite and backtest on it. Pro's include exact numbers
for your entry and exit basis, and all statistics/drawdowns follow
this composite. Con is that it is difficult to express the exact
meaning of this basis in $ value because it shifts around based on
which contract moved, but the general result should at least show if
your strategy is working correctly. And I think this can be solved
with a little more thinking too.

2. Create a watchlist of the symbols that would form the composite in
A and backtest on them. This method is the one Tomasz suggested, and
it makes for some simple code, but as you said, the statistics are
off. For one thing, the highest % profit per trade is not the highest
% trade in A nor the one in B but the highest % of the spread, which I
believe is what you or I are more interested in, but unfortunately the
statistics currently don't support this 'pair' position.

As I see it, there are a pro's and cons to either method, and for now
I think I still need to stick with the composite calculation, because
at least I don't need to do all the re-do statistics myself :)


--- In amibroker@xxxxxxxxxxxxxxx, "ang_60" <ima_cons@xxx> wrote:
>
> 
> Hello,
> 
> for more clarification, please see a JPEG of an AA results of a pair
> trading strategy, stored in http://www.savefile.com/files/1989358.
> 
> My problem is to let Amibroker know that trades in this example are
> not six but just three.
> 
> And ? for example ? as for the first two lines: I don't have a trade1
> losing 2,70% and trade2 gaining 3,50%  BUT just ONE SINGLE trade
> gaining 0.80%.
> 
> For Jan: I see the logic of your solution, but ? seems to me ? you are
> losing all the statistic expressed in dollar value (Total profit,
> drawdown? )? 
> Unfortunately, ? as of today ? my only idea would be to export the
> trade list to Excel and manipulate the data there (but quite frankly,
> I'd have to manipulate them by hand?. because being a trader and not a
> programmer I'm not so sure on my ability to write the correct routine
> using VBA? so this is not the ultimate solution neither).
>



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/