We discuss efficient methods to optimize the metrological performance over local Hamiltonians in a bipartite quantum system. For a given quantum state, our methods find the best local Hamiltonian for which the state outperforms separable states the most from the point of view of quantum metrology. We show that this problem can be reduced to maximize the quantum Fisher information over a certain set of Hamiltonians. We present the quantum Fisher information in a bilinear form and maximize it by iterating a see-saw, in which each step is based on semidefinite programming. We also solve the problem with the method of moments that works very well for smaller systems. We consider a number of other problems in quantum information theory that can be solved in a similar manner. For instance, we determine the bound entangled quantum states that maximally violate the Computable Cross Norm-Realignment (CNNR) criterion.