1. Phat Chau 1
Phat Chau
Project (Extra Credit)
Math 464
Portfolio Investment
Linear Programming
2. Phat Chau 2
Abstract:
In this project, an investor and a financial advisor are creating the stock portfolio to invest
$200,000. Together, they will invest $200,000 by buying shares in 3 companies (Humana, Apple
and JP-Morgan). The financial advisor uses the non-linear (quadratic) programming to minimize
the portfolio risk at the same return. In order to achieve this goal, he starts to collect the historical
data for each stock from the yahoo finance. Then, he uses the expected return and variance of
each stock, and covariance to create the non-linear programming formulation. His goal is
minimizing the portfolio variance because he does not only want to earn the rate of return for his
choice but also he wants to reduce the risk from his portfolio
Technique Analyst: Excel Solver – Non Linear Programming (The Variance of the portfolio is
written as non-linear equation)
Data Summary:
The expected return is 2.30% per month, 1.70% per month and 1.25% per month for investing in
Humana, Apple and JP-Morgan respectively. The standard deviation is measured the risk to
invest in each stock. We assume the individual stock is normal distribution. Humana stock has
higher risk than Apple Stock and JP-Morgan stock because it has the highest standard deviation
Plan:
Experience 1: Minimize the portfolio Variance and set the portfolio return is greater than 2%
Experience 2: Set the weight is less 0.5 in the constraint
Experience 3: Maximize the portfolio Return and set the Variance is greater than 0
Monthly Return
Expected
Return
Standard
Deviation
Humana 0.023011859 0.080830099
Apple 0.01746576 0.073930342
JPMorgan 0.012517624 0.074812573
Covariance Matrix
HUM APPLE JPMorgan
HUM 0.006533505 0.000936432 0.000936432
APPLE 0.000936432 0.005465695 0.001419815
JPMorgan 0.001692422 0.001419815 0.005596921
3. Phat Chau 3
General Equations for 3-Stock Portfolio Expected Return and Standard Return
Objective: 𝑀𝑖𝑛 Variance(Rp) = ∑ 𝑊𝑖23
1 𝜎2
+ 2 ∑ ∑ 𝑊𝑖 ∗ 𝑊𝑗 ∗ 𝐶𝑜𝑣(𝑊𝑖, 𝑊𝑗)3
𝑗=𝑖+1
3
𝑖=1
Constraints:
E[Rp] = ∑ 𝑊𝑖 ∗ 𝐸[𝑅𝑖] ≥ 0.023
𝑖=1
∑ 𝑊𝑖 = 13
𝑖=1 and i = 1,2 and 3
𝑙𝑜𝑤𝑒𝑟 𝑏𝑜𝑢𝑛𝑑 ≤ 𝑊𝑖 ≤ 𝑢𝑝𝑝𝑒𝑟 𝑏𝑜𝑢𝑛𝑑
Lower-bound and Upper-bound ≤ 1
Let W1 is the Weight of Humana
Let W2 is the Weight of Apple
Let W3 is the Weight of JPMorgan
Experience 1:
The investor is required to earn at least 2% per month from his portfolio
Objective:
Min Var(P) = 0.006533505 W1^2 + 0.005465695 W2^2 + 0.005596921 W3^2 + 0.001873 W1*W2 +
0.0284 W2*W3 + 0.003385 W1 * W3
Constraint:
0.023011859 W1 + 0.01746576 W2 + 0.012517624 W3 ≥ 0.02
W1 + W2 + W3 = 1
0<= W1, W2, W3
Solution:
W1-HUM 53% $ 105,684 Variance 0.003285607
W2-APPLE 39% $ 78,291 Standard Derivation 5.73%
W3-Jpmorgan 8% $ 16,025
After looking at the report from the linear programming, the financial advisor suggests the investor
spend $105684, $ 78291 and $16025 to buy the shares of Humana, Apple and JP-Morgan respectively
in order to earn at least 2% per month from his portfolio. Also, we can see that the standard derivation
has reduced significantly.
4. Phat Chau 4
Experience 3: (Optional)
Maximize the profit and required the Variance is greater than 0
Objective:
MAX 0.023011859 W1 + 0.01746576 W2 + 0.012517624 W3
Constraint:
0.006533505 W1^2 + 0.005465695 W2^2 + 0.005596921 W3^2 + 0.001873 W1*W2 + 0.0284
W2*W3 + 0.003385 W1 * W3 ≥ 0
W1 + W2 + W3 = 1
0<= W1, W2, W3
W1-HUM 100% $ 200,000 Variance 0.006533518
W2-APPLE 0% $ - Standard Derivation 8.08%
W3-Jpmorgan 0% $ - Return 0.023011882
In this case, the investor accepts the higher risk in order to get the higher return. From the data
summary, we can see that the rate of return and the standard derivation of Humana stock is
higher than Apple stock and JP-Morgan stock. From the experience 3, it suggests investment of
all of the money to buy Humana stock in order to get the greater return even though the risk is
slightly higher.
Experience 2:
Additional Condition: at most of each weight is less than 50%
Objective:
Min Var(P) = 0.006533505 W1^2 + 0.005465695 W2^2 + 0.005596921 W3^2 + 0.001873 W1*W2 +
0.0284 W2*W3 + 0.003385 W1 * W3
Constraint:
0.023011859 W1 + 0.01746576 W2 + 0.012517624 W3 ≥ 0.02
W1 + W2 + W3 = 1
0 ≤W1, W2, W3 ≤0.5
Solution:
W1-HUM 50% $ 100,000 Variance 0.003310144
W2-APPLE 45% $ 90,347 Standard Derivation 5.75%
W3-Jpmorgan 5% $ 9,653
After looking at the report from the linear programming, the financial advisor suggests that the
investor spend $100000, $ 90347 and $9653 to buy the shares of Humana, Apple and JP-Morgan
respectively in order to earn at least 2% per month from his portfolio. Also, we can see that the
standard derivation has reduced significantly.
5. Phat Chau 5
Conclusion:
The rate of return and standard derivation are used to measure the optimal portfolio. In the
finance field, the investor is required to choose the maximum return in the portfolio with the
lower risk rather than the higher risk. In this case, we formulate optimal portfolio to analyze the
lower risk with the same return. However, some of the investors are willing to accept the higher
risk in order to earn the higher return. According to the Data Summary and the experience 3, we
can see that the financial advisor suggested that the investor use 100% of his money to buy
Humana stock. From the experience 1 and 2, we can see that the standard deviation is smaller
than each of the individual stock. Also, the investor still earns 2 % return from his portfolio even
though the risk is smaller. As a result, when the investor chooses to invest more than 2 stocks,
the standard derivation of the portfolio is reduced.
6. Phat Chau 6
Appendix
JP MORGAN
Mean 0.012517624
Standard Error 0.008878619
Median 0.022020219
Mode #N/A
Standard Deviation 0.074812573
Sample Variance 0.005596921
Kurtosis 1.213948344
Skewness -0.609042345
Range 0.400474392
Minimum -0.228710981
Maximum 0.171763411
Sum 0.888751272
Count 70
Largest(3) 0.134224487
Smallest(3) -0.125442276
Confidence Level(95.0%) 0.017707847
APPLE
Mean 0.01746576
Standard Error 0.008836366
Median 0.009877264
Mode #N/A
Standard Deviation 0.073930342
Sample Variance 0.005465695
Kurtosis -0.204827848
Skewness -0.020395291
Range 0.332399977
Minimum -0.144089308
Maximum 0.188310669
Sum 1.222603177
Count 70
Largest(3) 0.163285323
Smallest(3) -0.118293218
Confidence Level(95.0%) 0.017628068
HUMANA
Mean 0.023011859
Standard Error 0.009661045
Median 0.016443271
Mode #N/A
Standard Deviation 0.080830099
Sample Variance 0.006533505
Kurtosis 1.35848733
Skewness 0.22289589
Range 0.500741112
Minimum -0.204545536
Maximum 0.296195576
Sum 1.610830148
Count 70
Largest(3) 0.160230869
Smallest(3) -0.119294368
Confidence Level(95.0%) 0.019273257
7. Phat Chau 7
Objective Cell (Min)
Experience 1
Cell Name
Original
Value Final Value
$G$8
MIN Variance of
Portfolio 0.003177563 0.003285608
Variable Cells
Cell Name
Original
Value Final Value Integer
$K$4 W1-HUM 0.535106404 0.528422383 Contin
$K$5 W2-APPLE 0.277298796 0.391455478 Contin
$K$6 W3-Jpmorgan 0.187595801 0.080123139 Contin
Constraints
Cell Name Cell Value Formula Status Slack
$B$11 Portfolio Return W1 0.02 $B$11>=0.02 Binding 0
$K$7 Total 1.000001 $K$7=1 Binding 0
Objective Cell (Min) Experience 2
Cell Name
Original
Value Final Value
$G$8
MIN Variance of
Portfolio 0.003285608 0.003310144
Variable Cells
Cell Name
Original
Value Final Value Integer
$K$4 W1-HUM Variable 0.528 0.500 Contin
$K$5 W2-APPLE Variable 0.391 0.452 Contin
$K$6 W3-Jpmorgan Variable 0.080 0.048 Contin
Constraints
Cell Name Cell Value Formula Status Slack
$B$11 Portfolio Return W1 0.02 $B$11>=0.02 Binding 0
$K$7 Total Variable 1.0 $K$7=1 Binding 0
$K$4 W1-HUM Variable 0.500 $K$4<=0.5 Binding 0
$K$5 W2-APPLE Variable 0.452 $K$5<=0.5
Not
Binding 0.048265038
$K$6 W3-Jpmorgan Variable 0.048 $K$6<=0.5
Not
Binding 0.451733962
8. Phat Chau 8
Objective Cell (Max) Experience 3
Cell Name
Original
Value Final Value
$B$11 Porfolio Return W1 0.023011882 0.023011882
Variable Cells
Cell Name
Original
Value Final Value Integer
$K$4 W1-HUM Variable 1.000 1.000 Contin
$K$5 W2-APPLE Variable 0.000 0.000 Contin
$K$6 W3-Jpmorgan Variable 0.000 0.000 Contin
Constraints
Cell Name Cell Value Formula Status Slack
$G$8 MIN Variance of Porfolio 0.006533518 $G$8>=0
Not
Binding 0.006533518
$K$7 Total Variable 1.0 $K$7=1 Binding 0
References
Parnes Dror, Investment Analysis, Finance 427 (class note)
Chuck Munson, Business Modeling with Spreadsheets, MGTOP 470 (class note)