1
$\begingroup$

I have a question about the optimizer method to calibrate the parameters of two factor hull white model. I have the analytical pricing formula for cap and market cap price. There are five parameters need to calibrate ($\gamma_1$. $\gamma_2$, $\sigma_1$, $\sigma_2$, $\rho$). The problem is I can not get the fixed parameters, when I change the initial guess for these five paras, I will get different result. Any suggestions are appreciated.

The optimize code is as following:

minimize(error_func, initial_guess, args = (strikes, cap_tenor, zcb, cap_price_market), 
                                            bounds=bound, method="Nelder-Mead")
$\endgroup$
1
$\begingroup$

You are obviously using a local-optimizer ( here Nelder-Mead method). One should expect different results for different initial guesses as it will get stuck to a local minima ( or just a "solution" for Nelder-Mead, as it is a heuristic optimizer). In practice, play around and collect the different solutions and their errors, the smaller the error , the better. You can also use the differential evolution optimizer which is a global optimizer, it is slower but it can give you a good indication of where the actual solution is.

The calibrating instruments is also another thing that you should look at. If you remove one instrument, you might get totally different results. You can compromise the accuracy( i.e. choosing the set of parameters that yields the smallest error) for stability

|improve this answer|||||
$\endgroup$
  • $\begingroup$ Thank you for your reply. I have some further questions want to ask. How will you choose the target function? I use the $\sum(c_{model} - c_{market})^2$, which give me very small error, even I am in local minima. And does HW2 model use a lot in practice? Since it look so hard to calibrate the parameters (for me). $\endgroup$ – wen Feb 11 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.