# Deriving Cox, Ingersoll and Ross expression for the relationship between forwards and futures, how do they conclude a specific step?

I'm trying to derive a specific relationship about the relationship between forwards and futures from "The relationship between forward and futures prices", written 1981 by Cox, Ingersoll and Ross (not the interest rate model!). The relationship has basically been empirically debunked, but nonetheless provides relevant info to me. I have issues understanding some steps in the proof. Basically, Cox, Ingersoll and Ross go from:

$$-\frac{1}{B(t)}\sum_{i=t}^{T-1} \left[f(i+1) -f(i)\right]\left[\frac{B(i)}{B(i+1)} -1 \right] \tag 1$$

directly to

$$\frac{1}{B(t)}\int_{t}^{T} f(w)\text{Cov}[\tilde{f}(w),\tilde{B}(w)]dw \tag 2$$

by assuming a continuous-state where the covariance of $\tilde{f}$ and $\tilde{B}$ refers to the local covariance of the percentage change of $B$ and $f$.

I can easily write $(1)$ as:

$$\frac{1}{B(t)}\sum_{i=t}^{T-1} f(i+1) \left[\frac{f(i+1) -f(i)}{f(i+1)}\right]\left[\frac{B(i)-B(i+1)}{B(i+1)} \right] \tag 3$$

which, with

$$\text{Cov}(X,Y) = \frac{1}{n^2}\sum_{i=1}^{n-1}\sum_{j>i}^{n} (x_i - x_j)(y_i - y_j)$$

will get me to: (right??)

$$-\frac{T^2\text{Cov}_{t,T}[\tilde{f},\tilde{B}]}{B(t)}\int_{t}^{T} f(w)dw \tag 4$$

But, this is not very close to $(2)$. For example, my covariance is a constant, and I do not know how to get $T^2$ to disappear. What I do know:

$\text{Cov}(f,B) \int f(w) dw = \int \text{Cov}(f,B) f(w) dw$, because $\text{Cov}(f,B)$ is a constant (and $f,B$ are vectors of timeseries). In $(2)$ however, $\text{Cov}(f(w),B(w))$ means the covariance of $f(w)$ and $B(w)$, where $w$ will change with $dw$ from $t$ to $T$. But, at a discrete point in time ($t=w$), $f(w)$ and $B(w)$ are only two values, not a time-series!

Where do I go wrong when I go from $(3)$ to $(4)$, i.e., how do Cox, Ingersoll and Ross go from $(1)$ to $(2)$?