Optimization Methods in Finance: Chapter 3
Description: Optimization Methods in Finance: Bond Dedication Problem.
Tags: amplpy, example, finance
Notebook author: Marcos Dominguez Velad <marcos@ampl.com>
Model author: N/A
References: Cornuejols, G., and Tütüncü, R. (2018). Optimization Methods in Finance (2nd edition): Bond Dedication example. Cambridge University Press.
Bond dedication
This is the implementation using AMPL of the Example 3.1 (Bond dedication) from the book Optimization Methods in Finance (2nd edition) by Cornuejols, G., and Tütüncü, R.
The model has been extracted from Chapter 3, titled Linear Programming Models: Asset-Liability Management.
Problem:
Suppose a pension fund needs to cover some liabilities in the next 6 years (given cash requirements), and can invest in 10 government bonds with given cash flows and current prices. The goal is to find the least expensive portfolio of bonds whose cash flows are sufficient to cover the liabilities.
Writing the model
First, let’s use AMPL to write the abstract model depending on the number of bonds, years, and other parameters from the problem. Each bond has a price and some associated cash flows.
(Use %%ampl_eval to evaluate AMPL commands)
The variables in this case are
$x_j$: amount of bonds $j$ in the portfolio, for j = 1, 2, …, bonds.
$s_t$: surplus cash in year $t$, for t = 1, 2, …, years.
The objective function is to minimize the price of the bonds.
Let’s write the constraints for the model (liabilities should be accomplished).
Now the model is complete.
Writing the data file
In order to solve a particular instance of the problem, we could write a data file with the information related to the parameters.
(Use %%writefile to create files)
Overwriting bond_dedication.dat
Solve the problem
Load the data file and pick your favourite linear solver to get the solution.
CBC 2.10.5: CBC 2.10.5 optimal, objective 2305.691648
8 iterations
Print the solution.
: x s :=
1 0 66.3772
2 11.215 32.7544
3 0 0
4 6.63385 18.3077
5 0 0
6 0 0
7 0 .
8 6.00868 .
9 0 .
10 0 .
;
Total_Price = 2305.69
Shadow prices and interest rates
We can check the shadow prices from the previous constraints to find the term structure of interest rates.
Liability1 = 0.83871
Liabilities [*] :=
2 0.83871
3 0.83871
4 0.696457
5 0.696457
6 0.630249
;
To extract this values to compute the term structure of interest rates:
$$r_t = \frac{1}{(\lambda_t)^{1/t}}-1$$
Rate 1 = 0.1923076923076923
Rate 2 = 0.09192842819833746
Rate 3 = 0.06038306207109678
Rate 4 = 0.09465273090416892
Rate 5 = 0.0750312573843761
Rate 6 = 0.07997719481718946