You are on page 1of 23

1

Decision Models and Analytics

03 Bond Portfolio Optimization


Professor Jiawei Zhang
Agenda 2

The bond portfolio optimization problem

Linear programming formulation

Spreadsheet model

Solver

Reading from Optimization Modeling


• Chapter 2.3 and 2.4

Templates: InvestmentProblem_Template.xlsx
An Investment Problem 3

Brian Givens is a financial analyst for Retirement Planning Services, Inc. who
specializes in designing retirement income portfolios for retirees using
corporate bonds.

He has just completed a consultation with a client who expects to have


$750,000 in liquid assets to invest when she retires next month.

Brian and his client agreed to consider upcoming bond issues from the
following six companies:
– the annual yield on each bond
– the length of time over which the bonds will be payable
– an independent under-writer’s assessment of the quality or risk
associated with each issue.

Company Return Years to Maturity Rating


Acme Chemical 8.65% 11 1-Excellent
DynaStar 9.50% 10 3-Good
Eagle Vision 10.00% 6 4-Fair
MicroModeling 8.75% 10 1-Excellent
OptiPro 9.25% 7 3-Good
Sabre Systems 9.00% 13 2-Very Good
An Investment Problem 4

Brian believes that all of the companies are relatively safe investments.

However, to protect his client’s income, Brian and his client agreed that
– no more than 25% of her money should be invested in any one
investment
– at least half of her money should be invested in long-term bonds that
mature in 10 or more years.
– even though DynaStar, Eagle Vision, and OptiPro offer the highest
returns, it was agreed that no more than 35% of the money should be
invested in these bonds because they also represent the highest risks
(that is, they were rated lower than “very good”).

Brain needs to determine how to allocate his client’s investments to maximize


her annual return while meeting their agreed-up investment restrictions.
Structuring the Decision Making Problem 5

Decisions to be made

Performance measure

Things that restrict manger’s range of choice


Mathematical Formulation 6

Data (input parameters)

Decisions variables

Objective function

Constraints
Spreadsheet Model for LP 7

Four steps
– Input cells
– Changing cells
– Objective cell
– Constraints

Excel Solver

Open InvestmentProblem_Template.xlsx
Step 1: Input Cells 8

Enter all of the data for the problem onto the spreadsheet.

Make consistent use of rows and columns.

It is a good idea to color code these “input cells” (e.g., light blue).

A B C D G
2 Company Return Years to Maturity Rating 2 Limit
3 Acme Chemical 8.65% 11 1 3 25%
4 DynaStar 9.50% 10 3 4 25%
5 Eagle Vision 10.00% 6 4 5 25%
6 MicroModeling 8.75% 10 1 6 25%
7 OptiPro 9.25% 7 3 7 25%
8 Sabre Systems 9.00% 13 2 8 25%
Step 2: Changing Cells
Add a cell in the spreadsheet for every decision that needs to be made.
It is a good idea to color code these “changing cells” (e.g., yellow with
border).

A B C D E F G
2 Company Return Years to Maturity Rating Portfolio Limit
3 Acme Chemical 8.65% 11 1 10.00% 25%
4 DynaStar 9.50% 10 3 10.00% 25%
5 Eagle Vision 10.00% 6 4 10.00% 25%
6 MicroModeling 8.75% 10 1 10.00% 25%
7 OptiPro 9.25% 7 3 10.00% 25%
8 Sabre Systems 9.00% 13 2 10.00% 25%
Step 3: Objective Cell 10

Develop an equation that defines the objective of the model.

Typically this equation involves the data cells and the changing cells in
order to determine a quantity of interest (e.g., total profit or total cost).

A B C D E F G
2 Company Return Years to Maturity Rating Portfolio Limit
3 Acme Chemical 8.65% 11 1 10.00% 25%
4 DynaStar 9.50% 10 3 10.00% 25%
5 Eagle Vision 10.00% 6 4 10.00% 25%
6 MicroModeling 8.75% 10 1 10.00% 25%
7 OptiPro 9.25% 7 3 10.00% 25%
8 Sabre Systems 9.00% 13 2 10.00% 25%

A B C D E F G
10 Annual Return of Portfolio 5.52% =SUMPRODUCT(B3:B8,E3:E8)
Step 4: Constraints 11

To model the constraint on long term bonds, we calculate in cell A13 the
percentage of investment on long term bonds:
A13 = E3+ E4 + E6 +E8
We also have in cell C13 the lower limit (50%).

A B C D E F G
2 Company Return Years to Maturity Rating Portfolio Limit
3 Acme Chemical 8.65% 11 1 10.00% 25%
4 DynaStar 9.50% 10 3 10.00% 25%
5 Eagle Vision 10.00% 6 4 10.00% 25%
6 MicroModeling 8.75% 10 1 10.00% 25%
7 OptiPro 9.25% 7 3 10.00% 25%
8 Sabre Systems 9.00% 13 2 10.00% 25%

A B C
11 =E3+E4+E6+E8
12 % of investment on long-term bonds: 50%
13 40.00% >= 50%
Step 4: Constraints 12

To model the constraint on high risk bonds, we calculate in cell A15 the
percentage of investment on high :
A15 = E4 + E5 + E7
We also have in cell C15 the upper limit (35%).

A B C D E F G
2 Company Return Years to Maturity Rating Portfolio Limit
3 Acme Chemical 8.65% 11 1 10.00% 25%
4 DynaStar 9.50% 10 3 10.00% 25%
5 Eagle Vision 10.00% 6 4 10.00% 25%
6 MicroModeling 8.75% 10 1 10.00% 25%
7 OptiPro 9.25% 7 3 10.00% 25%
8 Sabre Systems 9.00% 13 2 10.00% 25%

A B C
14 % of investment on bonds of "highest" risk: 35%
15 30.00% <=
=E4+E5+E7 35%
Step 4: Constraints 13

To model the constraint total investment, we calculate in cell A17 the total
percentage of all bonds:
A17 = sum(E3:E8)
We also have in cell C17 the requirement (100%).

A B C D E F G
2 Company Return Years to Maturity Rating Portfolio Limit
3 Acme Chemical 8.65% 11 1 10.00% 25%
4 DynaStar 9.50% 10 3 10.00% 25%
5 Eagle Vision 10.00% 6 4 10.00% 25%
6 MicroModeling 8.75% 10 1 10.00% 25%
7 OptiPro 9.25% 7 3 10.00% 25%
8 Sabre Systems 9.00% 13 2 10.00% 25%

A B C
16 Total Investment
17 60.00% =
=SUM(E3:E8) 100%
A Trial Solution 14

A B C D E F G
2 Company Return Years to Maturity Rating Portfolio Limit
3 Acme Chemical 8.65% 11 1 10.00% <= 25%
4 DynaStar 9.50% 10 3 10.00% <= 25%
5 Eagle Vision 10.00% 6 4 10.00% <= 25%
6 MicroModeling 8.75% 10 1 25.00% <= 25%
7 OptiPro 9.25% 7 3 25.00% <= 25%
8 Sabre Systems 9.00% 13 2 20.00% <= 25%
9
10 Annual Return of Portfolio 9.12%
11
12 % of investment on long-term bonds: 50%
13 65.00% >= 50%
14 % of investment on bonds of "highest" risk: 35%
15 45.00% <= 35%
16 Total Investment
17 100.00% = 100%
Solver Setup 15
An Optimal Solution 16

A B C D E F G
2 Company Return Years to Maturity Rating Portfolio Limit
3 Acme Chemical 8.65% 11 1 15.00% <= 25%
4 DynaStar 9.50% 10 3 10.00% <= 25%
5 Eagle Vision 10.00% 6 4 25.00% <= 25%
6 MicroModeling 8.75% 10 1 25.00% <= 25%
7 OptiPro 9.25% 7 3 0.00% <= 25%
8 Sabre Systems 9.00% 13 2 25.00% <= 25%
9
10 Annual Return of Portfolio 9.19%
11
12 % of investment on long-term bonds: 50%
13 75.00% >= 50%
14 % of investment on bonds of "highest" risk: 35%
15 35.00% <= 35%
16 Total Investment
17 100.00% = 100%
Solver Limitations and Alternatives 17

• Max problem size: 200 variables and around 100 constraints


• More sophisticated optimization engines are available
– OpenSolver: opensolver.org
• Use Solver to setup your model and use Open Solver to solve it
• No limit on number of variables/constraints!
– Optimization packages in R (e.g., lpsolve, lpsolveAPI)
and Python (e.g., scipy)

– Cplex: https://www.ibm.com/analytics/cplex-optimizer
Open Solver 18
Python Code 19
Who use Linear Programming 20

Accounting Government Social networking


Advertising Internet applications Sourcing
Agriculture Logistics Sporting betting
Airlines Medical Sporting scheduling
ATM provisioning Mining Statistics
Compilers National research lab Steel manufacturing
Defense Online dating Telecommunications
Electrical power Portfolio management Transportation
Energy Railways Utilities
Finance Recycling Workforce
Food service Revenue management Management
Forestry Semiconductor
Gas Distribution Shipping

(New customers of an LP solver in 2012.)


Why Use Linear Programming 21

Practitioners consider LP a solved problem.

Large models can now be solved robustly and quickly.


– Many companies regularly solve models with millions of variables and
constraints

The best (optimal) solution is guaranteed to be found (if exists).

Useful sensitivity analysis information is generated.


The Early History 22

1947: George Dantzig invents simplex method for LP


– Introduced the idea of an objective function
– Promoted the idea of using LP to make decisions
– First LP solved: 9 constraints, 77 decision variables, 120 man days

1951: First computer code for solving LPs

1960: LP commercially viable


– Used largely by oil companies
– Millions of dollars of investment paid off in a couple of weeks

1970: Numerous new applications identified, especially large scale planning


– Building application was very expensive and very risky
– 3-4 year development cycles
– Developers and application owners had to be multi-faceted experts
– Technology wasn’t ready: LP were hard
More Recent History 23

1980s: A new algorithm was invented, theoretically faster than simplex


method.
– But LP was not a solved problem
– Unsolvable airline LP model with 4420 constraints, 6711 variables.

1990s: LP performance takes off


– Popular new applications begin to show that Optimization could work
on difficult, real problems
– Airline, Supply chain

1988-2004
– Algorithms (machine independent): 3300X.
– Machines (workstationPCs): 1600X
– NET: algorithm*machine: 5,300,000X (2months1 second)

2004-
– Algorithm development for very large scale LPs
– Challenging applications still exist

You might also like