Let's say I purchase a share of a stock for $10 and the the broker charges me a $5 commission fee.
A year later I purchase a second share for another $10 and the broker charges me again a $5 commission fee.
A year later I sell both shares for $30 each and the broker charges me again another $5 commission fee.
I get that in the first and second year I get to deduct the $5 commission fee from other sources of income since I didn't realize any gains on those years; but what happens on the third year?
On the third year I realized $20 in short-term capital gains, realized $20 in long-term capital gains, and incurred $5 in broker expenses. What income do I deduct those $5 against? Short-term or long-term capital gains? They are taxed at different rates, so it makes a difference. What about other expenses? Interest paid on margin balances? Account maintenance fees? Fund expense fees?