You are on page 1of 6

ISyE 6669 HW 1

Fall 2021

1. Consider the following maximization problem


max (x − 1)2 + (y − 1)2
s.t. |x| + |y| ≤ 1.
Plot the feasible region of this problem with the feasible area shaded.
Draw (in dashed lines) the contours of the objective function. Based on
your drawing, find all the optimal solutions and the optimal objective
value of this problem. There may be multiple optimal solutions. Find all
optimal solutions.
Ans 1.

The plot above was created using python. The feasible region is shaded in light
purple. The contours of objective function are drawn as dashed lines.
The optimal solutions: is shown using green cross marks. The optimal solutions
(x, y) are (-1,0) and (0, -1).
The optimal objective value for both the optimal solutions is 5. (Obtained after
inputting x and y values from above optimal solutions into objective function
(x − 1)2 + (y − 1)2 ).
Ans:
Ans:
3. Consider the following optimization problem:
(P ) max x(y 2 − z 2)
s.t. |y| + z ≤ 1,

x ∈ {0, 1}, z ≥ 0.
Answer the questions:
(a) Is (P) a linear program, a mixed integer nonlinear program, or a
mixed integer quadratic program? Choose all descriptions that apply.

Ans: Objective function is Mixed integer quadratic program as the objective


function is Quadratic and subject to the constraint of taking an integer value.
(b) Write a minimization problem that is equivalent to (P).
Ans: The minimization problem is:
Min: -x(y2-z2)
s.t. |y|+z<=1,
x ∈{0,1}, z >=0
(c) Find all the optimal solutions.
(d)

4. Recall the portfolio optimization problem solved in Module 2, Lesson 3.


Now, collect the prices of MSFT, V, and WMT from the last 24 months
(data can be collected from e.g. Yahoo Finance). Use the code and data file
format used in the lesson (this will be provided) to solve the exact same
portfolio problem using the new data. Compare and contrast your solution
to the one in the lesson.

Ans:
As specified in the question, I acquired the data for the last two years from
Yahoo Finance, spanning from '2022-01-01' to '2024-01-01'. The maximum
expected return, attainable by fully investing in Microsoft, is 0.011426 or
1.14%. Consequently, the selected threshold for the expected return is
established at 0.0114, a significantly lower value compared to the previously
defined threshold of 2% based on historical data in a prior solution.

When optimizing with this adjusted threshold, the outcomes propose


allocating 99.19% of the investment in Microsoft, 0.81% in Walmart, and
completely disregarding Visa. This portfolio configuration results in a risk of
0.070131, which surpasses the risk value of 0.038 obtained in the solution in
the lesson. The return on investment from MSFT, V, and WMT stocks is 1.14%,
which is lower than the 2% return in the solution presented in the lesson.

The solution for the code is :


The code is :
1

You might also like