CS代写 Lecture 3: An optimization example

Lecture 3: An optimization example
ISyE 6673: Financial Optimization

H. School of Industrial and Systems Engineering Georgia Institute of Technology

Copyright By PowCoder代写 加微信 powcoder

August 29, 2022

Optimization example Problem setup and model
Problem setup and model
Dr. ISyE 6673: Financial Optimization August 29, 2022 2 23

Optimization example Problem setup and model
A short-term financing problem
Your company has the following short-term financing problem (in thousands of dollars):
You have access to the following funding sources:
• You can access a line of credit of up to $100k at 1% interest per month
• You can issue 90-day commercial paper bearing a total interest of 2% over the 3-month period (can only issue in the first three months)
• Each month you can invest excess funds at an interest rate of 0.3% per month
Net Cash Flow
(+ is revenue, − is payment)
Dr. ISyE 6673: Financial Optimization August 29, 2022 3 23

Optimization example Problem setup and model
Optimization model
• Step 1: What are the decision variables?
xi is the amount borrowed from the line of credit in month i = 1,…,5 yi is the amount of commercial paper issued in month i = 1, 2, 3
zi is the surplus funds available at the end of month i = 1,…,6
• Step 2a: What are the variable bounds? 0≤xi ≤100fori=1,…,5
yi ≥0fori=1,2,3 zi ≥0 for i =1,…,6
• Step 2b: What are the constraints? (surplus = money in − money out)
Month 1: z1 = x1 + y1 − 150
Month2: z2 =x2 +y2 +1.003z1 −1.01×1 −100 Month3: z3 =x3 +y3 +1.003z2 −1.01×2 +200 Month 4: z4 = x4 + 1.003z3 − 1.01×3 − 1.02y1 − 200 Month 5: z5 = x5 + 1.003z4 − 1.01×4 − 1.02y2 + 50 Month 6: z6 = 1.003z5 − 1.01×5 − 1.02y3 + 300
• Step 3: What is the objective? max z6
Dr. ISyE 6673: Financial Optimization August 29, 2022 4 23

Optimization model
Optimization example Problem setup and model
max z6 s.t.
−x4 + 1.02y1
−x5 + 1.02y2
+1.01×1 −1.003z1
+1.01×2 −1.003z2
+1.01×3 −1.003z3
+1.01×4 −1.003z4
+1.01×5 −1.003z5
+z1 = −150 +z2 = −100 +z3 = 200 +z4 = −200 +z5 = 50 +z6 = 300
xi ≤ 100 xi ≥ 0 yi ≥ 0 zi ≥ 0
∀i = 1,…,5 ∀i = 1,…,5 ∀i = 1,…,3 ∀i = 1,…,6
Dr. ISyE 6673: Financial Optimization August 29, 2022 6 23

Optimization example Problem setup and model
Solving the optimization model in Excel
• Excel Solver demo
Dr. ISyE 6673: Financial Optimization August 29, 2022 7 23

Optimization example Examining the optimal solution
Examining the optimal solution
Dr. ISyE 6673: Financial Optimization August 29, 2022 8 23

Optimal solution
Optimization example Examining the optimal solution
• The 90-day commercial paper is mostly preferable to the line of credit, hence why we issue a lot in March (last opportunity to do so)
• Optimal final surplus is $92,497 and it’s impossible to do better
• Big surplus at the end of March is invested to meet April payment and repay the January 90-day loan.
Dr. ISyE 6673: Financial Optimization August 29, 2022 9 23

Optimization example Examining the optimal solution
Sensitivity analysis
You bring the optimal financing plan to your manager, feeling very proud… as you well should!
After all, you found an optimal solution!
Curveball!
Your manager asks you:
• What if our January payment was $200k instead of $150k?
• What if our March revenue was $250k instead of $200k?
• The negative cash flow in January is because we are purchasing a $100k imaging device. The vendor just called and offered us to defer payment by 6 months at a 4% interest rate. Should we take the deal?
Your reaction
Dr. ISyE 6673: Financial Optimization August 29, 2022 10 23

Optimization example Examining the optimal solution
Sensitivity analysis
• Possible solution: maybe I can just re-solve the optimization problem for all the possible inputs my manager asks about?
• Yes, but because our problem is a linear program, we can do better!
There is a lot of “what-if” information in the sensitivity report!
Dr. ISyE 6673: Financial Optimization August 29, 2022 11 23

Optimization example Sensitivity report
Sensitivity report
Dr. ISyE 6673: Financial Optimization August 29, 2022 12 23

Shadow prices of constraints
Optimization example Sensitivity report
How to read the report:
• One row per constraint gi(x,y,z) ≤ bi
• Final value is the value of gi(·) (“left-hand side”) when we plug in the optimal decision variable values
• Constraint “right-hand side” is bi
• The “shadow price” tells us the sensitivity of the optimum to a change in the constraint right-hand side!
Dr. ISyE 6673: Financial Optimization August 29, 2022 13 23

Optimization example Sensitivity report
Shadow prices of constraints
Theorem (Linear programming sensitivity analysis)
If the right-hand side of a constraint with shadow price u changes by an amount ∆, the optimal objective value changes by u · ∆, as long as ∆ is within a certain range.
Dr. ISyE 6673: Financial Optimization August 29, 2022 14 23

Optimization example Sensitivity report
The power of shadow prices
Q1: What if our January payment was $200k instead of $150k? • Shadow price of January constraint is 1.0373
• $50k is less than the allowable decrease ($89k)
• 50 · 1.0373 = 51.865
• Answer: Our June surplus would decrease by $51,865
Dr. ISyE 6673: Financial Optimization August 29, 2022 15 23

Optimization example Sensitivity report
The power of shadow prices
Q2: What if our March revenue was $250k instead of $200k? • Shadow price of March constraint is 1.02
• $50k is less than the allowable increase
• 50·1.02=51
• Answer: Our June surplus would increase by $51,000
Dr. ISyE 6673: Financial Optimization August 29, 2022 16 23

Optimization example Sensitivity report
The power of shadow prices
Q3: The negative cash flow in January is because we are purchasing a $100k imaging device. The vendor just called and offered us to defer payment by 6 months at a 4% interest rate. Should we take the deal?
• Shadow price of January constraint is 1.0373
• Reducing cash requirements by $1 in January increases wealth by
$1.0373 in June
• “Break-even” interest rate is 3.73% (and $100k is allowable increase)
• Answer: No, we should not accept the deal (net loss $270).
Dr. ISyE 6673: Financial Optimization August 29, 2022 18 23

Your manager’s next query
Optimization example Sensitivity report
• You answered your manager’s questions! Good job! • However, your manager is still dubious.
Our financing problems are similar year-to-year and we usually take out big loans in January. Are you sure we aren’t better off with- drawing more from the line of credit in January?
Ugh, another curveball. But it turns out the sensitivity report can answer that question as well!
Dr. ISyE 6673: Financial Optimization August 29, 2022 20 23

Optimization example Sensitivity report
Reduced costs of variables
• One row per decision variable
• The “reduced cost” of a zero decision variable tells you by how much
the objective changes if the decision variable value increases
• Each dollar we borrow from the line of credit in January decreases our final wealth by $3.2
Dr. ISyE 6673: Financial Optimization August 29, 2022 21 23

Optimization example From Excel to Excel to . ISyE 6673: Financial Optimization August 29, 2022 22 23

From Excel to example From Excel to Julia
• Julia/JuMP demo
Dr. ISyE 6673: Financial Optimization August 29, 2022 23 23

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com