Explore BrainMass

integer linear program

(See attached file for full problem description)

The following table is a list of all of the stocks that you have in your stock portfolio. The original purchase price, current price and your best guess for the "anticipated" price (one year into the future) is given below:
Share Price ($)
Stock # Shares Owned Purchase Current Expected In One Year
1 234 20 30 36
2 272 25 34 39
3 106 30 43 42
4 452 35 47 45
5 486 40 49 51
6 359 45 53 55
7 345 50 60 63
8 419 55 62 64
9 255 60 64 66
10 264 65 66 70

Assume that the capital gains tax rate on long term profits is 20%. In addition, selling shares incurs a transaction cost of 1% of the sale proceeds.
Suppose that you need at least $30,000 in cash today. As such, you must sell off some of your stocks.
Create an integer linear program that tells you how many shares of which stock to sell in order to get the cash you need such that the anticipated future portfolio value of the remaining stocks is maximized.
Let xi be the number of shares of stock I sell

! The objective;
[OBJECTIVE] MAX = (36-20)*(234-x1)+ (39-25)*(272-x2)+ (42-30)*(106-x3)+(45-35)*(452-x4)+ (51-40)*(486-x5)
+(55-45)*(359-x6)+(63-50)*(345-x7)+(64-55)*(419-x8)+ (66-60)*(255-x9)+ (70-65)*(264-x10);


@GIN (x1);
@GIN (x2);
@GIN (x3);
@GIN (x4);
@GIN (x5);
@GIN (x6);
@GIN (x7);
@GIN (x8);
@GIN (x9);
@GIN (x10);



Solution Preview

See attached

Let xi be the number of shares of stock I sell
The objective we want to maximize is the value of remaining stocks, therefore for stock i, its value = (number of stocks left) * (the difference between expected price and the purchase price). So we have the following objective:
(36-20)*(234-x1)+ (39-25)*(272-x2)+ (42-30)*(106-x3)+(45-35)*(452-x4)+ (51-40)*(486-x5)+(55-45)*(359-x6)+(63-50)*(345-x7)+(64-55)*(419-x8)+ (66-60)*(255-x9)+ (70-65)*(264-x10), which can be simplified as:
16 (234-x1)+ 14 (272-x2)+ 12 (106-x3)+ 10 (452-x4)+ 11 (486-x5)
+10 (359-x6)+13 (345-x7)+ 9 (419-x8)+ 6 (255-x9)+ 5 (264-x10), or by adding the constants ...

Solution Summary

The solution creates an integer linear program from a general linear model.