+ Reply to Thread
Results 1 to 2 of 2

Solver with IF statements

Hybrid View

  1. #1
    Registered User
    Join Date
    10-22-2014
    Location
    Stockholm, Sweden
    MS-Off Ver
    2013
    Posts
    1

    Solver with IF statements

    Hi

    I am doing a Schoolproject where i am opmizing a portfolio.
    I am using the solver to find a optimal mix of assets in a portfolio.
    I am trying to get the solver to understand that the expected return for a asset changes when the solver is short selling it.
    Since i then have to account for financing costs.

    However i don't get it to work, if anyone could take a look in the excel file and see if it would be possible i would greatly appreciate it.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Solver with IF statements

    Re solver and IF statment

    A nonlinear solver relies on (partial) derivative values to guide it towards a feasible and optimal solution; since it is unable to compute the derivatives of a function at points where that function is discontinuous, it has trouble determining how to proceed.
    With the Evolutionary Solver you may be able to use functions like If and Choose but there is no guarantee it will work and find an optimal solution.

    You can use discontinuous functions such as IF and CHOOSE in calculations on the worksheet which are not dependent on the decision variables, and are therefore constant in the optimization problem. But any discontinuous functions that do depend on the variables will likely cause problems for the Solver. Users sometimes fail to realize that certain functions, such as ABS and ROUND, are nonsmooth at certain points.
    I'll have a look at you sample file and see if I can come up with a hint or two because forum members are not supposed to do home work but hints are allowed.

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 07-20-2014, 12:45 PM
  2. Replies: 6
    Last Post: 05-18-2013, 05:49 AM
  3. Can't start Solver. Error message says Solver.xlam already open.
    By DaveHills in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 10-21-2012, 11:02 AM
  4. solver macro + simulation code + not updating solver values
    By sabinemaria in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 11:37 AM
  5. Solver statements XLM ---> Excel 2003
    By programmernovice@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2006, 01:15 PM

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