[R] Return.clean () - PerformanceAnalytics package

T.Riedle tr206 at kent.ac.uk
Sat Oct 15 14:27:26 CEST 2016

Hi Jim,
no, I calculated the return series in Excel and imported the data into R. Then I transformed the data into a vector as I need a vector object of asset returns and did the calculation. 

Kind regards,
From: Jim Lemon <drjimlemon at gmail.com>
Sent: 15 October 2016 11:06
To: T.Riedle
Cc: R-help at r-project.org
Subject: Re: [R] Return.clean () - PerformanceAnalytics package

Hi T,
Have you tried converting "clearntest" or "data" into a time series?


On Sat, Oct 15, 2016 at 4:47 AM, T.Riedle <tr206 at kent.ac.uk> wrote:
> Dear all,
> I am trying to clean return data using the Return.clean() function in the PerformanceAnalytics package. Hence, my code looks as follows but I get an error message.
> cleantest <- read.csv("D:/Studie_vola_difference/cleantest.csv")
> data<-as.vector(cleantest)
> test<-Return.clean(data,method="boudt",alpha=0.01)
> Error in checkData(R, 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'.
> Can anybody help me on this error? What is wrong with my code?
> Thanks for your support.
>         [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

More information about the R-help mailing list