Dynamic Portfolio Optimization: Time Decomposition using the Maximum Principle with a Scenario Approach