+ Reply to Thread
Results 1 to 3 of 3

Solver error when running an optimizer

  1. #1
    Forum Contributor
    Join Date
    03-13-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    136

    Solver error when running an optimizer

    Good Morning,

    First off let me just be clear that I am very new to any type of programming so the code below is probably pretty messy. I created a spreadsheet that determines the asset weights in an investmest portfolio that are needed to minimize standard deviation for any given level of portfolio return using solver. I wrote the following program to run through the calculation multiple times with different constraints to find the optimized value under different portfolio return assumptions. I am getting an error message when I try to run the program that says:

    "Solver: An unexpected internal error occurred, or available memory was exhausted."

    Can someone with more experience than myself (i.e. everyone) try to help me work through this problem please?

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    03-13-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    136

    Re: Solver error when running an optimizer

    Okay I figured out that this is where the problem was occuring:

    Please Login or Register  to view this content.
    So I changed it to this part of the program works:

    Please Login or Register  to view this content.
    Now I am getting an error right here.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-13-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    136

    Re: Solver error when running an optimizer

    Oh success!!! I think it is working correctly now after playing with it a bit. The only thing that I think is a bit strange is that in the code below I had to subtract 1 from my meanconstraint number at the end of every loop because the For..next statement adds one. Is there some other looping method I should be using that won't add 1 to meanconstraint?

    Please Login or Register  to view this content.

+ 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