This is how I do, and I’m not sure it’s the correct way to go but it works for me so far. Say you have $ 2000 on your broker account as a starting balance, it should be written like this
2019-01-01 * Broker Assets:Broker $2000 Equity Imagine on the next day you want to purchase 10 apple stocks, currently trading at $100 and your broker charges you $1 for the transaction, it should be written something like this: 2019-01-02 * Bought 10 AAPL Assets:Stocks:AAPL 10 AAPL Assets:Broker -$1001 Ledger you calculate that each of your AAPL stock is worth $ 100,1 for you Say the next day the stock goes up to 102 and you intend to sell it, the broker will charge you $1 for the transaction it should be registered somewhat as follow: 2019-01-03 * Sold 10 AAPL Assets:Broker $ 1019 Assets:Stocks:AAPL -10 AAPL Income:Capital_Gain If you do it this way, ledger will report that you have a capital gain of $ 18 ($1019 - $ 1001) on this transaction if you use the -V syntax, though I’m not sure if it uses FIFO or calculates the average price, if more AAPL stock is bought before being sold. I’m sure someone can shed a light on it. On Wednesday, April 17, 2019 at 8:49:36 AM UTC-3, Alen Šiljak wrote: > > Hi, Klaus. Thank you for the info. I'm not sure I understand completely, > though. > > I'm following a simple scenario, as described at > https://www.gnucash.org/docs/v3/C/gnucash-guide/invest-retofcap.html. > The transaction marks the return of AU$ amount from an account that holds > shares (IPE). In GnuCash, this is possible due to two separate fields for > amount (currency) vs quantity (shares). > > I'm not really interested in price in this specific case. Nor is there any > price specified in the record. The transaction contains the following: > - $79 goes OUT of IPE account > - $79 goes INTO Cash account > > - $79 goes OUT of Trading:AUD account (to balance the currency trade part) > - $79 goes INTO Trading:IPE account. > > I'm actually still trying to understand what the actual problem is, tying > the real world and different ways to record it in different software. :) > > > On Wednesday, 17 April 2019 13:43:05 UTC+2, Klauss Hass wrote: >> >> I tried tracking broker expenses as the way you’re doing and found it >> hard to track capital gain and income taxes. >> >> If I’m not mistaken it is a better practice to ledger calculate the asset >> price according to the amount debited/credited on your broker account. >> >> -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
