Relation between number of negative eigenvalues of $A$ and $B$ when $A=SB$, where $S$ is a positive diagonal matrix 
I'm trying to find a relation between the signs of the eigenvalues of a matrix $A=SB$ and the eigenvalues of $B$, when all three are invertible and $S$ and $B$ exclusively have real entries, and $S$ is a positive diagonal matrix.
Specifically, I demand that $A$'s eigenvalues satisfy $Re[\lambda_i]<0 \;\forall i$. In this case, what are the constraints on $B$, i.e., what can we say about it, its eigenvalues and their signs?

From simulations I know that there is, in general, no conservation of the signs of the eigenvalues. However it seems that when $B$ is symmetric, the number of eigenvalues with a specific sign is conserved, i.e., its signature is preserved. Is this true? I have looked at Sylvester's Law of Inertia (wiki, mathworld), but since I don't know anything about quadratic forms, I don't really know what to do with it. I got the impression that it might be of use through this MO answer.
From my looking around, these questions seem useful (although, I don't really get the theory behind the answers, so I'm unsure whether or not they apply to my problem):

*

*Eigenvalues of product of a matrix and a diagonal matrix (which mentions Horn's inequalities)

*Eigenvalues of product of a matrix with a diagonal matrix (funnily, they have the same name!)

*if eigenvalues are positive, is the matrix positive definite?

*Does non-symmetric positive definite matrix have positive eigenvalues?

*square root of symmetric matrix and transposition (which mentions Cholesky factorization)

Constraints on an asymmetric $B$ would be fantastic, but any input is appreciated!
 A: Here is a partial answer, which leads to sufficient conditions. It uses a classic result of Bendixon (1902). Let $H(A) = (A+A^T)/2$ be the symmetric part of $A$. Then
$$
\min_i \lambda_i\left( H(A) \right) \leq Re[\lambda_i(A)] \leq \max_i \lambda_i\left( H(A) \right).
$$
As such, if we require that $Re[\lambda_i(A)] < 0$ it is sufficient that the eigenvalues of $H(A)$ are all negative. Equivalently, we may ask ourselves if we can find a positive definite matrix $Q$ such that $A + A^T + Q = 0$, i.e.
$$
SB + B^TS + Q = 0.
$$
This relation is called Lyapunov's equation. For a given $B$, Lyapunov's equation is known to have a unique positive definite solution $S$ for any positive definite $Q$ if and only if $Re[\lambda_i(B)] < 0$ for all $i$. In your case we also require that $S$ should be diagonal. There is a large amount of literature on diagonal solutions to Lyapunov's equation, but perhaps the most complete solution to the problem was given by Barker, Berman and Plemmons (1978): There is a diagonal solution $S$ if and only if $B X$ has at least one negative diagonal element for all non-zero positive semi-definite matrices $X$.
