Lots GUI

From GnuCash
Jump to: navigation, search

Here is a relatively simple demo on how the Lots page functions.

Account Register

The account transactions are illustrated in the following image:

Investment account transactions.png

There are two purchase and two sale transactions involved.

  • Purchase of 100 units,
  • Purchase of 200 units,
  • Sale of 50 units,
  • Sale of 150 units

Lots in Account

Opening the Actions -> View Lots menu item will display the following window:

Lots in Account.png

For a detailed description of the elements and their functions in this Windows, see http://www.gnucash.org/docs/v2.6/C/gnucash-help/tool-lots.html

Scrub Account

At this point, you can use the Scrub Account option. This will do the following:

  • create Lots for all the purchase transactions,
  • match the units from the sale transactions to the purchase transactions,
  • calculate capital gains and create the related transactions records

The results of account scrubbing can be seen here:

Scrub result.png

All of these steps can also be performed manually. In this case, you would have to create lots and add the purchase transactions into them. Then divide the sale transactions into splits that match the (portions of) the purchase transactions and include them into appropriate lots. Once the matches are made, you need to Scrub the selected lot in order to calculate the capital gains and create the related transaction.

The Capital Gains transaction will be created separately to the sale transaction but will be linked to it via Lot. This way it will not be recreated if a split is moved out of a lot and/or back into it. However, the capital gains transaction will also not be removed if any split is moved out of the lot. This you would have to do manually in the account register.

Let's look at the details.

  1. Lot 0

Lot 0.png

matched the 50 out of the 100 units purchased in the first lot with the first sale. The remaining 50 units from the first purchase was matched with 50 units from the second sale (50 out of 150 units). Capital gains of 2x$100 have been calculated.

  1. Lot 1

Lot 1.png

matched the 100 sold units to the second purchase. This lot is still open with 100 units remaining. Capital loss of $300 has been calculated.

Manual Corrections

Note that it can be a bit cumbersome to undo the scrubbing actions.

As mentioned above, the Capital Gains transactions can only be removed manually, through the account register.

The Capital Gains transactions remain linked to the Lot for which they were created. This can result in confusion if a split is moved from one lot to another. At the moment, it seems safer to

  1. take the split out of the lot, and
  2. delete the related capital gains transaction manually

when moving the records around.

If you want to put the generated splits back into one record, this may require a bit more effort. The account register will not allow deletion of the generated splits, meaning you would not be able to modify an existing transaction but would have to create a new transaction and remove the split one.

Slots table in the database holds the links between the Lots and transactions, according to the documentation.

Resulting Account Register

The resulting transactions in the register look like this:

Lots Resulting register.png

The sale of 150 units was divided into two splits - those of 50 and 100 units, respectively. After each sale the capital gains transactions were created, pointing to Orphaned Gains account. These have to be adjusted to point to the capital gains account that you want to use for this purpose.

Conclusion

While this does not look like a very profitable financial investment, the investment in shared knowledge should still pay off in the future.