'lags : int
trend : string or None
As per above'

def _estimate_svar(self, start_params, lags, maxiter, maxfun, trend='c', solver='nm', override=False):

    k_trend = util.get_trendorder(trend)
    y = self.endog
    z = util.get_var_endog(y, lags, trend=trend, has_constant='raise')
    y_sample = y[lags:]
    var_params = np.linalg.lstsq(z, y_sample)[0]
    resid = (y_sample - np.dot(z, var_params))
    avobs = len(y_sample)
    df_resid = (avobs - ((self.neqs * lags) + k_trend))
    sse = np.dot(resid.T, resid)
    omega = (sse / df_resid)
    self.sigma_u = omega
    (A, B) = self._solve_AB(start_params, override=override, solver=solver, maxiter=maxiter, maxfun=maxfun)
    A_mask = self.A_mask
    B_mask = self.B_mask
    return SVARResults(y, z, var_params, omega, lags, names=self.endog_names, trend=trend, dates=self.data.dates, model=self, A=A, B=B, A_mask=A_mask, B_mask=B_mask)
