[R-SIG-Finance] making sense of 100's of funds
ggrothendieck at gmail.com
Sat Aug 11 13:55:10 CEST 2007
On 8/11/07, paul sorenson <sf at metrak.com> wrote:
> Ok - thanks for the tips off list Brian and Patrick.
> After reading through some of the PerformanceAnalytics docs one of the
> first things I tried to do was convert the daily unit prices to returns.
> Just looking at the resulting time series is enlightening in its own
> right (I guess I should be surprised).
> The next bit it more of an R style question. I currently have the data
> in one data frame with the fund name as a factor.
> > names(funds)
>  "fundname" "tier" "region" "assetClass" "security"
>  "style" "geared" "hedged" "pdate" "EntryPrice"
>  "ExitPrice" "Group"
> Plotting the raw prices is almost a trivial matter with xyplot's formula
> interface, with or without groups:
> print(xyplot(ExitPrice ~ pdate | fundname, data=funds, type='l',
> It may just be my inexperience with lattice but once I start dealing
> with zoo objects, then lattice doesn't seem to be quite so convenient.
> I could cbind the returns back into the the dataframe and continue using
> xyplot but it seems that would be throwing away the features of zoo.
> What do people on the list do?
Read the documentation in ?xyplot.zoo and ?plot.zoo .
More information about the R-SIG-Finance