Trying to understand how average cost basis works. What I didn't find is if after a sale the computation of cost basis will change for a security: I calculate the cost basis as average cost during all periods I bought the security and any time a new buy happens I have a new basis.
But when I sell securities do I have to take out the sold shared from my history of transactions in FIFO order ? (e.g. I sold 10 shares from january of 2020, from now on the cost basis will not take those 10 oldest shares into account ?)