not sure if this is useful but i dont think there is even a value of p at which f(p)=0. Are you sure you have stated the problem fully?

eg, trying to solve for p:

$$0 = \frac{1}{(1-p)d}\ln\left(\frac{1}{T}\sum_{t=1}^{T}\left[\frac{1+X_t}{1+Y_t} \right]^{1-p} \right)$$

There is no solution unless the RHS is zero, which means the log must be zero..etc.