Understanding Equity and Capital Gains: A Comprehensive Guide