Pick any two distinct dates. There are $\binom{n}{2}=\frac{n(n-1)}{2}$ ways to do this. Label the earlier one buy, the later one sell.
I have interpreted "earlier" as meaning different. It is always possible to buy one day and sell later the same day. With that interpretation, there are $n$ additional possibilities.