+ Reply to Thread
Results 1 to 3 of 3

Scenario Analysis

  1. #1
    Registered User
    Join Date
    05-01-2007
    Posts
    7

    Scenario Analysis

    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?
    Last edited by VBA Noob; 11-16-2007 at 02:56 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    If 'very large number of securities' means a number greater than 10, you're talking about an astronomical number of combinations ...

    Edit: There are, for example, in combinations totalling 100%,
    • 4,598,126 combinations for 5 stocks in 1% increments
    • 10,015,005 combinations for 10 stocks in 5% increments
    • 20,030,010 combinations for 20 stocks in 10% increments
    Last edited by shg; 11-16-2007 at 11:18 AM.

  3. #3
    Forum Contributor
    Join Date
    11-11-2005
    Posts
    267
    Can you shed a bit of light on what you are trying to do with those combinations? Surely, a vast number of the combinations would be of no consequence. It seems plausible if you desire to arrive at a specific set of combinations that meet a defined set of criteria. In that event, it is possible to set out an optimization algorithm to perform the task.
    HTH
    Myles

    ...constantly looking for the smoother pebble while the whole ocean of truth lies before me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1