Upananda, I don't know your fut data, next time would help a simple dput(fut). Taking into account the error message check the following:
library(PerformanceAnalytics) df <- data.frame( sample(10)/100+100, seq(as.Date("2014-10-22"), as.Date("2014-10-31"), by="day")) str(df) Return.calculate(df, "log") #Error en checkData(prices, method = "xts") : # The data cannot be converted into a time series. If you are trying to pass in names from a data object with one column, you should use the form 'data[rows, columns, drop = FALSE]'. Rownames should have standard date formats, such as '1985-03-15'. df <- data.frame( sample(10)/100+100, row.names=seq(as.Date("2014-10-22"), as.Date("2014-10-31"), by="day")) str(df) Return.calculate(df, "log") df <- xts( sample(10)/100+100, order.by=seq(as.Date("2014-10-22"), as.Date("2014-10-31"), by="day")) str(df) Return.calculate(df, "log") If you are going to use the PerformanceAnalytics package I highly recommend you to checkl the xts package. Daniel Merino 2014-10-31 15:24 GMT-03:00 Upananda Pani <upananda.p...@gmail.com>: > Hi All, > > I want to convert my price data into natural log (continuously compounded > return) by using Performance Analytics Package, I am getting the following > error. > > rfut = Return.calculate(fut) > Error in checkData(prices, method = "xts") : > > > Please help me. > > With sincere regards, > Upananda > > -- > > > You may delay, but time will not. > > > Research Scholar > alternative mail id: up...@iitkgp.ac.in > Department of HSS, IIT KGP > KGP > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > -- Daniel [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.