Hi, I was thinking you could have a system using rotational trading which trades pairs with highest absolute value of correlation (score=abs(correlate(a,b)) and then calculate the coefficients of the pair using the linear fitting function y=a x+ b which comes with AB. One way to do it it would be to create a ticker for each pair correlation so you can rank them at each bar, or send data to an external statistical software to calculate the correlation matrix and extract the highest absolute value entries.
Backtesting at portfolio level a list of symbols would allow you to automatically identify best pairs and coefficients bar by bar. High linear correlation imply a relation like y=a x+b but from a rigorous statistical point of view I am not sure it is really equivalent to co-integration test,and in any case it just works for pair and not for n symbols cointegration, so the best way to identify pair or n-vectors would still be to run some real co-integration test. Merci Ly --- In [email protected], "ang_60" <ima_c...@...> 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). >
