Stochastic Optimal Control with Applications in Finance