Artificial intelligent assistant

Finding the number of combinations of two dates from n dates where one precedes the other? Suppose that I am given n consecutive dates for buying and selling shares . So what are the number of ways of choosing a **pair of buy date and sell date** such that buy date always precede sale date ?

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.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f0ede01963835168aa189ca3126a9b16