the implementation will differ from a standard HRP in that, when we divide the weights between the right and the left branches of a node, we have to use the surplus variance instead of the asset variance.
In addition, in order to apply the user defined constraints, we would need to define a secondary optimization step with a loss function like
$$ || W - W_{HRP}||^{2} \quad \mathrm{s.t. \quad user-defined-constraints.} $$
the implementation will differ from a standard HRP in that, when we divide the weights between the right and the left branches of a node, we have to use the surplus variance instead of the asset variance.
In addition, in order to apply the user defined constraints, we would need to define a secondary optimization step with a loss function like