Skip to content

Performance Analytics

3 messages · Sean Jewell, ssmith88 at umd.edu, Brian G. Peterson

#
Sean,

I don't know much about the performance analytics package, but here is an alternative.  Load the fPortfolio package and convert to a time series object with as.timeSeries().  Next use the cumulate() function to get the cumulated returns and the plot() function for a graph.

Scott Smith
#
Sean Jewell wrote:
PerformanceAnalytics tries to be generous in what it accepts, but it 
seems that you are using a data.frame without rownames and not (any) 
time series class (we prefer xts for most things because it is a time 
series class that is as fast as matrix even for large data sets).  As 
such, your first column looks like the character string of the 
timestamp.  If you made those the rownames instead, everything would 
likely work fine.  The other (better) option is to convert your data to 
xts (or some other time series class) before attempting your analysis.  
This is good advice in any case, as data.frame should really only be 
used for factor data.

Regards,

  - Brian