Say you have n items each ranging from 1-100. How can I get go over all possible variations within the range?
Example:
3 stocks A, B and C
Working to find possible portfolio allocation.
A - 0     0   0            1    2          1    1
B - 0     1   2      ...   0    0    ...   1    2
C - 100   99  98           99   98         98   97
Looking for an efficient way to get a matrix of all possible outcomes.
Sum should add up to 100 and cover all possible variations for n elements.
 
     
    