Group constraints in mean-variance optimisation

Groups constraints define minimum and maximum holding sizes for groups of assets (i.e., their positions are summed).

There are several ways to define groups.

list(1:4, c(3, 7, 8))
btest(prices    = variations$prices   [[1]],
      timestamp = variations$timestamp[[1]], ...)
btest(prices    = variations$prices   [[2]],
      timestamp = variations$timestamp[[2]], ...)

But note that we have set variations.settings$expand.grid to FALSE. If we hadn't, btest would have computed all combinations of prices and timestamps.