Optimality of the Subgradient Algorithm in the Stochastic Setting