Problem: XYZ stock price and dividend history are as follows:
An investor buys three shares of XYZ at the beginning of 2018, buys another two shares at the beginning of 2019, sells one share at the beginning of 2020, and sells all four remaining shares at the beginning of 2021.