Stochastic control problems in energy markets