'objective function for continuously updating  GMM minimization
Parameters
params : array
parameter values at which objective is evaluated
Returns
jval : float
value of objective function'

def gmmobjective_cu(self, params, weights_method='cov', wargs=()):

    moms = self.momcond(params)
    inv_weights = self.calc_weightmatrix(moms, weights_method=weights_method, wargs=wargs)
    weights = np.linalg.pinv(inv_weights)
    self._weights_cu = weights
    return np.dot(np.dot(moms.mean(0), weights), moms.mean(0))
