  We give an explicit algorithm and source code for computing optimal weights
for combining a large number N of alphas. This algorithm does not cost O(N^3)
or even O(N^2) operations but is much cheaper, in fact, the number of required
operations scales linearly with N. We discuss how in the absence of binary or
quasi-binary clustering of alphas, which is not observed in practice, the
optimization problem simplifies when N is large. Our algorithm does not require
computing principal components or inverting large matrices, nor does it require
iterations. The number of risk factors it employs, which typically is limited
by the number of historical observations, can be sizably enlarged via using
position data for the underlying tradables.
