Skip to content
Prev 2713 / 15274 Next

fPortfolio, as.timeSeries

JPB> My troubles start when I try to get fPortfolio to process the returns 
   JPB> data.  If I give the commands
   JPB> library(fPortfolio)
   JPB> returnsdata <- read.csv("returns.csv",header=T,sep=",")
   JPB> attach(returnsdata)
   JPB> Data = as.timeSeries(returnsdata)
   JPB> the response is
   JPB> Warning messages:
   JPB> 1: In .whichFormat(charvec, ...) : Could not determine time(date) format
   JPB> 2: In .whichFormat(charvec, ...) : Could not determine time(date) format
   JPB> The rows of Data are labeled with "dummy dates" starting with 1970-01-01.

You need to specify the format of your charvec in timeSeries()

this could be done with

Data = timeSeries(data = returnsdata, format = "[with the format of your timestamps]")

hope this helps,
Yohan