[R-SIG-Finance] tseries and efficient frontier
Charles Ward
cwrward at gmail.com
Sun May 4 23:44:49 CEST 2008
I think the reason is that the function "portfolio.optim" has the
default option, short=FALSE. If you use the option short=TRUE you
should achieve the symmetrical shape of the efficient frontier.
When you constain the portfolio only to accept positive weights of
each asset, there will generally be bumps and asymmetries in the
efficient frontier.
The textbook examples usually assume short selling is allowed.
Charles Ward
2008/5/4 John P. Burkett <burkett at uri.edu>:
> Yesterday I reported that my effort to compute and plot an efficient
> frontier using the fPortfolio package had produced an asymmetric curve
> rather than the anticipated hyperbola. Using the same data, I have now tried
> computing and plotting an efficient frontier using the tseries package. The
> result is again an asymmetric curve.
>
> My code is as follows:
> library(fPortfolio)
> Data = as.timeSeries(data(smallcap.ts))
> Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
> Data
> x <- as.matrix(Data)
> vcvd <- cov(Data)
> pmv <- rep(0,100)
> psv <- rep(0,100)
> minr <- min(mean(Data))
> maxr <- max(mean(Data))
> vcv <- cov(x)
> iv <- 0:99
> mrv <- minr*(1-iv/99) + maxr*(iv/99)
> pmv[1] <- min(mean(Data))
> pmv[100] <-max(mean(Data))
> psv[1] <- 0.2226543
> psv[100] <- 0.1674082
> for (i in 2:99) {
> pmv[i] <- portfolio.optim(x, pm = mrv[i], covmat = vcv)$pm
> psv[i] <- portfolio.optim(x, pm = mrv[i], covmat = vcv)$ps
> }
> plot(psv,pmv)
>
> On the resulting curve, risk is minimized at point 62. But the curve is not
> symmetric around this point. (Moving 37 points in either direction from this
> point raises risk by the same amount. In contrast moving 37 points back
> lowers the mean return far less than moving 37 points forward raises the
> mean return.) I wonder whether this asymmetry is a bug or an accurate
> portrayal of a type of efficiency frontier different from the hyperbolas
> that appear in textbooks. I would be most grateful for suggestions about how
> to resolve this puzzle.
>
> Best regards,
> John
>
>
> --
> John P. Burkett
> Department of Environmental and Natural Resource Economics
> and Department of Economics
> University of Rhode Island
> Kingston, RI 02881-0808
> USA
>
> phone (401) 874-9195
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
More information about the R-SIG-Finance
mailing list