Optimization problems in the theory of continuous trading