A problem on creating fFOLIODATA-class object

s1155022273 at mailserv.cuhk.edu.hk s1155022273 at mailserv.cuhk.edu.hk
Sat Feb 16 15:05:35 CET 2013


Dear maintainer of package fPortfolio,

Hey guys!

I've came across a problem when creating fFOLIODATA-class object.

According to this fPortfolio document(Pg 10), the "data" parameter in function
portfolioData(data, spec = portfolioSpec()) is able to receive a list object:

"a time series or a named list, containing either a series of returns or named
entries ’mu’ and ’Sigma’ being mean and covariance matrix."

But when I attempted to pass a list object containing mu and Sigma matrix as
required to "data", an error was prompt: "Error: class(data) == "timeSeries" is
not TRUE". Here is my code:

    data <- list(mu = a_vector_of_mean, sigma = a_matrix_of_cov)
    p <- portfolioData(data, spec = portfolioSpec())

The reason I need to specify mu and sigma to create the data object is because
I
do not have return in time series. Any solution or advice will be highly
appreciated.

Thank you!

--
BEST REGARDS,
Todd Leo


-------------------------------------------------
This e-mail is sent by CUHK WebMail http://webmail.cuhk.edu.hk



More information about the Rmetrics-core mailing list