I'm humbled by the fact I couldn't find a direct answer to this anywhere so if one exists already just let me know and I'll del this one.
My question is, say you have an Ameritrade (or similiar) trading account. When you sell one stock, and purchase another while never actually withdrawing any funds to your personal bank accounts. Are you taxed via capital gains just for selling and purchasing. Or when you actually withdraw/transfer funds out of Ameritrade and into your personal bank account?
Or to put in a scenario. If I sell stock, purchase other, but never actually transfer any funds back into a personal account do I still need to consider capital gains realization? Or only when I actually transfer funds from Ameritrade back to my bank?
I'm sure it's a dumb question but I would love a more definitive answer from someone with experience. Thanks.