[R-SIG-Finance] fPortfolio and tangency portfolio for two assets

Diffform sstoeckl at gmx.de
Sun Oct 6 14:06:50 CEST 2013


Hi,

I am trying to optimize a portfolio of two assets (I wanted my students to
confirm the tangency portfolio formula with the results of fPortfolio
optimization):

Setting my portfolio as:
lppData <- PF 
tgSpecL <- portfolioSpec()
setRiskFreeRate(tgSpecL) <- 0
setNFrontierPoints(tgSpecL) <- 50
tgPortfolio1 <- tangencyPortfolio(data = lppData, spec = tgSpecL,
constraints = "LongOnly")
print(tgPortfolio1)
tgPortfolio1EF <- portfolioFrontier(data = lppData, spec = tgSpecL,
constraints = "LongOnly")
tailoredFrontierPlot(tgPortfolio1EF)

I get a tangency line that cuts through the efficient frontier instead of
being tangent to it (and crossing with the sharpe ratio) and thus nothing
that relates at all to what you would compute by hand. Why could this be?

I enclosed the assets returns as csv. I also tried with the short constraint
setting and different risk-free rates but this should not be a problem here.

Thank you for your help,
best regards, Sebastian

Two_Assets.csv <http://r.789695.n4.nabble.com/file/n4677700/Two_Assets.csv>  



--
View this message in context: http://r.789695.n4.nabble.com/fPortfolio-and-tangency-portfolio-for-two-assets-tp4677700.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list