Description Usage Arguments Value Examples
Get the minimum-variance portfolio for a target expected return.
1 | minvport(er.target, ersd, cormat, aa.lb = -1e+09, aa.ub = 1e+09)
|
er.target |
A vector of asset-class expected returns. |
ersd |
A data frame with class (asset-class names), er (expected return by class), and sd (standard deviation by class) |
cormat |
Correlation martrix. |
aa.lb |
Asset allocation lower bounds |
aa.ub |
Asset allocation upper bounds |
The portfolio expected return.
1 2 3 4 5 6 7 8 9 10 11 12 | library("magrittr")
library("quadprog")
library("tidyverse")
# no restrictions on asset allocation - shorting and leverage allowed
minvport(.09, stalebrink$ersd, stalebrink$cormat)$portfolio
# shorting and leverage NOT allowed:
minvport(.09, stalebrink$ersd, stalebrink$cormat, 0, 1)$portfolio
# shorting and leverage NOT allowed, 40% upper bound on real estate:
minvport(.09, stalebrink$ersd, stalebrink$cormat, 0, c(1, 1, 1, .4, 1, 1))$portfolio
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.