I understand that stocks and crypto are treated as capital gains when a net profit is made, and taxed as such in the United States. My question is what happens when a particular stock or set of stocks is traded frequently throughout the year (day trading).
If one has Stock A and they sell it for a profit of 1000$, but then buy it back and sell it for a loss of 2000$, is a tax paid on the intermediate 1000$ capital gains (buying and selling occurred within the same year)? Similar question: what if after making a profit of 1000$ on Stock A, it is invested into Stock B and sold for a loss of 2000$?
Are intermediate profits considered in capital gains taxes or only the net capital gains for the year?