Financial Derivatives Toolbox | ![]() ![]() |
Example: Minimize Portfolio Sensitivities
To illustrate using hedgeopt
to minimize portfolio sensitivities for a given maximum target cost, specify a target cost of $20,000 and determine the new portfolio sensitivities, holdings, and cost of the rebalanced portfolio.
MaxCost = 20000; [Sens, Cost, Quantity] = hedgeopt(Sensitivities, Price,... Holdings, [1 4 5 7 8], [], MaxCost); Sens = -4345.36 295.81 -6586.64 Cost = 20000.00 Quantity' = 100.00 -151.86 -253.47 80.00 8.00 -18.18 40.00 10.00
This example corresponds to the $20,000 point along the cost axis in Figure 3-1, Figure 3-2, and Figure 3-3.
When minimizing sensitivities, the maximum target cost is treated as an inequality constraint; in this case, MaxCost
is the most you are willing to spend to hedge a portfolio. The least squares objective matrix C
is the matrix transpose of the input asset sensitivities
a 3-by-8 matrix in this example, and d
is a 3-by-1 column vector of zeros, [0 0 0]'
.
Without any additional constraints, the least squares objective results in an under-determined system of three equations with eight unknowns. By holding assets 1, 4, 5, 7, and 8 fixed, you reduce the number of unknowns from eight to three. Now, with a system of three equations with three unknowns, hedgeopt
finds the solution shown.
![]() | Example: Fully Hedged Portfolio | Example: Under-Determined System | ![]() |