[R-SIG-Finance] [R-sig-finance] fPortfolio error

Carlos Ungil carlos.ungil at GMAIL.COM
Tue Nov 4 13:41:08 CET 2008


Hello,

the code below (copied from the slide) works for me (the output is not
identical, though).

I'm using R 2.8.0 on windows, and the current version of Rmetrics packages
(from r-forge):
install.packages("fPortfolio",repos="http://R-Forge.R-project.org"), etc...

Carlos


> sapply(.packages(),function(pkg)
> .readRDS(system.file("Meta","package.rds",package=pkg))$DESCRIPTION["Version"])

fPortfolio.Version      Rglpk.Version   quadprog.Version    fAssets.Version 
          "290.75"            "0.2-6"           "1.4-11"           "290.75" 
  fCopulae.Version      adapt.Version robustbase.Version         sn.Version 
          "290.75"            "1.0-4"            "0.4-4"            "0.4-6" 
    mnormt.Version    fBasics.Version timeSeries.Version   timeDate.Version 
           "1.2-1"           "290.75"           "290.79"           "290.81" 
      MASS.Version      stats.Version   graphics.Version  grDevices.Version 
          "7.2-44"            "2.8.0"            "2.8.0"            "2.8.0" 
     utils.Version   datasets.Version    methods.Version       base.Version 
           "2.8.0"            "2.8.0"            "2.8.0"            "2.8.0" 


library(fPortfolio)
Data = as.timeSeries(data(LPP2005REC))[,1:6]
Spec = portfolioSpec()
Constraints = "LongOnly"
setNFrontierPoints(Spec) = 5
portfolioFrontier(Data, Spec, Constraints)

Bastian Offermann wrote: 
> hello, 
> 
> have there been any changes recently to fPortfolio? i have taken the code 
> from the following presentation 
> 
> http://www.rmetrics.org/Meielisalp2008/Presentations/Wuertz2.pdf
>    slide 10/31 
> 
> Data <- as.timeSeries(data(LPP2005REC))[,1:6] 
> Spec <- portfolioSpec() 
> portfolioFrontier(data = Data , spec = Spec, constraints = Const) 
> 
> it returns error message 
> 
> Error in as.matrix(x at Data) : 
>  no slot of name "Data" for this object of class "timeSeries" 
> 
> can anybody help me out? are there any good tutorials on fPortfolio. 
> documentation seems to be a little rather technical. thanks. 
> 
> regards 
-- 
View this message in context: http://www.nabble.com/fPortfolio-error-tp20314262p20321486.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list