title: Java Stream grouping and counting occuerences
body: <p>I have a list of objects representing trades in a market. Each trade has an opening and closing time and a profit. I want to group them by a month and then count a number of trades with profit > 0 and &lt; 0 in each month = create a Map with following structure {"MM" = {"Win" = numberOfWinTrades, "Loss" = numberOfLossTrades}, "MM" ...}</p>
  
  <p>I came up with the following code, but I am not able to implement the condition into it:</p>
  
  <pre><code>filteredOrders.stream().collect(Collectors.groupingBy(order -&gt; order.getCreationTime().substring(5,7),
                  Collectors.groupingBy(order -&gt; order.getPlUsd() &gt; 0, Collectors.counting())));
  </code></pre>