Chapter 7
Chapter 7
Nonlinear Optimization
Models
Linear Programming Model
A linear objective function
A set of linear constraints
Minimize 6 x1+ 8 x2
Subject to
2 x1+ 4 x2 16
4 x1+ 3 x2 24
x1 0
2
x2 0
Non-linear Programming Model
A non-linear objective function, or
3
This Chapter
4
A Problem Solver Has Difficulty:
2.5
1.25
0
1 2 3 4 5
-1.25
-2.5
5
Local Optimization vs. Global Optimization
-1.25
Global optimal solution:
•A solution that is the best -2.5
1.25
0
1 2 3 4 5
-1.25
-2.5
8
Convex Functions
Slope is increasing 9
Concave Functions
Slope is decreasing 10
Two dimensional convex/concave faces
11
Convex Functions
A local minimum of a convex function is a
global minimum
Function f(x) is convex if f”(x) 0;
If f(x) and g(x) are convex, then for a, b 0,
12
Convex Functions
Some convex functions:
13
Concave Functions
A local maximum of a concave function is a
global maximum
Function f(x) is concave if f”(x) 0;
Some concave functions:
14
Problems Solver Always Solves Correctly
Sufficient conditions for maximization problems
– Constraints are linear
– Objective function is concave
17
Example 7.1: A Pricing Optimization
Model
The Links Company sells its
golf clubs at golf outlet
stores.
The company knows that
demand for its clubs varies
considerably with price.
18
Questions
The company would like to estimate the relationship between
demand and price.
19
Solution
We use the best-fitting power curve y = axb
with a = 5,871,064 and b = -1.908 to predict demand from price.
Optimal Price
Global Optimal?
20
Peak-load and off-peak demands
In many situations, there are peak-load and off-peak
demands for a product.
In such a situation, it might be optimal for a producer to
charge a larger price for peak-load service than for off-
peak service.
21
Example 7.4 Pricing Electricity
Florida Power and Light (FPL) faces demands during both peak-load and off-
peak-load times.
FPL must determine
– prices per kilowatt hour to charge during peak and off-peak periods,
– capacity to maintain, which costs $10 per day per kwh.
The daily demand for power during each period (in kwh) is related to price as
follows:
Dp = 60 – 0.5Pp + 0.1Po
Do = 40 + 0.1Pp – Po
Here, Dp and Pp are demand and price during peak time, whereas
Do and Po are demand and price during off-peak time.
http://www.eia.gov/todayinenergy/detail.cfm?id=5110 22
Ex. 7.4(cont’d) – Influence Diagram
Peak period
Peak period
price
Revenue in price
Peak period
Peak period
Revenue Off-peak
demand
period price
Unit Maintenance
Cost
23
Formulation
To solve this problem, we must keep track of :
– The peak and off-peak price
24
Is the Solver Solution Optimal?
25
Sensitivity Analysis
We vary the unit cost of capacity from $5 to $15.
As the cost of the capacity increases, the peak-load price
increases, the off-peak price stays constant, the optimal capacity
decreases.
Why does the peak-load price increase but not the off-peak price?
Unit cost Peak price Off-peak price Capacity Profit
$5 $67.81 $26.53 28.75 $2,342.92
$6 $68.31 $26.53 28.50 $2,314.30
$7 $68.81 $26.53 28.25 $2,285.92
$8 $69.31 $26.53 28.00 $2,257.80
$9 $69.81 $26.53 27.75 $2,229.92
$10 $70.31 $26.53 27.50 $2,202.30
$11 $70.81 $26.53 27.25 $2,174.92
$12 $71.31 $26.53 27.00 $2,147.80
$13 $71.81 $26.53 26.75 $2,120.92
$14 $72.31 $26.53 26.50 $2,094.30
$15 $72.81 $26.53 26.25 $2,067.92 26
Portfolio Optimization
Portfolio optimization models
Given a set of possible investments, how do financial analysts
determine the portfolio that has the lowest risk and yields a high
expected return?
This question was answered by Harry Markowitz in the 1950s.
For his work on this and other investment topics, he received the
Nobel Prize in economics in 1990.
28
Invest
in
what?
29
Returns
and
risks
30
Portfolio Optimization (Asset Allocation)
Problem: How to invest your money to obtain a specific expected
return level while minimizing the potential risk.
Suppose
– n possible investments;
R = x1 Y1 + x2 Y2 + … + xn Yn
31
Portfolio Optimization
Portfolio Optimization Problem: To minimize the variance of R under the constraint that the Expected
value of R ≥ Some number.
subject to E(R) ≥ R0
32
Portfolio Optimization
Historical-data approach:
– use historical data to estimate Var(R) and E(R)
33
Portfolio Optimization: Historical-data approach
μi : (sample) expected value of Yi
R = x 1 Y1 + x2 Y2 + … + x n Yn
si : (sample) standard deviation of Yi
rij : coefficient of correlation of Yi and Yj;
Cij : covariance of Yi and Yj: Cij = rij si sj A linear function
We have:
A convex function
Expected value of R = x1 μ1 + x2 μ2 + … + xn μn
Variance of R =
34
For n=3
+ xxr ss+xxr ss
2 3 23 2 3 3 2 32 3 2
36
Calculating Expected Value and Variance of
R in Excel New version: VAR.S
Average function for calculating μi
VAR function for calculating New version: STDEV.S
Or STDEV function for calculating si
CORREL function for calculating rij (then Cij = rij si sj , or)
COVARIANCE.S function for Cij
37
Calculating Expected Value and Variance of
R in Excel
38
Matrix in Mathematics
A matrix is a rectangular array of numbers.
It is a powerful tool to show complex relationship in a neat way.
An m* n matrix has m rows and n columns.
If m or n is 1, then it is a row or column vector.
39
Matrix Operations
Addition
Subtraction
Transpose of a matrix
Multiplication
40
Matrix Addition/Subtraction
41
Matrix Transpose
42
Matrix Multiplication
Matrix product rule: if A is an m * r matrix, B is a r * n matrix,
A*B=C is an m * n matrix:
– the value in row i and column j of C is the sumproduct of row i of A and column j
of B.
8 17
1 0 1 2
25 59
0 1 1 0
1 4
2 1 1 3
*
7 16
=
8 20
43
5 13
39 93
1
3
1 2 1 3 * = (13)
0
2
3 1 1
1 0 1 2 1 5 4 9
0 1 1 0 0 2 3 1 4
* 2 1 2
=
2 1 1 3 9 6 15
0 1 3
44
1 0 1 2 3 1 1
1 2
1
1 2
0 2 5 4 9
0 1 1 0
*5
* 10
= *5
3 1 4
10
2 1 1 3 2 1 2
0 1
0 1
0 1 3 9 6 15
8 17
1 0 1 2
25 59
0 1 1 0
1 4
=
2 1 1 3
*
7 16
=
8 20
5 13
39 93
45
Matrix Multiplication in Excel
To obtain A*B in Excel
– Input A and B in Excel. Suppose A is a m*r matrix, B is a r*n matrix.
Suppose the related ranges named Mat1 and Mat2 respectively;
– Press Ctrl-Shift-Enter
46
Matrix in Mathematics
47
x1 C11 x2 C12 x3 C13
= x x x
1 2 3
x1 C 21 x2 C 22 x3 C 23
x C x C x C
1 31 2 32 3 33
2 2 2
= x1 C11 + x2 C 22 + x3 C 33 + xxC 1 2 12
+ x2 x1 C 21 + x1 x3 C13 + x3 x1 C 31
+ x xC
2 3 23
+ xxC 3 2 32
48
Matrix in Mathematics
In Excel, A*C*AT can be calculated by
MMULT(VectorA,MMULT(MatrixC,TRANSPOSE(VectorA))
49
Example 7.9 Portfolio Optimization
Perlman & Brothers, an investment company, can invest in three
stocks. From past data, the means and standard deviations of
annual return, and the correlation between the annual returns on
the stocks, have been estimated.
Stock 1 Stock 2 Stock 3
Mean return 0.14 0.11 0.1
StDev of return 0.2 0.15 0.08
51
Portfolio Variance
Portfolio variance =
Invested fractions * CovarMat * Transpose(Invested fractions)
where CovarMat is a matrix of covariances for the particular
investments.
We need to calculate a matrix of covariances.
The covariance between returns of stock i and stock j is
si sj rij
52
Solution
The solution indicates that the company should put half of its
money in each of stocks 1 and 3, and none in stock 2.
We can interpret the portfolio standard deviation of 0.1217 in a
probabilistic sense.
If we believe that stock returns are approximately normally
distributed, then the probability is about 0.68 that the actual
portfolio return will be within one standard deviation of the
expected return, and the probability is about 0.95 that the actual
portfolio return will be within two standard deviations of the
expected return.
53
Sensitivity Analysis
As the company requires larger returns (on average), it must
assume a larger risk. We vary the required return from 0.10 to
0.14 in increments of 0.005.
54
Efficient Frontier
55
Efficient Frontier
Points on the efficient frontier can be achieved by appropriate
portfolios.
Points below the efficient frontier can be achieved, but they are
not as good as points on the efficient frontier because they have
a lower expected return for a given level of risk.
Points above the efficient frontier are unachievable – the
company cannot achieve an expected return this high for a given
level of risk.
56
Example: Portfolio Optimization when there is no
historical data – the scenario approach (optional)
For the next year the Security Analysis Company (SAC) has identified seven
equally likely scenarios.
SAC wants to find the minimum variance portfolio that yields an expected
annual return of at least 0.13.
2 n
Var (V ) E [V E (V )] [vi E (V )]2 pi
i 1
58
Developing the Model
n
Expected value vi pi
i 1
n
Variance [vi E (V )] pi
2
i 1
59
Another Method for Solving Non-
Linear Programming Models
Evolutionary Method
– For problems that are non-smooth non-linear
60
Exercise
– 60,62, 67
61