margin trading gain estimator