I have the following data frame:
read.csv(file="CNY % returns.csv",head=TRUE,sep=",")
DATE LOG...RETURNS
1 03/09/13 -6.9106715
2 04/09/13 -6.9106715
3 05/09/13 -4.5839582
4 06/09/13 1.7554592
5 07/09/13 -0.8808549
6 08/09/13 4.1842420
DATE: obviosuly date; format dd/mm/yyyy.
LOG RETURNS: compounded returns from a bitcoin CNY exchange.
I wish to use the auto.arima
function as a start point to select a suitable model.
I have already tried:
cnyX <- read.zoo(text=" DATE LOG...RETURNS
1 03/09/13 -6.9106715
2 04/09/13 -6.9106715
3 05/09/13 -4.5839582
4 06/09/13 1.7554592
5 07/09/13 -0.8808549
6 08/09/13 4.1842420")
index(cnyX) <- as.Date(as.character(index(cnyX)),format="%D%m%y")
this produces:
<NA> <NA> <NA> <NA> <NA> <NA>
0.2144527 -9.2553228 -0.8519708 -4.2074340 14.0817672 1.2212485 ....
I realise the as.character
separator is incorrect but am unsure how this should be fixed or corrected. I have read about creating XTS and TS objects but have not been able to make these work either. I have also referred to: Convert data frame with date column to timeseries but found this unsuitable.
How should I convert my data frame to a suitable format for auto.arima
? I may have duplicate values present.