In part 1, we propose a numerical method to compute a trading strategy for the hedging of a financial derivative with N hedging instruments. The underlying mathematical framework is local risk minimization in discrete time. The method combines Monte Carlo simulation with least squares regression in analogy to the method of Longstaff and Schwartz. We study the proposed method on two example problems. For both problems the number of hedging instruments is two. One of the hedging instruments is always the underlying asset of the hedging objective. The other hedging instrument is a vanilla put option in the first example and a variance swap in the second example. In part 2, we propose an optimal control approach for the optimization of Europea...