code: public static Scalar<?> calculatePortfolioReturn(final PrimitiveMatrix assetWeights, final PrimitiveMatrix assetReturns) {
          return PrimitiveScalar.valueOf(assetWeights.dot(assetReturns));
      }
docs: Calculates the portfolio return using the input asset weights and returns.