tseries (version 0.4-1)

portfolio.optim: Portfolio Optimization

Description

Computes an efficient portfolio from the given return series x in the mean-variance sense. The computed portfolio has the desired expected return pm and no other portfolio exists, which has the same mean return, but a smaller variance. To solve the quadratic program solve.QP is used.

Missing values are not allowed.

Usage

portfolio.optim (x, pm = mean(x), riskless = FALSE, shorts = FALSE, rf = 0.0)

Arguments

x
a numeric matrix or multivariate time series consisting of a series of returns.
pm
the desired mean portfolio return.
riskless
a logical indicating whether there is a riskless lending and borrowing rate.
shorts
a logical indicating whether shortsales on the risky securities are allowed.
rf
the riskfree interest rate.

Value

  • A list containing the following components:
  • pwthe portfolio weights.
  • pxthe returns of the overall portfolio.
  • pmthe expected portfolio return.
  • psthe standared deviation of the portfolio returns.

Details

portfolio.optim is a generic function with methods for multivariate "ts" and default for matrix.

References

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.

See Also

solve.QP

Examples

Run this code
x <- rnorm (1000)
dim(x) <- c(500,2)
res <- portfolio.optim (x)
res$pw

Run the code above in your browser using DataCamp Workspace