Computes an efficient portfolio from the given return series
in the mean-variance sense.
## S3 method for class 'default': portfolio.optim(x, pm = mean(x), riskless = FALSE, shorts = FALSE, rf = 0.0)
- a numeric matrix or multivariate time series consisting of a series of returns.
- the desired mean portfolio return.
- a logical indicating whether there is a riskless lending and borrowing rate.
- a logical indicating whether shortsales on the risky securities are allowed.
- the riskfree interest rate.
The computed portfolio has the desired expected return
no other portfolio exists, which has the same mean return, but a
smaller variance. To solve the quadratic program,
solve.QP is used.
portfolio.optim is a generic function with methods for
default for matrix.
Missing values are not allowed.
- A list containing the following components:
pw the portfolio weights. px the returns of the overall portfolio. pm the expected portfolio return. ps the standared deviation of the portfolio returns.
E. J. Elton and M. J. Gruber (1991): Modern Portfolio Theory and Investment Analysis, 4th Edition, Wiley, NY, pp. 65-93.
C. Huang and R. H. Litzenberger (1988): Foundations for Financial Economics, Elsevier, NY, pp. 59-82.
x <- rnorm (1000) dim(x) <- c(500,2) res <- portfolio.optim (x) res$pw