A maximum principle for stochastic optimal control with terminal state constraints, and its applications · Study