Advanced Portfolio and Profit/Loss

AmigaPhil AmigaPhil at ping.be
Sun May 10 12:44:48 EDT 2009


Jannick Asmus wrote:

> Thanks. Here another problem I could not solve yet: How is the sell of
> shares appropriately accounted for sucht that the realized gains or losses
> are shown in both the advanced portfolio and the P&L? Of course FIFO should
> be applied.
>
> How is that done? Any help would be highly appreciated.

Let's take an example to start.

Last month, you bought 10 shares at 10 EUR.
A week later, you bought 40 shares at 5 EUR.
Finally, you sold 20 shares at 8 EUR.

To register the gain/loss on a FIFO basis, you have to do that
in two steps:

- Sold the 10 shares you first bought:
  (10 * 8 EUR) - (10 * 10 EUR)
  Here you sold at loss (- 20 EUR).

- Sold 10 more shares from the second lot:
  (10 * 8 EUR) - (10 * 5 EUR)
  Here you sold with a profit (+ 30 EUR).

Register the two transactions in the shares account:

Leave the 'shares' and 'price' fields empty for both transactions.
For the first transaction, enter 20 in the 'sell' column.
For the second transaction, enter 30 in the 'buy' column.
Balance the 2 transactions with Incomes:Realised gains.
(If you want to keep a separate track of profits and loss, you can
also balanced the first transaction with something like
Expenses:Realised loss.)



There is an easier way to calculate profit/loss after you sell
some assets:

- Select the share account (do not open it, just hilight it),
- From the menu: Action >> Show lots, then click on 'Check account'

The gain/loss transactions are now added.  Edit them if you wish
to select the proper account (Incomes/Expenses) you want to use.



(Hope that's what you were looking for.)

AmigaPhil



More information about the gnucash-user mailing list