I am trying to write VBA to run through all the combinations of stock weights in a portfolio to determine all the output combinations of an equation that is linked to the security weights.
The portfolio may have 1 to very large number of securities.
For instance assuming stock weight increment adjustments of 1%... and all stock weights add to 100% and none are less than 0%...
2 securities in a portfolio:
A , B
100% , 0%
99% , 1%
98% , 2%
etc.... results in 101 combinations.
3 securities in a portfolio:
A , B , C
100% , 0% , 0%
99% , 1% , 0%
99% , 0% , 1%
98% , 2% , 0%
98% , 1% , 1%
98% , 0% , 2%
etc.... results in xxx combinations.
In sum, the VBA must compute the security weight of every combination of stock weights (assuming 1% increments, 100% = total stock weights, and weights are between 100% and 0%).
Any advice?
Bookmarks