library(xts) library(zoo) EURUSD<-read.csv("Data_Forecast/EURUSD.csv") # to load the data EURUSD<-read.csv("Data_Forecast/EURUSD.csv",stringsAsFactors=F) # to load as a factor #?????????? EURUSD$Date<-as.Date(EURUSD$Date,format="%Y-%m-%d" , "h:m:s") # here the code is not working to format the "Date" # lets leave just date and close price EURUSD<-EURUSD[,c(1,5)] # and change the name of the last column into EURUSD names(EURUSD)[2]<-"EURUSD" #????????????? EURUSD.xts<-xts(EURUSD$EURUSD,SP500$Date) # here also i create xts object for these time series