[R-SIG-Finance] R - Error Question for chart.Correlation(PerformanceAnalytics)

Peter Carl peter at braverock.com
Tue Jan 8 20:53:27 CET 2008


On Tuesday 08 January 2008 1:04:01 pm Guy Yollin wrote:
>  I don't know enough
> about building packages to know if this is the expected behavior or not.

Well, it isn't and it shouldn't work that way (although I've verified that, in 
fact, it does work as you say).  

The issue seems to be some namespace confusion.  fEcofin, which is 
a "required" package for fBasics or some of the other RMetrics packages 
(which we in turn require), has recently added an older version of our data 
objects to its list.  Spencer has recently pointed out the namespace 
collision and I'm sure we'll work with Diethelm to figure out a way around it 
in the next version.

> head(fEcofin::managers)
   X.Y..m..d    HAM1 HAM2    HAM3    HAM4 HAM5 HAM6 EDHEC.LS.EQ SP500.TR
1 1996-01-31  0.0074   NA  0.0349  0.0222   NA   NA          NA   0.0340
2 1996-02-29  0.0193   NA  0.0351  0.0195   NA   NA          NA   0.0093
3 1996-03-31  0.0155   NA  0.0258 -0.0098   NA   NA          NA   0.0096
4 1996-04-30 -0.0091   NA  0.0449  0.0236   NA   NA          NA   0.0147
5 1996-05-31  0.0076   NA  0.0353  0.0028   NA   NA          NA   0.0258
6 1996-06-30 -0.0039   NA -0.0303 -0.0019   NA   NA          NA   0.0038
  US.10Y.TR US.3m.TR
1   0.00380  0.00456
2  -0.03532  0.00398
3  -0.01057  0.00371
4  -0.01739  0.00428
5  -0.00543  0.00443
6   0.01507  0.00412

At this point, the best way to make sure you're working with the correct data 
is to load it explicitly after loading PerformanceAnalytics.  (RMetrics loads 
in all of the data when the package loads.)

> library(PerformanceAnalytics)
> data(managers)
> head(managers)
            HAM1 HAM2    HAM3    HAM4 HAM5 HAM6 EDHEC.LS.EQ SP500.TR US.10Y.TR
Jan 1996  0.0100   NA  0.0359  0.0208   NA   NA          NA   0.0340   0.00380
Feb 1996  0.0215   NA  0.0295  0.0231   NA   NA          NA   0.0093  -0.03532
Mar 1996  0.0226   NA  0.0253 -0.0053   NA   NA          NA   0.0096  -0.01057
Apr 1996  0.0008   NA  0.0478  0.0200   NA   NA          NA   0.0147  -0.01739
May 1996  0.0158   NA  0.0337  0.0122   NA   NA          NA   0.0258  -0.00543
Jun 1996 -0.0086   NA -0.0293 -0.0089   NA   NA          NA   0.0038   0.01507
         US.3m.TR
Jan 1996  0.00456
Feb 1996  0.00398
Mar 1996  0.00371
Apr 1996  0.00428
May 1996  0.00443
Jun 1996  0.00412

Thanks very much for pointing out the issue, and I apologize for the 
confusion.

pcc
-- 
Peter Carl
145 Scottswood Rd
Riverside, IL 60546
708 447 6465



More information about the R-SIG-Finance mailing list