stochastic_control: add the trading example; and allow weights to depend on state in MDPs