Stochastic Optimization And Applications In Finance