Use Foreign to get at the price data of the other symbol, then just Plot.
opposite = Foreign("AA", "close");
relation = Correlation(Close, opposite, 10);
Plot(Close, "Price", colorGreen);
Plot(opposite, "Opposite", colorBlue, styleLeftAxisScale);
Plot(relation, "Correlation", IIF(relation > 0, colorGreen, colorRed),
styleOwnScale);
Mike
--- In [email protected], "graphman27" <st...@...> wrote:
>
> I think you are probably right, which is quite disappointing. When
> Morningstar says a mutual fund and an ETF have a .97 correlation over 3
> years, they use month-end data for 36 data points. Using daily, I've seen
> them dip below .90 often. That could be it, however, as I mentioned in
> another reply, if I take the trades generated by one of my strategies for a
> mutual fund and manually go through and replace the buy prices with the
> prices from a similar ETF, the performance is pretty close. That's the one
> part I don;t understand. I'm tempted to run the strategies with the mutual
> fund EOD data and actually buy and sell the ETF instead.
>
> What is the fastest way to plot 2 symbols and their correlation to each other
> in Amibroker?
>
> --- In [email protected], "wavemechanic" <fimdot@> wrote:
> >
> > I suspect that the correlation is not as good as you suspect, reflecting
> > the difference in portfolios. Plot the relative performance of the two or
> > the correlation between them and see if they are strongly correlated.
> >
> > Bill
> > ----- Original Message -----
> > From: graphman27
> > To: [email protected]
> > Sent: February 23, 2010 2:49 AM
> > Subject: [amibroker] Mutual funds are outperforming ETFs big time, but
> > they shouldn't...why?
> >
> >
> > I'm a new user of Amibroker and am spending weeks converting my old
> > Window on Wall Street simple formulas to Amibroker. It's been a steep
> > learning curve, but here is my problem. An example:
> >
> > When I take a simple strategy, such as a MA crossover system and run it
> > with a mutual fund, say a Latin America fund, I'll get profit up 300% in 7
> > years, as an example. I'll then take a very similar ETF, that has a 99%
> > correlation to the mutual fund and has the nearly identical buy & hold
> > return as the mutual fund, but the performance for the ETF may be half or
> > even only 1/3 of what the mutual fund was.
> >
> > I use Yahoo Finance's EOD data, so could that be the problem? Maybe the
> > stops I have set up are based on more than EOD close. I've tried changing
> > the buy price settings every way possible (Open+1, Close+1,
> > Average+1...etc.), but I can't get good numbers. The only change I can
> > make gets great results, but is unrealistic: Open+0. Amibroker support
> > says that isn't right for EOD data anyway.
> >
> > I'm hoping my settings are off or some formulas (like stochastics) are
> > based on more than close and that could be my problem. However, even the
> > formulas that are 100% based on close are showing poor results.
> >
> > Any advice? Aren't ETFs going to perform better due to intraday trading?
> >
> > Thanks!
> >
> >
> >
> > ------------------------------------
> >
> > **** IMPORTANT PLEASE READ ****
> > This group is for the discussion between users only.
> > This is *NOT* technical support channel.
> >
> > TO GET TECHNICAL SUPPORT send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> > http://www.amibroker.com/feedback/
> > (submissions sent via other channels won't be considered)
> >
> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > Yahoo! Groups Links
> >
>