Skip to content
Advertisement

Tag: pulp

Using PuLP to minimize two sums in python

I am trying to find the optimal weights of two indexes (stocks and bonds) to mimic as closely as possible a stocks return. (NOC stock). I am having trouble setting up PuLP to minimize the sum of squared differences. objective function: (minimize) (sum of weighted stock returns + sum of weighted bond return – stocks return)^2 where the stock and

Get minimum of maximize value on pulp objective function

I’m trying to use pulp to get minimum value U(X) of following objective function, where x_{f,i,v} is binary value. And I’m having problem while writing max() when set an objective function to pulp.LpProblem. What I do is use python inner function max() but it gives me an error. Seems like it cannot be used to pulp. How can I use

Advertisement