Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CO 372: Portfolio Optimization Models

Winter 2023

Problem Set 6

S. Vavasis

Handed out: 2023-03-13.

Due:  Wed 2023-04-05 at 4 pm EDT. Papers must be handed in on-line using the labeled dropbox on Crowdmark.  Each question is handed in as a separate upload.  You can either prepare your solutions electronically using, e.g., LaTeX, upload handwritten images from a tablet device, or hand-write them and submit a scan.  In the latter case, please take care that the scan is of good quality with a white background.

1.  Consider a discrete probability distribution for the return of an investment of $1 after one year.   Recall the definition of Fβ (1,α) provided in lecture and taken from the Rockafellar-Uryasev paper:

N

Fβ (1,α) = α + β [1 ri − α]+pi .

Show that Fβ (1,α), when regarded as a function of α, is piecewise linear and convex. Derive explicit formulas for all breakpoints  (b1 ,v1 ), (b2 ,v2 ), . . . as well as end-slopes sL ,sR . Assume r1  < ··· < rN .

2.  Consider the (Pr3\\\ ) formulation of the CAPM model provided in lecture and also in the second bullet of Slide 7 of M42. Recall that H+  = (0T(H)     0(0) ) where H is positive definite.

(a) Convert the problem on Slide 7 of M42 to QP using the introduction of un  as in M43 to replace τn (xn ). Let (Pr34 ) be the name for this problem, whose variables are x1 , . . . ,xn ,un  (or ,xn ,un ).

Note: there is a slight discrepancy between lecture notation and M42; use τn (xn ) for the transaction cost instead of tn (xn ), and assume the weight t\  on transaction costs is equal to 1 and so may be omitted.

(b) Write the KKT conditions for (Pr34 ). As usual, please label the four parts. Note: there are n + 1 primal variables, so the gradient equation should involve vectors of length n + 1.

(c) [BONUS: 2 pts.  The bonus cannot be used outside of PS6.  I do not know of a short answer to this part.] Show that the case xn  < 0 cannot occur at the optimizing solution of (Pr34 ) provided that cn(−)  is sufficiently large (depending on the problem data H,t, r¯,rf ).


(d) By comparing the KKT conditions of (Pr34 ) to the KKT conditions developed in PS4Q4, show that an optimizer ( ,xn ) of (Pr34 ) is also an optimizer of (Pr3\\ ) as it appears in PS4Q4.  Assume cn(−)  > 0.  In light of part (c), you may assume for solving this part of the question that the optimizer of (Pr34 ) satisfies xn  ≥ 0.

3.  Consider an objective function of the form min t(ax + b), where t is a scalar variable and x ∈ Rn  is a vector variable. Here, a ∈ Rn / {0} is a given vector and b is a given scalar. (This question is in relation to the problem on Slide 6 of M46.)

(a) Show that this can be written in the form min uT Hu/2 + gu, where u = [t;x] and H ∈ S(n+1)  (symmetric) and g ∈ Rn+1  are given by formulas that you provide in your answer.

(b) Show that the matrix H from part (a) is not positive semidefinite by exhibiting a vector d ∈ Rn+1  such that dT Hd < 0.

4.  Consider a transaction fee structure as follows for a particular security.  The broker charges c commission (positive) per dollar of security i that is short-sold. The broker charges d per (positive) dollar of security i that is purchased up to a purchase amount of $10,000. For a purchase over $10,000, the broker offers a discount. The charge for a purchase x that exceeds $10,000 is d · 10000+e(x−10000). In other words, the charge

is:

  cx,                                        x ≤ 0,

f(x) =   dx,                                         x [0, 10000],

( d · 10000 + e(x − 10000),   x ≥ 10000.

Here, the coefficients satisfy c > 0, 0 < e < d.

(a) This is a piecewise linear nonconvex function. Explain why it is nonconvex.

(b) Suppose this transaction cost appears as a term in the objective function (mini- mization) of an optimization problem. Model this cost with nonlinear programming in which all constraints and terms are smooth functions via the introduction of auxiliary variables and constraints. Explain why your solution works.

Suggested approach for (b): introduce a variable u as in Slide 14 of M43.  One of the constraints on u should involve a nonlinear term with a variable t constrained to lie in [0, 1] similar to Slide 6 of M46. An expression of the form l(x) + tm(x) can be used to switch between two linear functions as in M46.

5. In this question, you will make a plot of the efficient frontier for SCQP. Instead of using the SCQP solver from PS5, you should use Matlab’s quadprog function in order to gain experience with a general-purpose quadratic programming solver.      

Write a function called plot_eff_frontier_scqp with the following header:

function plot_eff_frontier_scqp(H,  rbar,  t_range)


This function takes as input H and r¯ and a vector of t-values.  For each t value the function should solve minxT Hx/2 − tr¯T x subject to ex = 1, x ≥ 0. Then it should compute x  HxT  and r¯T x for the optimizing x and save these in vectors.  Finally, it should make a plot of risk versus return from the two vectors. Use line-style ’-*g’ so that the points and the connecting segments are both displayed.

Read the documentation (type doc  quadprog) to learn how quadprog works.  Note that there are two ways to handle the sign constraints: either with quadprog’s linear inequalities or with its lower bounds. Either is OK.

Download the PS3 data file with H and r¯ .  Run your code with t_range set to 20 equally spaced points in [0, 10000] (use linspace).

My plot did not exhibit 20 distinct points. Count the number of points in your plot. If it is fewer than 20, explain why. (Examine the vectors produced by Matlab to explain this. A mathematical analysis is not required.)

Hand in: a list of your function and the requested plot.