Thanks. This works like a charm.
My problem: Regressing the returns from a portfolio against the returns from several
market benchmarks. Restrict the model so that each
coefficient is non-negative and they sum to 1. Suggestions?
Jack's solution: Express (n-1) portfolio weights as squared parameters and the n-th
one as 1 minus all the others. Estimate via nls. Example:
nls rPORT = w1*rSP500 + w2*rSP400 + w3*rSP600
w1 = b1^2
w2 = b2^2
w3 = 1 - w1 - w2
params b1 b2
Show replies by date