Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Math & Sciences (https://www.askmehelpdesk.com/forumdisplay.php?f=402)
-   -   Linear equation (https://www.askmehelpdesk.com/showthread.php?t=451891)

  • Feb 26, 2010, 08:04 AM
    rbjanaki
    linear equation
    A financial advisor is about to build an investment portfolio for a client who has $100000 to invest. The four investments available are A,B,C, and D. Investment A will earn 4 percent and has risk of two “points” per $ 1000 invested. B earns 6 percent with 3 risk points; C earns 9 percent with 7 risk points; and D earns 11 percent with a risk of 8. The client has put the following conditions on the investments: A is to be no more than one-half of the total invested. A cannot be less than 20 percent of the total investment. D cannot be less than C. Total risk points must be at or below 1,000. Determine the amount of each investment that should be purchased.
    Note : Focus on the unit of measure that you use for the investments.
  • Feb 26, 2010, 02:08 PM
    galactus
    Quote:

    Originally Posted by rbjanaki View Post
    A financial advisor is about to build an investment portfolio for a client who has $100000 to invest. The four investments available are A,B,C, and D. Investment A will earn 4 percent and has risk of two “points” per $ 1000 invested. B earns 6 percent with 3 risk points; C earns 9 percent with 7 risk points; and D earns 11 percent with a risk of 8. The client has put the following conditions on the investments: A is to be no more than one-half of the total invested. A cannot be less than 20 percent of the total investment. D cannot be less than C. Total risk points must be at or below 1,000. Determine the amount of each investment that should be purchased.
    Note : Focus on the unit of measure that you use for the investments.


    This looks like a linear programming problem.

    Let A, B, C, D be the respective amounts invested.

    Objective function could be to maximize interest:



    Constraints:

    A+B+C+D=100,000









    Run this through the Excel solver. This gives A=20,000, B=0, C=0, D=80,000. $9,600 in interest and 680 points.

    To do this by hand would be tedious. One could use the M-method by adding the appropriate slack(F,H), surplus(E,G), and artificial variables(R1, R2, R3) and penalizing the objective function.

    Rewrite in the appropriate form to set up the tableau:













    If this must be done by hand by building the tableau, start by multiplying the R rows by -M and adding to the z-row. This eliminates the M's in the z row.

    Then, find the entering and leaving variables and do the numerous, tedious, iterations. That is where Excel Solver, LINGO, TORA and other optimization software comes in handy.

    The tableau is:

  • Feb 27, 2010, 06:33 AM
    galactus

    This is Operations Research. A highly demanded field for math majors. If one gets a math degree, one can get a job in OR. Before computers, most with math degrees were relegated to teaching. Not anymore. Look up M-method and Simplex method.
    My grad work required OR classes, so I know a little. Perhaps enough to be dangerous :):)
  • Feb 28, 2010, 12:17 PM
    galactus

    Here is the code to run this in GAMS. GAMS is optimization software that is available free online: http://www.gams.com/download/

    If you download it, copy and paste this into a new program.

    Variables
    I total interest
    A Amount invested in A
    B amount invested in B
    C amount invested in C
    D amount invested in D

    Positive variable A;
    Positive variable B;
    Positive variable C;
    Positive variable D;

    Equations
    interest shows total interest
    constraintA total invested equals 100000
    constraintB amount invested in A less than or equal to 50000
    constraintC amount invested in A must be greater than 20000
    constraintD amount invested in D must be greater than C
    points total points accumulated;

    interest.. I =e= .04*A+.06*B+.09*C+.11*D;
    constraintA.. A+B+C+D =e= 100000;
    constraintB.. A =l= 50000;
    constraintC.. A =g= 20000;
    constraintD.. D =g= C;
    points.. A/500+3*B/1000+7*C/1000+D/125 =l= 1000;

    Model interest1 /all/;

    solve interest1 using lp maximizing I;

    display A.l, B.l, C.l, D.l, interest.l, points.l;
  • Mar 1, 2010, 05:50 AM
    Unknown008

    Thanks for the additional info! :)
  • Mar 1, 2010, 05:53 AM
    galactus

    You're welcome. I doubt if the OP comes back to even look it over. GAMS is easy to program. Download it. It's free. There is a red arrow at the top to run the program once it is entered. Excel solver is also nice once one gets the hang of it.

  • All times are GMT -7. The time now is 12:26 AM.