custom separate trading accounts

Mike Alexander mta at umich.edu
Thu May 22 18:20:11 EDT 2014


--On May 22, 2014 1:53:11 AM -0700 gnucash.133518b at telus.net wrote:

> I have two separate reasons to enable GnuCash trading accounts. The
> first is because I have bank and expense accounts in two different
> currencies and wish to benefit from the advantages documented by
> Peter Selinger:
>
>    http://www.mscs.dal.ca/~selinger/accounting/tutorial.html
>
> The second reason relates to investments and derives from the section
> in that document entitled "Realized and unrealized gains and losses".
> I happen to live in Canada which uses the adjusted cost base method.
> To quote Peter, "in the adjusted cost base system, it is possible to
> calculate the amount of the realized gain or loss without looking at
> the entire history of purchases and sales. ... you will discover that
> the adjusted cost base at any given time is exactly equal to the CAD
> portion of the trading account. ... the trading account precisely
> mirrors the historical cost of shares. The realized gain or loss of a
> sales transaction can therefore be calculated simply by looking at
> the trading account balance just prior to the sale. Of course, this
> only works if there is a separate trading account for each kind of
> shares owned". I believe it would greatly simplify ACB calculations
> for me if I can implement those separate trading accounts Peter
> speaks of.
>
> GnuCash automagically creates and populates whatever trading accounts
> are required. This is very convenient, but it does NOT create
> separate accounts for each kind of share and its corresponding
> currency. For example, no matter how many different investment
> accounts might hold the Canadian SHA share, all will automatically
> use these same two trading accounts, namely Trading:TSX:SHA and
> Trading:CURRENCY:CAD. Moreover, Trading:CURRENCY:CAD is also being
> used for simple CAD/USD expense transactions. What this means is that
> Trading:CURRENCY:CAD is of no use to me in determining the current
> ACB for the SHA shares in any particular investment account because
> it aggregates everything.
>
> Instead of using Trading:TSX:SHA and Trading:CURRENCY:CAD, what I
> really need is for Assets:Investments:ThisStockAccount to utilize
> something like Trading:ThisStockAccount:SHA and
> Trading:ThisStockAccount:CAD. It would be great if this was a
> configurable item, but it doesn't seem to be (feature request). It
> does seem I can manually create those separate trading accounts and
> then manually modify each transaction to use them, but before I
> commit to that path I would like to know whether there are any
> pitfalls in doing this, especially since I don't know how much
> automatic behaviour is behind the trading account implementation. Any
> typos or errors in entering a transaction like this have the very
> irritating side effect of automatically tossing in an extra pair of
> Trading:TSX:SHA and Trading:CURRENCY:CAD splits that have to be
> manually weeded back out, but I'm hoping this is survivable. Are
> there any reasons why I will regret manually forcing custom separate
> trading accounts like this?

Interesting.  I hadn't read this tutorial for a while and had forgotten 
about that aspect of it.  Adding separate trading accounts like this 
would be possible, although I don't know offhand how much trouble it 
would be.  I don't know for sure whether emulating this by hand would 
work well or not, but I can't see why it wouldn't.  Once the trading 
account splits are created, there's nothing special about them. 
Changing them is certainly possible.

On the other hand you might want to look at the advanced portfolio 
report.  If you use the "average cost" basis method it might produce 
the results you need.  If not, it might be easier to fix it than to 
change the way trading accounts work.

               Mike
 


More information about the gnucash-user mailing list