A global maximum principle for stochastic optimal control problems with delay and applications · Study