Professional Documents
Culture Documents
Objectives
Additivity Assumption
maximize Subject to
3 sin x + xy + y3 - 3z + log z x2 + y 2 = 1 x + 4z 2 z 0
A non-linear program is permitted to have nonlinear constraints or objectives. A linear program is a special case of non-linear programming!
Nonlinear objective function f(x) and/or Nonlinear constraints gi(x). Today: we will present several types of non-linear programs.
Demand 19 7 2 5
A (19)
x
An N LP
d(P,A) = d(P,D) =
( x 8) 2 + ( y 2 ) 2 ( x 14)2 + ( y 13)2
The model
Minimize
19 ( x 8) 2 + ( y 2) 2
+ +
5 ( x 14)2 + ( y 13)2
Subject to x 7 5 y 11 x + y 24
S j cj xj Sj aij xj = bi
for all i
xj is 0 or 1 for all j
The fact that non-linear models can model so much is perhaps a bad sign
How can we solve non-linear programs if we have trouble with integer programs? Recall, in solving integer programs we use techniques that rely on the integrality.
Fact: some non-linear models can be solved, and some are WAY too difficult to solve. More on this later.
Buy a machine and keep it for t years, and then sell it. (0 t 10)
All values are measured in $ million Cost of machine = 1.5 Revenue = 4(1 - .75t) Salvage value = 1/(1 + t)
Millions of dollars
Time
9.8
Non-linearities in Pricing
Lowering the price of GM automobiles will decrease the demand for the competitors
The time it takes to go from Lincoln Park to IIT by car depends non-linearly on the congestion. As congestion increases just to its limit, the traffic sometimes comes to a near halt.
Suppose it is a soft constraint and we permit solutions violating it. We can then write: 3x1 + 5x2 + 4x3 - y = 17 And we may include a term of 10y2 in the objective function.
Portfolio Optimization
In the following slides, we will show how to model portfolio optimization as NLPs The key concept is that risk can be modeled using non-linear equations Since this is one of the most famous applications of non-linear programming, we cover it in much more detail
For a given rate of return, one wants to minimize risk. For a given rate of risk, one wants to maximize return.
Return is modeled as expected value. Risk is modeled as variance (or standard deviation).
10
Expectations Add
Suppose that X and Y are random variables E(X + Y) = E(X) + E(Y) Interpretation:
Suppose that the expected return in one year for Stock 1 is 9%. Suppose that the expected return in one year for Stock 2 is 10% If you put $100 in Stock 1, and $200 in Stock 2, your expected return is $9 + $20 = $29.
Suppose that X and Y are random variables Var(aX + bY) = a2 Var(X) + b2 Var(Y) + 2ab Cov(X, Y) Example. The risk of investing in umbrellas and sunglasses is less than the risk of either investment by itself. In general: n Var(X1 + X2 + + Xn) = i =1Var ( X i ) + i < j 2Cov ( X i , X j )
11
Reducing risk
Diversification is a method of reducing risk, even when investments are positively correlated (which they often are). If only two investments are made, then the risk reduction depends on the covariance.
Min s.t.
Max Expected Return - q (Risk) where q reflects the tradeoff between return and risk.
12
There are 3 candidate assets for our portfolio, X, Y and Z. The expected returns are 30%, 20% and 8% respectively (if possible we would like at least a 12% return). Suppose the covariance matrix is:
X Y Z X Y Z 3 1 0.5 1 2 0.4 0.5 0.4 1
What are the variables? Let x,y,z be percentage of portfolio of each asset.
3 x 2 + 2 y 2 + z 2 + 2 xy xz 0.8 yz
1.3 x + 1.2 y + 1.08 z 1.12 x + y + z =1 x, y, z 0
Max s.t.
x + y + z =1 x, y, z 0
13
No more than 15% in the energy sector Between 20% to 25% high growth At most 3% in any one firm etc. We end up with a large non-linear program. The unconstrained version becomes the CapM model in finance.
Regression
Estimate for Midterm = x * HW3 + y Midterm = x * HW3 + y + residual x 0.6 y 40 HW3 91 80 61 88 86 56 60 87 50
Find the best linear fit for estimating the midterm grade from the homework grades
Estimate Midterm 1 94.6 89 88 97.5 76.6 58.5 92.8 92 91.6 93.5 73.6 87 76 99 92.2 85 70 67
Residual -5.6 9.5 -18.1 -0.8 1.9 13.4 23 -7.2 -3 sum of squares
Residual squared 31.36 90.25 327.61 0.64 3.61 179.56 529 51.84 9 1222.87
14
Writing regression as an N LP
Minimize
Sj (rj)2
Minimize Sj (rj)2 subject to rj = Hj x + y Mj for each j
subject to
r1 = (91x + y) 89 r2 = (80x + y) 97.5 r3 = (61x + y) 58.5 r9 = (50x + y) 67
r2 =.082
15
r2 =.29
A famous application in Finance of determining the best linear fit is determining the b of a stock. CAPM assumes that the return of a stock s in a given time period is
rs = + b rm + e, rs = return on stock s in the time period rm = return on market in the time period b = a 1% increase in stock market will lead to a b% increase in the return on s (on average)
16
20.00%
0.00% -40.00% -20.00% 0.00% 20.00% 40.00% 60.00% 80.00% What is the best linear fit for -20.00% Market -40.00% -60.00%
20.00%
0.00% -40.00% -20.00% 0.00% 20.00% 40.00% 60.00% 80.00% -20.00% Market value b is the slope of the The -40.00% -60.00%
regression line. Here it is around .6 (lower expected gain than the market, and lower risk.)
17
Summary
Applications of NLP to location problems, portfolio management, and regression Non-linear programming is very general and very hard to solve Special case of convex minimization NLP is easier, because a local minimum is a global minimum
18