[R] About the risk code in the fportfolio package
lai
r810285 at yahoo.com.tw
Wed Feb 3 18:33:05 CET 2010
Hello,
I have a problem with fPortfolio recently. I am using below code:
Data = read.table("hf.txt",header = TRUE,sep = "")
Data = Data[, c("CA", "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, title = TRUE)
~~~~~~~~~~
About the frontierPlot code
when I use Sigma in the risk code:
frontierPlot(Frontier, pch = 19, col = c("black", "grey"), add = FALSE,
labels = TRUE,
return = c("mean"), risk = c("Sigma"), auto = TRUE, title = TRUE)
~~~~~~~~~~~~
there are the same plot!!!
WHY? I use the different risk code
Could you tell me what the problem is?
much THANKS
--
View this message in context: http://n4.nabble.com/About-the-risk-code-in-the-fportfolio-package-tp1461475p1461475.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list