[R-SIG-Finance] tseries and efficient frontier
John P. Burkett
burkett at uri.edu
Sun May 4 19:20:00 CEST 2008
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
More information about the R-SIG-Finance
mailing list