findSig {CLA} | R Documentation |
Find sigma(W) and W, given mu(W) and CLA result
Description
Find \sigma(W)
and W
, given \mu(W
) and
CLA
result.
Usage
findSig(Mu0, result, covar, equal.tol)
Arguments
Mu0 |
numeric vector of |
result |
a |
covar |
the same |
equal.tol |
numeric tolerance to be used in
|
Value
a list
with components
Sig |
numeric vector of same length, say |
weight |
numeric |
References
Master thesis, p.33
See Also
Examples
data(muS.sp500)
## Full data taking too much time for example: Subset of n=21:
if(getRversion() >= "3.6") .Rk <- RNGversion("3.5.0") # for back compatibility & warning
set.seed(2018)
iS <- sample.int(length(muS.sp500$mu), 21)
if(getRversion() >= "3.6") do.call(RNGkind, as.list(.Rk)) # revert
cov21 <- muS.sp500$covar[iS, iS]
CLsp.21 <- CLA(muS.sp500$mu[iS], covar=cov21, lB=0, uB = 1/2)
CLsp.21 # 14 turning points
summary(tpM <- CLsp.21$MS_weights[,"Mu"])
str(m0 <- c(min(tpM),seq(0.00205, 0.00525, by = 0.00005), max(tpM)))
sig. <- findSig(m0, result=CLsp.21, covar=cov21)
str(sig.)
stopifnot(dim(sig.$weight) == c(21, length(m0)))
plot(sig.$Sig, m0, xlab=quote(sigma), ylab = quote(mu),
type = "o", cex = 1/4)
points(CLsp.21$MS_weights, col = "tomato", cex = 1.5)
title("Efficient Frontier from CLA()")
mtext("findSig() to interpolate between turning points", side=3)
[Package CLA version 0.96-3 Index]