Investors & landlords

According to that article, I only need to report “investment” if I cashed out. Out of the $1,000 I bought, only $20 was cashed out, so that should be what my capital gain/loss is based on, as well as cost basis?