'gradient of moment conditions
Parameters
params : ndarray
parameter at which the moment conditions are evaluated
epsilon : float
stepsize for finite difference calculation
centered : bool
This refers to the finite difference calculation. If `centered`
is true, then the centered finite difference calculation is
used. Otherwise the one-sided forward differences are used.
TODO: looks like not used yet
missing argument `weights`'

def gradient_momcond(self, params, epsilon=0.0001, centered=True):

    momcond = self.momcond_mean
    if centered:
        gradmoms = ((approx_fprime(params, momcond, epsilon=epsilon) + approx_fprime(params, momcond, epsilon=(- epsilon))) / 2)
    else:
        gradmoms = approx_fprime(params, momcond, epsilon=epsilon)
    return gradmoms
