pfopt_discrete_allocation | Whole-share allocation of a portfolio value to target weights at the latest prices: greedy rounding or an integer program that minimises the gap to the targets plus the leftover cash; long/short weights are split into a long and a short book (short_ratio, reinvest). | |