When using the R package fPortfolio, I run the example below and get the same result with either risk="Cov" or risk="Sigma".
The reason might be related to the methods getCov and getSigma, but I don't have access to them.
Reproducible code - Note how "Cov" and "Sigma" produce the same plots.
Partly, from "Portfolio Optimization with R/Rmetrics" (2015), pp. 198 ff
lppData <- 100 * LPP2005.RET[,1:6]
colnames(lppData)
lppSpec <- portfolioSpec()
setNFrontierPoints(lppSpec) <- 5
longFrontier <- portfolioFrontier(lppData, lppSpec)
print(longFrontier)
longFrontier <- portfolioFrontier(lppData)
par(mfrow = c(2,1))
tailoredFrontierPlot(longFrontier, risk = "Cov")
tailoredFrontierPlot(longFrontier, risk = "Sigma")
Using risk="Cov" or risk="Sigma" in tailoredFrontierPlot gives the same results.
This behavior can also be seen in the book "Portfolio Optimization with R/Rmetrics" (2015). As shown on pp. 151/2, the matrices "Cov" and "Sigma" are identical.
$Cov
SBI SPI LMI MPI
SBI 0.0158996 -0.012741 0.0098039 -0.015888
SPI -0.0127414 0.584612 -0.0140747 0.411598
LMI 0.0098039 -0.014075 0.0149511 -0.02332
MPI -0.0158884 0.411598 -0.0233222 0.535033
$Sigma
SBI SPI LMI MPI
SBI 0.0158996 -0.012741 0.0098039 -0.015888
SPI -0.0127414 0.584612 -0.0140747 0.411598
LMI 0.0098039 -0.014075 0.0149511 -0.02332
MPI -0.0158884 0.411598 -0.0233222 0.535033
If we could have access to the routines getCov and getSigma we could see how to fix it (assuming the problem is there).
Thanks
question from:
https://stackoverflow.com/questions/65925186/in-r-package-fportfolio-both-risk-options-cov-and-sigma-give-the-same-results 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…