[R-sig-finance] "portfolio" package for equity portfolio analysis

Kris kriskumar at earthlink.net
Fri Nov 18 17:05:35 CET 2005


I have been playing around with the almgren and chriss paper on optimal portfolios given a sort
and no information on expected returns could someone confirm if this makes sense?

#This function compute the optimal portfolio given a sort
#and covariance information given no information on 
#expected return information
#see: http://www.math.toronto.edu/almgren/papers/sort.pdf

#computes the centroid of the portfolio
#
#See Almgren and Chris  Pg 16.
centroid<-function(i,n)
{
# n - number of assets in this sort
#predefined const for single complete sort
aConst<-0.4424
bConst<-0.1185
betaConst<-0.21
alpha <- aConst - bConst * (n ^ (-betaConst))
centroid <- qnorm((n + 1 - i - alpha) / (n - 2 * alpha + 1))
return(centroid)
}
#Weights from covariance information
port.wt<-function(centroid,Sigma)
{
SigInv<-solve(Sigma)
port.wt<-centroid %*% SigInv
}

### To use this function compute the centroid first 
# then call port.wt



More information about the R-sig-finance mailing list