Generating uniformly distributed points in a simplex

105 Views Asked by At

In order to test portfolio strategies I want to generate random points $(w_1,w_2,\ldots,w_n)$ inside an $n$-dimensional simplex with constraints:

$$\tag{1}0 \leq w_i \leq 1, \quad \forall i \in \{1,2,\ldots,n\}$$ $$\tag{2}\sum_{i=1}^n w_i = 1$$ $$\tag{3}\sum_{i,j=1}^n \sigma_{ij}w_iw_j = \sigma^2$$

where $[\sigma_{ij}]$ is a covariance matrix.

I would like the points to be uniformly distributed. Without constraint (3), this is fairly easy. For example I can generate independent uniform random numbers $w_i \sim U(0,1)$ for $1 = 1, \ldots, n-1$, set $w_n = 1 - \sum_{i=1}^{n-1} w_i$, and then discard points outside of the simplex.

The problem is how to incorporate the variance constraint (3).