[R-SIG-Finance] fPortfolio, as.timeSeries

Yohan Chalabi chalabi at phys.ethz.ch
Wed Jul 23 14:09:31 CEST 2008

>>>> "JPB" == "John P. Burkett" <burkett at uri.edu>
>>>> on Tue, 22 Jul 2008 12:32:21 -0400

   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,

PhD student
Swiss Federal Institute of Technology


More information about the R-SIG-Finance mailing list