Chapter 8 - investment accounts

John Ralls jralls at ceridwen.fremont.ca.us
Sun Nov 3 12:37:07 EST 2013


On Nov 3, 2013, at 3:57 AM, Jamestk <davidjamestk at hotmail.co.uk> wrote:

> Hello all and thanks for reading a somewhat tedious post.
> 
> Over the past 12 months I have migrated all of my accounts over to GNU cash
> with one exception, Investment  Accounts. The reason for this is the complex
> way in which GNU Cash appears to handle this type of account.
> 
> I have two installations of GNU cash on two separate machines, one for
> actual data entry and the other for testing and setting up new accounts.
> 
> Being UK based a lot of the pre-defined terminology for auto account
> hierarchy set-up is not applicable, I therefore have opted for the manual
> account set-up as follows.  
> 
> *>Current Assets>My Broker ABC>IBM*
> 
> So under the Current Assets tab (hierarchy) I have set up a 'stock' account
> called 'My broker ABC' followed by a sub account 'IBM' which is the stock
> being bought/sold.
> 
> Both accounts are set-up as 'stock' accounts, should the broker account be a
> current account?
> 
> Looking at the auto set-up here 
> http://gnucash.org/docs/v2.4/C/gnucash-guide/invest_accounts1.html
> <http://gnucash.org/docs/v2.4/C/gnucash-guide/invest_accounts1.html>   you
> have 'my stockbroker' under three different section, 'Assets, 'Income and
> 'Expenses'.
> 
> I assume this is to record the three different types of income/expense
> received/paid to 'My Stockbroker' ?
> 
> Also when entering splist transactions GNU Cash tends to 'orphen' a lot of
> the balances for which I can see no reason. Data entry for one trade takes
> ages due to constantly deleting lines filled in when competing a
> transaction. Using the normal current or credit/loan accounts is far simpler
> which makes me think something is very wrong in my trial set-up?
> 
> My last question which I have yet to try is netting off one transaction
> against another, ie. you purchase say three lots of the same stock on
> different days then on the forth day you sell one lot - can you nominate the
> purchase for which the sale is set-off against?
> 

It works better to make the Brokerage asset account of type Assets rather than Stock, because
one will usually have a cash/money market account of type Bank inside of a brokerage account and making the enclosing account of type Stock precludes that. Although you didn't ask about it, you generally want to mark the container account as a placeholder to prevent accidentally entering splits at the upper level.

The brokerage expense account isn't strictly necessary if you net commissions into purchase and sale amounts. That's how US tax authorities want it done, but it might be different in other countries. 

I don't use the Advanced Portfolio Report (Reports>Assets & Liabilities>Advanced Portfolio Report), but I think it might use a mirror of the brokerage hierarchy under income for tracking dividends and interest in order to compute total return. I just have some dividend accounts (long-term, short-term, and tax-exempt to reflect US tax law) set up per brokerage.

I've also never tried to import stock trade transactions, but IIRC others have said here that the importers aren't quite clever enough to handle them.

Yes, by all means enter stock transactions first from the cash account from which the payment will come or to which the proceeds will go. Note that if you use the completion feature the price will be copied as well and you'll have to correct it in the stock account. For sales, you then switch to  the stock account and enter the gain or loss as a cash amount with the shares column blank and balance it to the appropriate income account, again with the shares column blank. Take care not to use <Enter> until you have finished entering those two splits. Detailed instructions are in 
http://gnucash.org/docs/v2.4/C/gnucash-guide/invest-sell1.html

I have tried the Lots mechanism and found it problematic, so I enter the gains splits by hand as above. It has hooks for sale allocation other than FIFO, but no-one has ever implemented any of them. It also puts the G/L splits in a separate transaction and uses a hard-coded top-level account -- "Orphan Gains USD" (or GBP in your case) -- which means all of the gains splits have to be moved to the right account after "scrubbing". Unfortunately, moving them confuses it for subsequent scrubs if you've got more than one sale in a single lot. 

Regards,
John Ralls


More information about the gnucash-user mailing list