Derivation covariance between ratio of random variables Suppose I am interested in computing the covariance between $\frac{A}{B}$ and $\frac{X}{Y}$. From Ratio of correlated vectors is uncorrelated? I understood that using the delta method, this amounts to
$Cov(\frac{A}{B}, \frac{X}{Y}) \approx \frac{Cov(A,X)}{BX} - \frac{ACov(Y,X)}{B^2X} - \frac{XCov(A,Y)}{BY^2} - \frac{AXCov(B,Y)}{B^2Y^2}$.
I am wondering how this is derived, as I have not seen the delta method applied to calculate a covariance.

Set $g(A,B,X,Y) = \left(\frac{A}{B},\frac{X}{Y}\right)$. The gradient of $g$ is $$\nabla g = \begin{pmatrix}
\frac{1}{B} & -\frac{A}{B^2} & 0 & 0\\
0 & 0 & \frac{1}{Y} & -\frac{X}{Y^2}
\end{pmatrix}$$
The delta method say $Var[g(Z)] = \nabla g\, Var[Z]\, \nabla g^T$. So for $Z =(A,B,X,Y)$, we have $$Var[g(Z)] = \nabla g\, \begin{pmatrix}
Cov(A,A) & Cov(A,B) & Cov(A,X) & Cov(A,Y)\\
Cov(B,A) & Cov(B,B) & Cov(B,X) & Cov(B,Y)\\
Cov(X,A) & Cov(X,B) & Cov(X,X) & Cov(X,Y)\\
Cov(Y,A) & Cov(Y,A) & Cov(Y,X) & Cov(Y,Y)
\end{pmatrix}\, \nabla g^T$$
The computation of this matrix give a $2\times 2$ matrix which $(1,2)$ and $(2,1)$-th element should be equal to  $$Cov\left(\frac{A}{B},\frac{X}{Y}\right) = \frac{Cov(A,X)}{BX}-\frac{ACov(X,Y)}{B^2X}-\frac{XCov(A,Y)}{BY^2}+\frac{AXCov(B,Y)}{B^2Y^2}$$
