Martingales and Stochastic Integrals in the Theory of Trading