I would like to estimate the optimal weights where weights are all positive and add up to $1$. The most basic problem of this is as follows:
Regression $y = \beta_1x_1 + \beta_2x_2$ with constraints $\beta_1 + \beta_2 = 1, \beta_1, \beta_2 > 0$.
Try
I would make up the following loss,
$$ \sum (y_i - \beta_1 x_1 - \beta_2 x_2)^2 + \lambda (\beta_1 + \beta_2 - 1) $$
where $\lambda$ : lagrange multiplier.
But I'm not sure this optimization problem is related to any statistical problem.