In part 2, I look at my first efforts to track reinvested dividends in hledger. I don’t know what I am doing, but I do it anyway. Read about it at https://hledgerfan.com/accounting-for-a-mutual-fund-part-2/.
Recording this as two transactions is useful if you would later decide to compute return of investment, as it allows you to capture the prices at which reinvestment had happened.