Overview

Once all info about your investments is stored in Beancount, it’s reasonable to expect that you can get some more information regarding taxes, and capital gains in particular.

The following links may turn out useful for you:

Most of the links deal with US taxes (and hence I haven’t tested all of them myself) but similar principles are usually applicable in other countries.

Capital gains

The Income leg of your sell transaction may already have information about the capital gain. Since Beancount is tracking lots and their acquisition values, these can be provided explicitly. Or you can use FIFO/LIFO booking method for the account if that makes sense in your case (but make sure it corresponds to the actual process and that you follow taxation rules correctly).

The Investor Fava dashboard may further help in finding relevant information and potentially optimizing your trading operations.