I am new to using R.
I am trying to maximize the returns to a portfolio given a target risk by
using the following:
library(fPortfolio)
myspec <- portfolioSpec()
setTargetRisk(myspec) <- 0.3
setSolver(myspec) <- "solveRsocp"
maxreturnPortfolio(Data, myspec)
Since the solveRsocp function requires the fPortfolioSolver package to be
installed, I tried installing the package but unable to to do.
Following is the error I get while trying to install the fPortfolioSolver
package:
install.packages("fPortfolioSolver")Warning in install.packages :
package fPortfolioSolver is not available (for R version
2.15.3)Installing package(s) into
/home/alok/R/x86_64-pc-linux-gnu-library/2.15
(as lib is unspecified)Warning in install.packages :
package fPortfolioSolver is not available (for R version 2.15.3)
I tried a work around with the socp function from the CLSOCP package
but it does not work.
Could someone please help me with this?
Thanks,
Alok
[[alternative HTML version deleted]]
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.