fit_sgd function

Maximum likelihood fit of the SGD model