Let $a_i,b_i,c_i,d_i>0$ for all $1\leq i\leq n$. What is a sharp upper bound on $$\sup_{x_1,\ldots,x_n>0}\frac{\sum_{i,j=1}^n a_ib_jx_ix_j}{\sum_{i,j=1}^n c_id_jx_ix_j}$$
This quantity is always bounded as there is the bound: $$ \frac{\sum_{i,j=1}^n a_ib_jx_ix_j}{\sum_{i,j=1}^n c_id_jx_ix_j}\leq \max_{i,j}\frac{a_ib_jx_ix_j}{c_id_jx_ix_j}=\max_{i,j}\frac{a_ib_j}{c_id_j}.$$ So, we get $$\sup_{x_1,\ldots,x_n>0}\frac{\sum_{i,j=1}^n a_ib_jx_ix_j}{\sum_{i,j=1}^n c_id_jx_ix_j}\leq \min\Big\{\max_{i,j}\frac{a_ib_j}{c_id_j},\max_{i,j}\frac{b_ia_j}{c_id_j}\Big\}.$$ This bound is tight as it is attained for instance when $a_i= r b_i= s c_i = t d_i$ for every $i$ and some $r,s,t>0$. However it is quite conservative.
Can we do better ?
I am definitely interested in a factor of 2
OK, here is how to find the true maximum then. We know that the maximum is at least $\Lambda>0$ if we can find $x$ with $$ \langle x,a\rangle\langle x,b\rangle-\Lambda \langle x,c\rangle\langle x,d\rangle=\frac 14[\langle x,a+b\rangle^2-\langle x,a-b\rangle^2 -\Lambda \langle x,c+d\rangle^2+\Lambda \langle x,c-d\rangle^2]\ge 0\,. $$ If we fix $\langle x,a-b\rangle,\langle x,c+d\rangle$, the last expression becomes convex in $x$, so if we can make it non-negative at all, we can do it for some $x$ with at most two non-zero components. Thus we care only about what happens when $n=2$ (but we'll have to consider all pairs $i,j$).
Now we can fix $\langle x,d\rangle=1$ and parameterize admissible $x$ as $x(t), t\in[\alpha,\beta]$ where $x(t)$ is a linear function of $t$. The expression we want to investigate is then $\frac{\langle x,a\rangle\langle x,b\rangle}{\langle x,c\rangle}$. This is a quadratic polynomial of $t$ divided by a linear one. If we look at the equation for the critical points, we see that it reduces to a quadratic equation in $t$, so we have to solve that one, see which critical points lie within the interval, and compare with the endpoints (the last step is not really necessary because we can check all singletons at once in the very beginning). This is not hard to program but the analytic formulae are too ugly to try to write explicitly.