Search⌘ K
AI Features

Challenge: Constrained Optimization

Explore how to model and solve a constrained portfolio optimization problem by maximizing diversity while ensuring a minimum average return. Understand formulating the problem mathematically with constraints and using entropy maximization. Learn to implement and solve the optimization using appropriate methods, bridging theory with practical investment scenarios.

Problem statement

Suppose you have $10000 to invest in the stock market and you want to diversify your portfolio among three different stocks: Stock 1 (STK1), Stock 2 (STK2), and Stock 3 (STK3). You have the following information on the expected return of these three stocks based on their five-year compound annual growth rate (CAGR):

Stock (xi)

Expected Return in % (μi)

STK1

15

STK2

12

STK3

25

Mathematical formulation

Assuming that x1,x2,x3x_1,x_2,x_3 denote the fraction of each stock (STK1, STK2, STK3) in the portfolio, you will want to maximize the diversity of the portfolio given by the following function:

subject to the following constraints:

  • 15x1+12x2+25x3μ15x_1 + 12x_2 + 25x_3 \geq \mu : Ensuring an average portfolio return of μ\mu % per year

  • x1,x2,x30x_1, x_2, x_3 \geq 0 ...