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")