I am trying to implement bootstrapping (https://en.wikipedia.org/wiki/Bootstrapping_(finance)) of CDS curve. To implement it I am trying to minimize a series of expression. The minimum value of expression will result from certain value of variable. I can easily do it in excel however trying to find a way in mathematica.
I am trying to find value of h1 and h2 in below code using Minimize function to minimize two expression.
'Minimize[Sum[50/10000*1/4*1/4*n*97/100*Exp[-h1*1/4*n], {n, 1, 4}] -
Sum[1/2*1/4*n*97/100*(Exp[-h1*1/4*(n - 1)] - Exp[-h1*1/4*n]), {n, 1, 4}]
&&
Sum[77/10000*1/4*1/4*n*97/100*Exp[-h1*1/4*n], {n, 1, 4}] +
Sum[77/10000*1/4*1/4*n*94/100*Exp[-h2*1/4*n], {n, 5, 8}] -
Sum[1/2*1/4*n*97/100*(Exp[-h1*1/4*(n - 1)] - Exp[-h1*1/4*n]), {n, 1, 4}] +
Sum[1/2*1/4*n*94/100*(Exp[-h1*1/4*(n - 1)] - Exp[-h2*1/4*n]), {n, 5}] +
Sum[1/2*1/4*n*94/100*(Exp[-h2*1/4*(n - 1)] - Exp[-h2*1/4*n]), {n, 6,8}],
{h1, h2}, Reals]'
I get following output but doesn't give values of h1 and h2 which will minimize the expression. I get h1 = 0.01148 and h2 = 0.01451 when I use goal seek in excel. Can anybody help in trouble shooting the issue in Minimize function
Minimize[(97 E^-h1)/80000 + (291 E^(-3 h1/4))/320000 + (97 E^(-h1/2))/
160000 + (97 E^(-h1/4))/320000 - 97/200 (-E^-h1 + E^(-3 h1/4)) -
291/800 (-E^(-3 h1/4) + E^(-h1/2)) - 97/800 (1 - E^(-h1/4)) -
97/400 (-E^(-h1/2) + E^(-h1/4)) && (7469 E^-h1)/4000000 + (
22407 E^(-3 h1/4))/16000000 + (7469 E^(-h1/2))/8000000 + (
7469 E^(-h1/4))/16000000 + (3619 E^(-2 h2))/1000000 + (
25333 E^(-7 h2/4))/8000000 + (10857 E^(-3 h2/2))/4000000 + (
3619 E^(-5 h2/4))/1600000 - 97/200 (-E^-h1 + E^(-3 h1/4)) -
291/800 (-E^(-3 h1/4) + E^(-h1/2)) - 97/800 (1 - E^(-h1/4)) -
97/400 (-E^(-h1/2) + E^(-h1/4)) + 47/50 (-E^(-2 h2) + E^(-7 h2/4)) +
329/400 (-E^(-7 h2/4) + E^(-3 h2/2)) + 47/80 (E^-h1 - E^(-5 h2/4)) +
141/200 (-E^(-3 h2/2) + E^(-5 h2/4)) + 47/100 (E^(-3 h1/4) - E^-h2) +
141/400 (E^(-h1/2) - E^(-3 h2/4)) + 47/200 (E^(-h1/4) - E^(-h2/2)) +
47/400 (1 - E^(-h2/4)), {h1, h2}, Reals]
&&
? $\endgroup$