This is a non-convex quadratic program. If you do not have any other code at hand, simulated annealing is ok. Nevertheless, I suggest to take the time and look for an appropriate global optimization code with guaranteed convergence. And further, use a local optimizer to improve your "final" solution, especially when using SA.The following talk may be related to your question: Calibration of the Svensson Model to Simulated Yield Curves (see
http://workshop.mathfinance.de/)