R/pOptGen.R

Defines functions pOptGen

Documented in pOptGen

pOptGen <-
function(mu,Sigma,C)
{
   SigmaI <- solve(Sigma)
   Mu <- cbind(1,mu)
   w <- c(SigmaI%*%Mu%*%solve(t(Mu)%*%SigmaI%*%Mu)%*%c(1,C))
   vol <- sqrt(w%*%Sigma%*%w)
   return(list(w=w,vol=vol))
}

Try the RcmdrPlugin.RiskDemo package in your browser

Any scripts or data that you put into this service are public.

RcmdrPlugin.RiskDemo documentation built on Nov. 13, 2023, 5:07 p.m.