# Defining LP investment model in Lindo/Solver [closed]

Models provided below.

My questions are:

1.

(G+I+M) after each constraint in the screenshot of the mathematical model below represents Growth, Income and Money Market Funds, but does that mean for example, G >= 0.20 multiplied by (G+I+M)?

2.

Much less stable figures for the forecast net yields are 18%, 12.5%, and 7.5%.

Those three yield values make up the OF, but what's the significance of saying "Much less stable figures..."?

3.

Suggesting the investment plan with a slightly lower or slightly larger risk level is acceptable.

Am I supposed to create second/third models with lower/higher risk levels than 5.5% for testing? Or am I meant to use the sensitivity reports to figure that out?

Problem
Diversification strategy requires any portfolio to be split across three different mutual funds while respecting the following limits:

Between 20% and 30% to be allocated within Growth Fund
Between 20% and 50% to be allocated within Income Fund
No less than 30% to be allocated within Money Market Fund

Current estimates of the risk factors are:
10% for the Growth Fund
7% for the Income Fund
1% for the Money Market Fund

Much less stable figures for the forecast net yields are estimated to be:
18% for the Growth Fund
12.5% for the Income Fund
7.5% for the Money Market Fund

Client is willing to invest up to £800,000. Client risk profile indicates an average risk level of 5.5%. Suggesting the investment plan with a slightly lower or slightly larger risk level is acceptable.

A mathematical model formulated for this problem using 5.5% as the maximum acceptable average risk level is shown below.

Lindo gives syntax error when writing (G+I+M).

MAX TtlGain) 0.18G + 0.125I + 0.075M
SUBJECT TO
MaxInv)                  G + I + M <= 800000
MinInvGF)                G         >= 0.20(G+I+M)
MaxInvGF)                G         <= 0.30(G+I+M)
MinInvIF)                    I     >= 0.20(G+I+M)
MaxInvIF)                    I     <= 0.50(G+I+M)
MinInvMMF)                       M >= 0.30(G+I+M)
AvRskLvl)    0.10G + 0.07I + 0.01M <= 0.055(G+I+M)
END

Final - it seems Lindo/Lingo solution output is better with transformations using <= rather than >=. The solution for both is the same but the sensitivity report does not contain negatives when using <=. I might post another question asking about that.

MAX TtlGain) 0.18G + 0.125I + 0.075M
SUBJECT TO
MaxInv)                   G + I + M <= 800000
MinInvGF)    -0.80G + 0.20I + 0.20M <= 0
MaxInvGF)     0.70G - 0.30I - 0.30M <= 0
MinInvIF)    -0.80I + 0.20G + 0.20M <= 0
MaxInvIF)     0.50I - 0.50G - 0.50M <= 0
MinInvMMF)   -0.70M + 0.30G + 0.30I <= 0
AvRskLvl)  0.045G + 0.015I - 0.045M <= 0
END

(sorry got tought stuff irl

text corresponds with screenshot of model

1. i dont understand what you are saying here (i only guess, the whole proper model is already given ? (model says it clearly (i guess G , I, M are "money"= integer values for €=or *100 for euro cent(s). i dont think 2 decimal value can by modeled with real type, but i can be wrong

look you did

MaxInv)                  G + I + M <= 800000 [ you have 800 000 €]
MinInvGF)                G         >= 0.20 [you allow maximum up to 0.20e=20 eurocent be putted Growth Fund]

but given model is

MinInvGF)                G         >= 0.20(G+I+M)

sum( all money) then multiply by 0.20 ="20% of all invested money"

money G >=0.20(all money) (its like "go to store but buy stuff to Kitchen minimum of 20% all money you spend.. you spend 5e, 1or more to K, you spend 100e, 20 or more to K)

btw all should be equals(but didnt checked it

MinInvGF)                G         >= 0.20(G+I+M)
MinInvGF)                G         >= 0.20G+0.20I+0.2M
MinInvGF)                0.80G     >= 0.20(I+M)
MinInvGF)                0.80G  -0.20(I+M)         >= 0
MinInvGF)                0.80G  -0.20I-0.20M       >= 0

edit2: because of increasing and growing interest of simple math (LHS)<=(RHS)

#0. rule always apply to both sides the same

#1. rule adding is allowed (variables and values)

#2. rule subtracting is allowed

#3. rule multiplying by 1 positive number (not allowed by 0

#4. rule multiplying by 1 negative number in 2 steps: Whenever you multiply or divide an inequality by a negative number, you must flip the inequality sign.[1] then apply normal multiplying

#5. rule dividing = multiplying (/2 is *0.5)

moving LHS to right, then RHS to right and multiply by (-1)

//all same constraints
LHS<=RHS    //-LHS
LHS-LHS<=RHS-LHS
0<=RHS-LHS  // -RHS
-RHS<=-LHS // *(-1)
RHS>=LHS

another examples:

(LHS)<= (RHS) //+2.34 -1A -4B
(LHS)+2.34 -1A -4B <= (RHS)+2.34 -1A -4B

(LHS)<= (RHS) //*123.45
(LHS)*123.45 <= (RHS)*123.45

end of edit)

1. i guess these 3 numbers are just given (imagine you put money in bank account and bank says "we forecast +4% profit after year" .. or add interval ( -3% +9% ) - its forecast. can be +20% after year as -40%, its only forecast... but its just given numbers to your opt model.

2. in model there is comment not to go above 5.5% .. (again, i only guess, the whole proper model is already given ? (i would not change model, only if task/question tell to do so

isnt your part just copy/past model, run opt and tell G,I,M? :-) or whats the task

• according lindo.com/doc/online_help/lingo15_0/… syntax in post should work , example: MinInvGF) 0.80G -0.20I-0.20M >= 0 Mar 14, 2021 at 12:01
• @Edison yes ( many solvers has its own specific kind of syntax restrictions, thats the reason I just wrote all forms that comes in my mind with hope some could work :-) thanks too :-) Mar 14, 2021 at 12:48
• Yeah, G >= 0.20(G+I+M) would be G - 0.2*(G+I+M) <=0 Thanks :) lift-off. Mar 14, 2021 at 12:50
• @Edison added 'edit 2' for increased interest in equations ^^ Mar 14, 2021 at 21:09
• Mar 15, 2021 at 11:43