75
Lecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and Asset Liability Management Summer Semester 2008 Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 1 / 75

Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Embed Size (px)

Citation preview

Page 1: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lecture 2: Optimization

Prof. Dr. Svetlozar Rachev

Institute for Statistics and Mathematical EconomicsUniversity of Karlsruhe

Portfolio and Asset Liability Management

Summer Semester 2008

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 1 / 75

Page 2: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Copyright

These lecture-notes cannot be copied and/or distributed withoutpermission.The material is based on the text-book:Svetlozar T. Rachev, Stoyan Stoyanov, and Frank J. FabozziAdvanced Stochastic Models, Risk Assessment, and PortfolioOptimization: The Ideal Risk, Uncertainty, and PerformanceMeasuresJohn Wiley, Finance, 2007

Prof. Svetlozar (Zari) T. RachevChair of Econometrics, Statisticsand Mathematical FinanceSchool of Economics and Business EngineeringUniversity of KarlsruheKollegium am Schloss, Bau II, 20.12, R210Postfach 6980, D-76128, Karlsruhe, GermanyTel. +49-721-608-7535, +49-721-608-2042(s)Fax: +49-721-608-3811http://www.statistik.uni-karslruhe.de

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 2 / 75

Page 3: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Basic concepts

The portfolio choice problem concerns the optimal trade-offbetween risk and reward. An optimal portfolio is the best portfolioamong many alternative ones.

The criterion which measures the “quality” of a portfolio relative tothe others is known as the objective function in optimizationtheory.

The set of portfolios among which we are choosing is called theset of feasible solutions or the set of feasible points.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 3 / 75

Page 4: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Basic concepts

There are two types of optimization problems depending onwhether the set of feasible solutions is constrained orunconstrained.

If the optimization problem is a constrained one, then the set offeasible solutions is defined by means of certain linear and/ornon-linear equalities and inequalities. These functions are formingthe constraint set.

There are also types of optimization problems depending on theassumed properties of the objective function and the functions inthe constraint set, such as linear problems, quadratic problems,and convex problems.

The solution methods vary with respect to the particularoptimization problem type as there are efficient algorithmsprepared for particular problem types.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 4 / 75

Page 5: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Unconstrained optimization

Unconstrained optimization problem is when there are noconstraints imposed on the set of feasible solutions. Thus, thegoal is to maximize or to minimize the objective function withrespect to the function arguments without any limits on theirvalues.

Consider the n-dimensional case; that is, the domain of theobjective function f is the n-dimensional space and the functionvalues are real numbers, f : R

n → R.Maximization is denoted by

max f (x1, . . . , xn)

and minimization by

min f (x1, . . . , xn).

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 5 / 75

Page 6: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Unconstrained optimization

A more compact form is commonly used, for example

minx∈Rn

f (x) (1)

denotes that we are searching for the minimal value of thefunction f (x) by varying x in the entire n-dimensional space R

n.A solution to problem (1) is a value of x = x0 for which theminimum of f is attained,

f0 = f (x0) = minx∈Rn

f (x).

Thus, the vector x0 is such that the function takes a larger valuethan f0 for any other vector x ,

f (x0) ≤ f (x), x ∈ Rn. (2)

Remark: there may be more than one vector x0 and, therefore, the argument forwhich f0 is achieved may not be unique.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 6 / 75

Page 7: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Unconstrained optimization

If (2) holds, then the function is attaining its global minimum at x0.If the inequality in (2) holds for x belonging only to a smallneighborhood of x0 and not to the entire space R

n, then theobjective function is said to have a local minimum at x0:

f (x0) ≤ f (x)

for all x such that ||x − x0||2 < ǫ where ||x − x0||2 stands for theEuclidean distance between the vectors x and x0,

||x − x0||2 =

n∑

i=1

(xi − x0i )2,

and ǫ is some positive number.

A local minimum may not be global as there may be vectorsoutside the small neighborhood of x0 for which the objectivefunction attains a smaller value than f (x0).

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 7 / 75

Page 8: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Unconstrained optimization

Figures below show the graph of a function with two local maxima, one ofwhich is the global maximum.

−20

2 −2

0

20

0.2

0.4

0.6

x2

x1

f(x 1,x

2)

Figure: The plot shows a function f (x1, x2) with two local maxima.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 8 / 75

Page 9: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Unconstrained optimization

−3 −2 −1 0 1 2 3−3

−2

−1

0

1

2

3

x1

x 2

Figure: The plot shows the contour lines of f (x1, x2) together with the gradientevaluated at a grid of points. The middle black point shows the position of thesaddle point between the two local maxima.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 9 / 75

Page 10: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Unconstrained optimization

Maximizing the objective function is the same as minimizing thenegative of the objective function and then changing the sign ofthe minimal value,

maxx∈Rn

f (x) = − minx∈Rn

[−f (x)].

This relationship between minimization and maximization isillustrated in the figure on the next slide. As a consequence,problems for maximization can be stated in terms of functionminimization and vice versa.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 10 / 75

Page 11: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Unconstrained optimization

0

f(x)−f(x)

x0

max f(x)

min[−f(x)]

Figure: The relationship between minimization and maximization for aone-dimensional function.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 11 / 75

Page 12: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Minima and maxima of a differentiable function

If the second derivatives of the objective function exist, then itslocal maxima and minima, often called generically local extrema,can be characterized.

Denote by ∇f (x) the vector of the first partial derivatives of theobjective function evaluated at x ,

∇f (x) =

(

∂f (x)

∂x1, . . . ,

∂f (x)

∂xn

)

.

This vector is called the function gradient. At each point x of thedomain of the function, it shows the direction of greatest rate ofincrease of the function in a small neighborhood of x .

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 12 / 75

Page 13: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Minima and maxima of a differentiable function

If for a given x , the gradient equals a vector of zeros,

∇f (x) = (0, . . . , 0)

then the function does not change in a small neighborhood ofx ∈ R

n.

It turns out that all points of local extrema of the objective functionare characterized by a zero gradient. As a result, the pointsyielding the local extrema of the objective function are among thesolutions of the system of equations,

∂f (x)

∂x1= 0

. . .∂f (x)

∂xn= 0.

(3)

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 13 / 75

Page 14: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Minima and maxima of a differentiable function

The system of equations (3) is referred to as representing thefirst-order condition for the objective function extrema. However, itis only a necessary condition; that is, if the gradient is zero at agiven point in the n-dimensional space, then this point may or maynot be a point of a local extremum for the function.

An illustration was given in the slides 8,9. The middle point, calledsaddle point, is not a point of a local maximum even though it hasa zero gradient. It is called saddle since the graph resembles theshape of a saddle in a neighborhood of it.

This example demonstrates that the first-order conditions aregenerally insufficient to characterize the points of local extrema.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 14 / 75

Page 15: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Minima and maxima of a differentiable function

The additional condition which identifies which of thezero-gradient points are points of local minimum or maximum isgiven through the matrix of second derivatives,

H =

∂2f (x)

∂x21

∂2f (x)∂x1∂x2

. . . ∂2f (x)∂x1∂xn

∂2f (x)∂x2∂x1

∂2f (x)

∂x22

. . . ∂2f (x)∂x2∂xn

......

. . ....

∂2f (x)∂xn∂x1

∂2f (x)∂xn∂x2

. . . ∂2f (x)

∂x2n

, (4)

which is called the Hessian matrix or just the Hessian.The Hessian is a symmetric matrix because the order ofdifferentiation is insignificant,

∂2f (x)

∂xi∂xj=

∂2f (x)

∂xj∂xi.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 15 / 75

Page 16: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Minima and maxima of a differentiable function

The additional condition is known as the second-order condition.Second-order condition for functions of n-dimensional arguments israther technical, so we only state it for two-dimensional functions.In the case n = 2, the following conditions hold:

❏ If ∇f (x1, x2) = (0, 0) at a given point (x1, x2) and the determinantof the Hessian matrix evaluated at (x1, x2) is positive, then thefunction has

a local maximum in (x1, x2) if

∂2f (x1, x2)

∂x21

< 0 or∂2f (x1, x2)

∂x22

< 0

a local minimum in (x1, x2) if

∂2f (x1, x2)

∂x21

> 0 or∂2f (x1, x2)

∂x22

> 0

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 16 / 75

Page 17: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Minima and maxima of a differentiable function

❏ If ∇f (x1, x2) = (0, 0) at a given point (x1, x2) and the determinantof the Hessian matrix evaluated at (x1, x2) is negative, then thefunction f has a saddle point in (x1, x2)

❏ If ∇f (x1, x2) = (0, 0) at a given point (x1, x2) and the determinantof the Hessian matrix evaluated at (x1, x2) is zero, then noconclusion can be drawn.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 17 / 75

Page 18: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

We showed that the first-order conditions are insufficient in thegeneral case to describe the local extrema. However, whencertain assumptions are made for the objective function, thefirst-order conditions can become sufficient.

Furthermore, for certain classes of functions, the local extremaare necessarily global. Therefore, solving the first-order conditionswe obtain the global extremum.

A general class of functions with nice optimal properties is theclass of convex functions.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 18 / 75

Page 19: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

Precisely, a function f (x) is called a convex function if it satisfiesthe property: For a given α ∈ [0, 1] and all x1 ∈ R

n and x2 ∈ Rn in

the function domain,

f (αx1 + (1 − α)x2) ≤ αf (x1) + (1 − α)f (x2). (5)

The definition is illustrated in Figure on the next slide. Basically, ifa function is convex, then a straight line connecting any two pointson the graph lies “above” the graph of the function.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 19 / 75

Page 20: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

f(x)

x1 x2

f(x1)

f(x2)

f(xα)

α f(x1)+(1−α)f(x2)

Figure: Illustration of the definition of a convex function in theone-dimensional case. Any straight line connecting two points on the graphlies “above” the graph. On the plot, xα = αx1 + (1 − α)x2

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 20 / 75

Page 21: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

A function f is called concave if the negative of f is convex.

A function is concave if it satisfies the property: For a givenα ∈ [0, 1] and all x1 ∈ R

n and x2 ∈ Rn in the function domain,

f (αx1 + (1 − α)x2) ≥ αf (x1) + (1 − α)f (x2).

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 21 / 75

Page 22: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

If the domain D of a convex function is not the entire space Rn,

then the set D satisfies the property,

αx1 + (1 − α)x2 ∈ D (6)

where x1 ∈ D, x2 ∈ D, and 0 ≤ α ≤ 1.

The sets which satisfy (6) are called convex sets. Thus, thedomains of convex (and concave) functions should be convexsets. Geometrically, a set is convex if it contains the straight lineconnecting any two points belonging to the set.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 22 / 75

Page 23: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

We summarize several important properties of convex functions:

1. Not all convex functions are differentiable. If a convex function istwo times continuously differentiable, then the correspondingHessian defined in (4) is a positive semidefinite matrix.

2. All convex functions are continuous if considered in an open set.

3. The sublevel sets

Lc = {x : f (x) ≤ c}, (7)

where c is a constant, are convex sets if f is a convex function.The converse is not true in general.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 23 / 75

Page 24: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

4. The local minima of a convex function are global. If a convexfunction f is twice continuously differentiable, then the globalminimum is obtained in the points solving the first-order condition

∇f (x) = 0.

5. A sum of convex functions is a convex function:

f (x) = f1(x) + f2(x) + . . . + fk (x)

is a convex function if fi , i = 1, . . . , k are convex functions.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 24 / 75

Page 25: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

A simple example of a convex function is the linear function,

f (x) = a′x , x ∈ Rn

where a ∈ Rn is a vector of constants. In fact, the linear function is

the only function which is both convex and concave.

As a more involved example, consider the following function,

f (x) =12

x ′Cx , x ∈ Rn (8)

where C = {cij}ni,j=1 is a n × n symmetric matrix. In this case, C is

the covariance matrix.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 25 / 75

Page 26: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

The function defined in (8) is called a quadratic function becausewriting the definition in terms of the components of the argumentX , we obtain

f (x) =12

n∑

i=1

ciix2i +

i 6=j

cijxixj

which is a quadratic function of the components xi , i = 1, . . . , n.

The function in (8) is convex if and only if the matrix C is positivesemidefinite. In fact, in this case the matrix C equals the Hessianmatrix, C = H. Since the matrix C contains all parameters, we saythat the quadratic function is defined by the matrix C.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 26 / 75

Page 27: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

Figures below illustrate the surface and contour lines of a convex andnon-convex two-dimensional quadratic functions.

−50

5

−5

0

50

10

20

30

x1

x2

f(x)

Figure: The surface of a two-dimensional convex quadratic functionf (x) = 1

2 x ′Cx

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 27 / 75

Page 28: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

5

5 5

5

55

10

10

10

10

10

10

10

10

15

15

15

15

15

1520

20

25

25

x1

x 2

−5 0 5−5

0

5

Figure: The contour lines of the two-dimensional convex quadratic functionf (x) = 1

2 x ′Cx .

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 28 / 75

Page 29: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

−50

5 −5

0

5−20

−10

0

10

20

x2

x1

f(x)

Figure: The surface of a non-convex two-dimensional quadratic functionf (x) = 1

2 x ′Cx . The point (x1, x2) = (0, 0) is a saddle point.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 29 / 75

Page 30: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

−10−10

−10 −10

−5

−5

−5

−5−5

−5

0

0

0

0 0

0

0

0

5

5

5

5

5

5

10

10

10

10

x1

x 2

−5 0 5−5

0

5

Figure: The contour lines of a non-convex two-dimensional quadratic functionf (x) = 1

2 x ′Cx . The point (x1, x2) = (0, 0) is a saddle point.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 30 / 75

Page 31: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

The contour lines of the convex function are concentric ellipsesand a sublevel set Lc is represented by the points inside someellipse.

The convex quadratic function is defined by the matrix,

C =

(

1 0.40.4 1

)

and the non-convex quadratic function is defined by the matrix,

C =

(

−1 0.40.4 1

)

.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 31 / 75

Page 32: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

A property of convex functions is that the sum of convex functionsis a convex function. As a result of the preceding analysis, thefunction

f (x) = λx ′Cx − a′x , (9)

where λ > 0 and C is a positive semidefinite matrix, is a convexfunction as a sum of two convex functions.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 32 / 75

Page 33: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex functions

Let us use the properties of convex functions in order to solve theunconstrained problem of minimizing the function in (9),

minx∈Rn

λx ′Cx − a′x

This function is differentiable and we can search for the globalminimum by solving the first-order conditions,

∇f (x) = 2λCx − µ = 0.

Therefore, the value of x minimizing the objective function equals

x0 =1

2λC−1µ,

where C−1 denotes the inverse of the matrix C.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 33 / 75

Page 34: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Quasi-convex functions

Besides convex functions, there are other classes of functionswith convenient optimal properties. An example of such a class isthe class of quasi-convex functions.

Formally, a function is called quasi-convex if all sublevel setsdefined in (7) are convex sets. Alternatively, a function f (x) iscalled quasi-convex if,

f (x1) ≥ f (x2) implies f (αx1 + (1 − α)x2) ≤ f (x1)

where x1 and x2 belong to the function domain, which should be aconvex set, and 0 ≤ α ≤ 1.

A function f is called quasi-concave if −f is quasi-convex.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 34 / 75

Page 35: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Quasi-convex functions

−2 −1 0 1 2−2

02

−1

−0.8

−0.6

−0.4

−0.2

x1

x2

f(x 1,x

2)

Figure: An example of a two-dimensional quasi-convex function f (x1, x2).Even though the sublevel sets are convex, f (x1, x2) is not a convex function.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 35 / 75

Page 36: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Quasi-convex functions

−0.8−0.7

−0.6

−0.6

−0.5

−0.5

−0.4−0.4

−0.4

−0.3

−0.3

−0.3

−0.3−0.3

−0.2

−0.2

−0.2

−0.2

−0.2

−0.2

−0.2

−0.2

−0.2

x1

x 2

−2 −1 0 1 2−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Figure: The contour lines of a two-dimensional quasi-convex functionf (x1, x2). Even though the sublevel sets are convex, f (x1, x2) is not a convexfunction.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 36 / 75

Page 37: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Quasi-convex functions

A sublevel set is represented by all points inside some contourline.

From a geometric viewpoint, the sublevel sets corresponding tothe plotted contour lines are convex because any of them containsthe straight line connecting any two points belonging to the set.

Nevertheless, the function is not convex which becomes evidentfrom the surface on the first plot. It is not guaranteed that astraight line connecting any two points on the surface will remain“above” the surface.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 37 / 75

Page 38: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Quasi-convex functions

Several properties of the quasi-convex functions:1 Any convex function is also quasi-convex. The converse is not true,

which is demonstrated in figures on the slides 35,36.2 In contrast to the differentiable convex functions, the first-order condition

is not necessary and sufficient for optimality in the case of differentiablequasi-convex functions.

3 It is possible to find a sequence of convex optimization problems yieldingthe global minimum of a quasi-convex function. Its main idea is to findthe smallest value of c for which the corresponding sublevel set Lc isnon-empty. The minimal value of c is the global minimum which isattained in the points belonging to the sublevel set Lc .

4 Suppose that g(x) > 0 is a concave function and f (x) > 0 is a convexfunction. Then the ratio g(x)/f (x) is a quasi-concave function and theratio f (x)/g(x) is a quasi-convex function.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 38 / 75

Page 39: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Constrained optimization

Solving practical issues, it is very often the case of imposingcertain constraints for the optimal solution. For example, long-onlyportfolio optimization problems require that the portfolio weights,which represent the variables in optimization, should benon-negative and should sum up to one.This corresponds to a problem of the type,

minx

f (x)

subject to x ′e = 1x ≥ 0,

(10)

where

f (x) is the objective functione ∈ R

n is a vector of ones, e = (1, . . . , 1)x ′e equals the sum of all components of x , x ′e =

∑ni xi

x ≥ 0 means that all components of the vector x ∈ Rn are

non-negative

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 39 / 75

Page 40: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Constrained optimization

In problem (10), we are searching for the minimum of the objectivefunction by varying x only in the set

X =

{

x ∈ Rn :

x ′e = 1x ≥ 0

}

, (11)

which is also called the set of feasible points or the constraint set.

A more compact notation, similar to the notation in theunconstrained problems, is sometimes used,

minx∈X

f (x)

where X is defined in (11).

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 40 / 75

Page 41: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Constrained optimization

We distinguish between different types of optimization problemsdepending on the assumed properties for the objective functionand the constraint set.

If the constraint set contains only equalities, the problem is easierto handle analytically. In this case, the method of Lagrangemultipliers is applied.

For more general constraint sets, when they are formed by bothequalities and inequalities, the method of Lagrange multipliers isgeneralized by the Karush-Kuhn-Tucker conditions (KKTconditions).

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 41 / 75

Page 42: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Constrained optimization

Like the first-order conditions we considered in unconstrainedoptimization problems, none of the two approaches lead tonecessary and sufficient conditions for constrained optimizationproblems without further assumptions.

One of the most general frameworks in which the KKT conditionsare necessary and sufficient is that of convex programming. Wehave a convex programing problem if the objective function is aconvex function and the set of feasible points is a convex set.

As important sub-cases of convex optimization, linearprogramming and convex quadratic programming problems areconsidered.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 42 / 75

Page 43: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Constrained optimization

In this part, we describe the following applications of constrainedoptimization:

The method of Lagrange multipliers which is often applied tospecial types of mean-variance optimization problems in order toobtain closed-form solutions.

The convex programming which is the framework for reward-riskanalysis.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 43 / 75

Page 44: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

Consider the following optimization problem in which the set offeasible points is defined by a number of equality constraints,

minx

f (x)

subject to h1(x) = 0h2(x) = 0. . .hk (x) = 0.

(12)

The functions hi(x), i = 1, . . . , k build up the constraint set.Remark: Even though the right hand-side of the equality constraints is zero in the classicalformulation of the problem given in (12), this is not restrictive. If in a practical problem the righthand-side happens to be different than zero, it can be equivalently transformed, for example:

{x ∈ Rn : v(x) = c} ⇐⇒ {x ∈ R

n : h1(x) = v(x) − c = 0}.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 44 / 75

Page 45: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

In order to illustrate the necessary condition for optimality valid for(12), let us consider the following two-dimensional example:

minx∈R212x ′Cx

subject to x ′e = 1.(13)

where the matrix is,

C =

(

1 0.40.4 1

)

.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 45 / 75

Page 46: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

The objective function is a quadratic function and the constraintset contains one linear equality.

The surface of the objective function and the constraint are shownon the plot on the nexr slide.

The black line on the surface shows the function values of thefeasible points. Geometrically, solving problem reduces to findingthe lowest point of the black curve on the surface.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 46 / 75

Page 47: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

−2

0

2 −2 −1 0 1 2

0

1

2

3

4

5

6

x2x

1

f(x 1,x

2)

Figure: The plot shows the surface of a two-dimensional quadratic objectivefunction and the linear constraint x1 + x2 = 1. The black curve on the surfaceshows the objective function values of the points satisfying the constraint.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 47 / 75

Page 48: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

0.5

0.5

0.5

0.50.51

1

1

1

1

11

1.5

1.5

1.5 1.5

1.5

1.5

1.51.52 2

2

2

2

22.5

2.5

2.5

2.5

3

3

3

3

3.5

3.5

4

4

4.5

4.5

5

5

x1

x 2

−2 −1 0 1 2−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Figure: The plot shows the tangential contour line to the constraintx1 + x2 = 1. The black dot indicates the position of the point in which theobjective function attains its minimum subject to the constraints.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 48 / 75

Page 49: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

The fact the minimum is attained where a contour line is tangentialto the curve defined by the non-linear equality constraints isexpressed in the following way:

The gradient of the objective function at the point yielding theminimum is proportional to a linear combination of the gradients ofthe functions defining the constraint set. Formally, this is stated as,

∇f (x0) − µ1∇h1(x0) − . . . − µk∇hk (x0) = 0. (14)

where µi , i = 1, . . . , k are some real numbers called Lagrangemultipliers and the point x0 is such that f (x0) ≤ f (x) for all x whichare feasible.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 49 / 75

Page 50: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

Note that if there are no constraints in the problem, then (14)reduces to the first-order condition. Therefore, the system ofequations behind (14) can be viewed as a generalization of thefirst-order condition in the unconstrained case.

The method of Lagrange multipliers basically associates afunction to the problem in (12) such that the first-order conditionfor unconstrained optimization for that function coincides with (14).

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 50 / 75

Page 51: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

The method of Lagrange multiplier consists of the following steps.

1. Given the problem in (12), construct the following function

L(x , µ) = f (x) − µ1h1(x) − . . . − µkhk (x) (15)

where µ = (µ1, . . . , µk ) is the vector of Lagrange multipliers.The function L(x , µ) is called the Lagrangian corresponding toproblem (12).

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 51 / 75

Page 52: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

2. Calculate the partial derivatives with respect to all components ofx and µ and set them equal to zero,

∂L(x , µ)

∂xi=

∂f (x)

∂xi−

k∑

j=1

µj∂hj(x)

∂xi= 0, i = 1, . . . , n

∂L(x , µ)

∂µm= hm(x) = 0, m = 1, . . . , k

(16)

Basically, the system of equations (16) corresponds to thefirst-order conditions for unconstrained optimization written for theLagrangian as a function of both x and µ, L : R

n+k → R.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 52 / 75

Page 53: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

3. Solve the system of equalities in (16) for x and µ.

Note that even though we are solving the first-order condition forunconstrained optimization of L(x , µ), the solution (x0, µ0) of (16)is not a point of local minimum or maximum of the Lagrangian. Infact, the solution (x0, µ0) is a saddle point of the Lagrangian.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 53 / 75

Page 54: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

The first n equations in (16) make sure that the relationshipbetween the gradients given in (14) is satisfied.

The following k equations in (16) make sure that the points arefeasible.

As a result, all vectors x solving (16) are feasible and the gradientcondition is satisfied in them. Therefore, the points which solvethe optimization problem (12) are among the solutions of thesystem of equations given in (16).

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 54 / 75

Page 55: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Lagrange multipliers

This analysis suggests that the method of Lagrange multipliersprovides a necessary condition for optimality.

Under certain assumptions for the objective function and thefunctions building up the constraint set, (16) turns out to be anecessary and sufficient condition.

ExampleIf f (x) is a convex and differentiable function and hi(x), i = 1, . . . , k areaffine functions, then the method of Lagrange multipliers identifies thepoints solving (12).Figures on the slide 47,48 illustrate a convex quadratic function subjectto a linear constraint. In this case, the solution point is unique.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 55 / 75

Page 56: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

The general form of convex programming problems is the following,

minx

f (x)

subject to gi(x) ≤ 0, i = 1, . . . , mhj(x) = 0, j = 1, . . . , k

(17)

where

f (x) is a convex objective functiong1(x), . . . , gm(x) are convex functions defining the inequality constraintsh1(x), . . . , hk (x) are affine functions defining the equality constraints

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 56 / 75

Page 57: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

Generally, without the assumptions of convexity, problem (17) ismore involved than (12) because besides the equality constraints,there are inequality constraints.

The KKT condition, generalizing the method of Lagrangemultipliers, is only a necessary condition for optimality in this case.However, adding the assumption of convexity makes the KKTcondition necessary and sufficient.

Note that, similar to problem (12), the fact that the right hand-sideof all constraints is zero is non-restrictive. The limits can bearbitrary real numbers.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 57 / 75

Page 58: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

Consider the following two-dimensional optimization problem

minx∈R2

12x ′Cx

subject to (x1 + 2)2 + (x2 + 2)2 ≤ 3(18)

in which

C =

(

1 0.40.4 1

)

.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 58 / 75

Page 59: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

The objective function is a two-dimensional convex quadraticfunction and the function in the constraint set is also a convexquadratic function.

In fact, the boundary of the feasible set is a circle with a radius of√3 centered at the point with coordinates (−2,−2).

The plots on the next slides show the surface of the objectivefunction, its contour lines and the set of feasible points.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 59 / 75

Page 60: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

−2 −1 0 1 2

−2

0

20

1

2

3

4

5

6

x1

x2

f(x 1,x

2)

Figure: The plot shows the surface of a two-dimensional convex quadraticfunction and a convex quadratic constraint. The shaded section on thesurface corresponds to the feasible points. Solving problem (18) reduces tofinding the lowest point on the shaded part of the surface.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 60 / 75

Page 61: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

0.5

0.50.5

0.5

0.5

1

1

1

1

1

1

1

1.5

1.5

1.5

1.5

1.5

1.5

1.51.5

2

2

2

2

2

2

x1

x 2

−2 −1 0 1 2−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Figure: The plot shows the tangential contour line to the feasible set, which is in gray.Geometrically, the point in the feasible set yielding the minimum of the objectivefunction is positioned where a contour line only touches the constraint set. Theposition of this point is marked with a black dot and the tangential contour line is givenin bold.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 61 / 75

Page 62: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

Note that the solution points of problems of the type (18) canhappen to be not on the boundary of the feasible set but in theinterior.

For example, suppose that the radius of the circle defining theboundary of the feasible set in (18) is a larger number such thatthe point (0, 0) is inside the feasible set.

Then, the point (0, 0) is the solution to problem (18) because atthis point the objective function attains its global minimum.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 62 / 75

Page 63: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

In the two-dimensional case, when we can visualize theoptimization problem, geometric reasoning guides us to findingthe optimal solution point.In a higher dimensional space, plots cannot be produced and werely on the analytic method behind the KKT conditions.The KKT conditions corresponding to the convex programmingproblem (17) are the following:

∇f (x) +m

i=1

λi∇gi(x) +k

j=1

µj∇hj(x) = 0

gi(x) ≤ 0 i = 1, . . . , m

hj(x) = 0 j = 1, . . . , k

λigi(x) = 0, i = 1, . . . , m

λi ≥ 0, i = 1, . . . , m.

(19)

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 63 / 75

Page 64: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

A point x0 such that (x0, λ0, µ0) satisfies (19) is the solution toproblem (17).

Note that if there are no inequality constraints, then the KKTconditions reduce to (16) in the method of Lagrange multipliers.Therefore, the KKT conditions generalize the method of Lagrangemultipliers.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 64 / 75

Page 65: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

The gradient condition in (19) has the same interpretation as thegradient condition in the method of Lagrange multipliers. The setof constraints,

gi(x) ≤ 0 i = 1, . . . , m

hj(x) = 0 j = 1, . . . , k

guarantee that a point satisfying (19) is feasible.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 65 / 75

Page 66: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Convex programming

The next conditions

λigi(x) = 0, i = 1, . . . , m

are called complementary slackness conditions.

If an inequality constrain is satisfied as a strict inequality, then thecorresponding multiplier λi turns into zero according to thecomplementary slackness conditions.

Then the corresponding gradient ∇gi(x) has no significance in thegradient condition. This reflects the fact that the gradient conditionconcerns only the constraints satisfied as equalities at the solutionpoint.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 66 / 75

Page 67: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Linear programming

Optimization problems are said to be linear programmingproblems if the objective function is a linear function and thefeasible set is defined by linear equalities and inequalities.

Since all functions are linear, they are also convex which meansthat linear programming problems are also convex problems.

The definition of linear programming problems in standard form isthe following:

minx

c′x

subject to Ax ≤ bx ≥ 0,

(20)

where A is a m × n matrix of coefficients, c = (c1, . . . , cn) is avector of objective function coefficients, and b = (b1, . . . , bm) is avector of real numbers. As a result, the constraint set contains minequalities defined by linear functions.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 67 / 75

Page 68: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Linear programming

The feasible points defined by means of linear equalities andinequalities are also said to form a polyhedral set.

Figure on the next slide shows an example of a two-dimensionallinear programming problem which is not in standard form as thetwo variables may become negative.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 68 / 75

Page 69: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Linear programming

−2

0

2 −2

0

2

0

2

4

6

8

x2x

1

f(x 1,x

2)

Figure: The plot shows the surface of a linear function and a polyhedralfeasible set. The shaded section on the surface corresponds to the feasiblepoints. Solving problem (20) reduces to finding the lowest point in the shadedarea on the surface.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 69 / 75

Page 70: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Linear programming

1

2

2

3

3

3

4

4

4

45

5

5

6

6

7

x1

x 2

−2 −1 0 1 2−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Figure: The plot shows the tangential contour line to the feasible set. Thecontour lines are parallel straight lines because the objective function islinear. The point in which the objective function attains its minimum is markedwith a black dot.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 70 / 75

Page 71: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Linear programming

A general result in linear programming is that, on condition thatthe problem is bounded, the solution is always at the boundary ofthe feasible set and, more precisely, at a vertex of the polyhedron.

Problem (20) may become unbounded if the polyhedral set isunbounded and there are feasible points such the objectivefunction can decrease indefinitely.We can summarize that, generally, due to the simple structure of(20), there are three possibilities:

1 The problem is not feasible, because the polyhedral set is empty2 The problem is unbounded3 The problem has a solution at a vertex of the polyhedral set

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 71 / 75

Page 72: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Linear programming

The polyhedral set has a finite number of verices and an algorithmcan be devised with the goal of finding a vertex solving theoptimization problem in a finite number of steps.

This is the basic idea behind the simplex method which is anefficient numerical approach to solving linear programmingproblems. Besides the simplex algorithm, there are other morecontemporary methods such as the interior point method forexample.Application of linear programming:

A few classes of practical problems which are solved by themethod of linear programming include the transportation problem,the transshipment problem, the network flow problem and so on.1.

1Dantzig (1998) provides an excellent background on the theory and application oflinear programing

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 72 / 75

Page 73: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Quadratic programming

Another class of problems is quadratic programming problems.It contains optimization problems with a quadratic objective functionand linear equalities and inequalities in the constraint set,

minx

c′x + 12x ′Hx

subject to Ax ≤ b,(21)

where

c = (c1, . . . , cn) is a vector of coefficients defining the linear part ofthe objective function

H = {hij}ni,j=1 is a n × n matrix defining the quadratic part of the

objectiveA = {aij} is a k × n matrix defining k linear inequalities in the

constraint setb = (b1, . . . , bk ) is a vector of real numbers defining the right hand-

side of the linear inequalities

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 73 / 75

Page 74: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Quadratic programming

In optimal portfolio theory, mean-variance optimization problemsin which portfolio variance is in the objective function are quadraticprogramming problems.

From the point of view of optimization theory, problem (21) is aconvex optimization problem if the matrix defining the quadraticpart of the objective function is positive semidefinite. In this case,the KKT conditions can be applied to solve it.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 74 / 75

Page 75: Lecture 2: Optimization - KIT · PDF fileLecture 2: Optimization Prof. Dr. Svetlozar Rachev Institute for Statistics and Mathematical Economics University of Karlsruhe Portfolio and

Svetlozar T. Rachev, Stoyan Stoyanov, and Frank J. FabozziAdvanced Stochastic Models, Risk Assessment, and PortfolioOptimization: The Ideal Risk, Uncertainty, and PerformanceMeasuresJohn Wiley, Finance, 2007.

Chapter 2.

Prof. Dr. Svetlozar Rachev (University of Karlsruhe) Lecture 2: Optimization 2008 75 / 75