AMATH 460: Mathematical Methods For Quantitative Finance: 7.1 Lagrange's Method
AMATH 460: Mathematical Methods For Quantitative Finance: 7.1 Lagrange's Method
1 / 29
Outline
Lagranges Method
Example
2 / 29
Outline
Lagranges Method
Example
3 / 29
Investment Portfolios
Portfolio of n assets
Let wi be the proportion of the portfolio invested in asset i
Have constraint
n
X
wi = 1
i=1
n
X
w i i
i=1
Risk =
n
X
wi2 i2 + 2
i=1
Kjell Konis (Copyright 2013)
wi wj i j ij
1i<jn
4 / 29
n
X
wi i = w T
i=1
12
2 1 21
=
..
1 2 12 1 n 1n
22
..
.
..
.
n 1 n1 n 2 n2
2 n
..
.
n2
5 / 29
6 / 29
w T w
eTw = 1
T w = P
2 asset case
minimize:
subject to:
12 w12
+ 21 2 w1 w2 + 22 w22
w1 + w2 = 1
1 w1 + 2 w2 = P
2 asset case
maximize:
T w
subject to:
eTw = 1
w T w = P2
1 w1 + 2 w2
w1 + w2 = 1
12 w12 + 21 2 w1 w2 + 22 w22 = P2
7 / 29
Outline
Lagranges Method
Example
8 / 29
x (x0 , x0 + )
local maximum
local minimum
anything possible
7.1 Lagranges Method
9 / 29
x : kx x0 k <
local minimum
local maximum
saddle point
anything can happen
10 / 29
2x + y x + 2y
Df (0, 0) = 0 0
D f (x , y ) =
"
2 1
1 2
11 / 29
2x y x 2y
Df (0, 0) = 0 0
D f (x , y ) =
"
2 1
1 2
12 / 29
2x + 3y 3x + 2y
Df (0, 0) = 0 0
D f (x , y ) =
"
2 3
3 2
13 / 29
Df (x , y ) =
Df (0, 0) =
2y
2x + 3y
0 0
y2
0
D 2 f (x , y ) =
2
2
36y
1y 2
D 2 f (0, 0) =
0 2
2 3
14 / 29
Outline
Lagranges Method
Example
15 / 29
Lagranges Method
Problem:
maximize:
subject to:
f (x1 , x2 , . . . , xn )
g1 (x1 , x2 , . . . , xn ) = 0
g2 (x1 , x2 , . . . , xn ) = 0
..
.
(1)
gm (x1 , x2 , . . . , xn ) = 0
18th -century mathematician Joseph Louis Lagrange proposed the
following method for the solution
Form the function
F (x1 , . . . , xn , 1 , . . . , m ) = f (x1 , . . . , xn ) +
m
X
i gi (x1 , x2 , . . . , xn )
i=1
Optimal value for problem (1) occurs at one of the critical points of F
Kjell Konis (Copyright 2013)
16 / 29
Lagranges Method
Terminology:
The function F (x1 , . . . , xn , 1 , . . . , m ) is called the Lagrangian
The column vector = (1 , . . . , m ) is called the Lagrange
multipliers vector
Necessary Condition:
Let x = (x1 , x2 , . . . , xn )
The gradient D g(x ) must have full rank at any point where
the constraint g(x ) = 0 is satisfied, that is
rank Dg(x ) = m
Kjell Konis (Copyright 2013)
x where g(x ) = 0
17 / 29
D F (x , ) = Dx F (x , ) D F (x , )
Recall Lagrangian:
F (x , ) = f (x1 , . . . , xn ) +
m
X
i gi (x1 , x2 , . . . , xn )
i=1
f
f
Gradient of f : Df (x ) =
...
x1
xn
F
= gi (x )
i
18 / 29
g1
x1
g2
x1
g1
x2
g2
x2
gm
x1
gm
x2
Dg(x ) = .
.
.
..
.
g1
xn
g2
xn
..
.
..
gm
xn
i=1
gi
= T Dg(x ) j
xj
It follows that
D F (x , ) = Df (x ) + T Dg(x )
T
g(x )
19 / 29
Outline
Lagranges Method
Example
20 / 29
Example
Want to
4x2 2x3
2x1 x2 x3 = 0
x12 + x22 13 = 0
max/min:
subject to:
2 1 1
Dg(x ) =
2x1 2x2
0
Kjell Konis (Copyright 2013)
21 / 29
21 + 22 x1
4 + 2 x
1
2 2
2 1
D F (x , ) =
2x1 x2 x3
x12 + x22 13
21 + 22 x1 = 0
set
4 1 + 22 x2 = 0
set
2x1 x2 x3 = 0
set
x12 + x22 13 = 0
Kjell Konis (Copyright 2013)
22 / 29
Example (continued)
2
2
x2 =
3
2
x3 =
7
2
= 13
2
2
2
3
+
2
2
13
= 13
22
2 = 1
23 / 29
Outline
Lagranges Method
Example
24 / 29
w T w
eTw = 1
T w = P
g(w ) =
"
g1 (w )
T w P = 0
=
g2 (w )
eTw 1 = 0
T
Dg(x ) = T
e
Kjell Konis (Copyright 2013)
25 / 29
a b
Let A =
b c
2bx1 + 2cx2 = 2x T A
26 / 29
Df (w ) + T Dg(w )
g(w )
2w T + 1 e T + 2 T
eTw 1
D F (w , ) =
T w P
2 e
w
0
T
0 0 1 = 1
e
T 0 0
2
P
Kjell Konis (Copyright 2013)
27 / 29
Further reading:
Second order conditions, e.g., Theorem 9.2 and Corollary 9.1 in
PFME
28 / 29
http://computational-finance.uw.edu
29 / 29