Displaying 3 results from an estimated 3 matches for "setnfrontierpoint".
Did you mean:
setnfrontierpoints
2008 Aug 12
1
fPortfolio constraints, maxsumW
...axsumW[1:2Assets]=13.63" fails. The relevant section of
my code file and the resulting error message are pasted below.
Suggestions about how to correct my coding would be most welcome.
*************Code beings here************************
Data = as.timeSeries(Jdata)
Spec = portfolioSpec()
setNFrontierPoints(Spec) = 150
Spec
Constraint = c("minW[1:nAssets]=0", "maxsumW[1:2Assets]=13.63")
frontier = portfolioFrontier(Data, Spec, Constraint)
**************Error message begins here***************
Error in parse(text = constraints[i]) :
unexpected symbol in "maxsumW[1:2Assets&q...
2017 Dec 27
1
Error in dimnames in R
...EX) <- c("PAGEX")
# Merging returns of the assets (excluding NA's)
portfolio_returns <- merge(LUTAX,
PFODX,BRGAX,GFAFX,NMSAX,EGINX,IPOYX,SCWFX,FGLDX,PAGEX,all=F)
data <- as.timeSeries(portfolio_returns)
#Optimisation portfolio
library(fPortfolio)
spec <- portfolioSpec()
setNFrontierPoints <- 25
setSolver(spec) <- "solveRquadprog"
constraints <-
c("minW[1:1]=0.12","maxW[1:1]=0.18","minW[2:2]=0.12","maxW[2:2]=0.18",
"minW[3:3]=0.10","maxW[3:3]=0.15","minW[4:4]=0.08","maxW[4:4]=0.12",...
2010 Feb 03
0
About the risk code in the fportfolio package
...", "SS", "EM", "EMN", "ED", "DS", "MS", "RA", "FIA",
"GM", "LSE", "MF", "SP500", "NASDAQ", "JPM")]
d = as.timeSeries(Data)
class(d)
Spec = portfolioSpec()
setNFrontierPoints(Spec) = 1000
setRiskFreeRate(Spec) = 3
Constraints = "both"
Frontier = portfolioFrontier(d, Spec, Constraints)
frontierPlot(Frontier, pch = 19, col = c("black", "grey"), add = FALSE,
labels = TRUE,
return = c("mean"), risk = c("Cov"), auto = TRUE,...