[R-SIG-Finance] Problem with solver solveRquadprog in fPortfolio

Yohan Chalabi chalabi at phys.ethz.ch
Sat Apr 17 13:12:42 CEST 2010


>>>> "PK" == Peter Keller <podvalov at gmx.net>
>>>> on Sat, 17 Apr 2010 14:07:29 +0300

   PK> Hi there,
   PK>
   PK> I have a serious problem with solver solveRquadprog in
   PK> fPortfolio.
   PK> Unfortunately, solveRquadprog is the standard solver in
   PK> fPortfolio and
   PK> pretty essential.
   PK>
   PK> How to replicate the problem on my PC:
   PK>
   PK> library(fPortfolio)
   PK> library(fEcofin)
   PK>
   PK> library(Rsymphony)
   PK> library(lpSolveAPI)
   PK>
   PK> djiData = as.timeSeries(DowJones30)
   PK> djiData.ret <- 100 * returns(djiData)
   PK> frontier <- portfolioFrontier(djiData.ret)
   PK>
   PK> I get then the error message:
   PK>
   PK> Error in .Fortran("qpgen2", as.double(Dmat), dvec =
   PK> as.double(dvec),
   PK> as.integer(n), :
   PK> Incorrect number of arguments (16), expecting 17 for qpgen2
   PK>
   PK> I’ve installed R version 2.10.1 on Windows 7 (32 bit) with
   PK> updated CTV
   PK> Finance.
   PK>
   PK> Interestingly, this problem only appeared after a
   PK> while. Initially,
   PK> everything worked fine, but suddenly, without doing something
   PK> special,
   PK> this error appeared. I already completely uninstalled R,
   PK> rebooted the PC
   PK> and re-installed R (including updated CTV Finance), but it
   PK> did not help
   PK> at all.
   PK>
   PK> I highly would appreciate any help. I already spent quite a
   PK> lot of time
   PK> to find a solution, but there is not a lot of help available.
   PK>
   PK> Best regards,
   PK>
   PK> Peter Keller


Hi Peter,

The mentioned error is due to a change in the new version of
quadprog package and a direct call of the Fortran routine in fPortfolio.

We have already updated the devel version of fPortfolio on R-forge. As
soon as we have run all test, we will upload a new version of
fPortfolio to CRAN.

You can either wait until the new pkg is on CRAN or compile it from
source and get the devel code from R-forge. More info 
http://r-forge.r-project.org/scm/?group_id=156

Regards,
Yohan


-- 
PhD candidate
Swiss Federal Institute of Technology
Zurich

www.ethz.ch



More information about the R-SIG-Finance mailing list