Advanced Portfolio report update

Mike Alexander mta at umich.edu
Sat Feb 15 01:00:15 EST 2014


--On February 14, 2014 10:37:15 PM +0000 Richard Ullger 
<rullger at gmail.com> wrote:

> Hi Mike,
>
> Please take this post as constructive comment based on my sole
> requirements. I respect that other user's requirements may differ and
> that you may decide to implement a different strategy for the report.

I would like to make it do what you want, but since different people 
sometimes have contradictory expectations, that may not always be 
possible.  I also don't want to add so many options that the report 
becomes too confusing to use.

I've included more comments below.

>
> Include brokerage fees in basis selected, ignore money moved to parent
> and sibling accounts not selected...
>
> Basis including expenses is correctly reported but money in is
> including reinvestments making it exactly the same as the basis. I
> would prefer money in to exclude reinvestments as that is not money I
> have put in myself. Other users that have voiced a preference for
> money in to include reinvestments could use the basis column as the
> two are exactly the same.

This is what the new option to ignore money moved to parent accounts is 
supposed to deal with.  Since it's not selected, the dividend that is 
first moved to an asset account and then moved back to reinvest is 
counted as money out and money in.  If you select that option neither 
of these will be true.  This still isn't working right, however.  This 
option doesn't affect the income column and probably should.  This 
means the numbers with the option not selected are not really right.  I 
need to think about this some more and see if I can figure out a good 
way to fix it.  It is probably possible to make this work more nearly 
correctly without using  this option, see the comments below.

> I would prefer the income column to report the full income amount
> received as in the previous version of the report instead of the
> residual income that has not been reinvested. You could keep a
> separate running total to use in the total return so that income
> doesn't get doubly reported.

After thinking about it more, I think that income should always include 
reinvested dividends.  See my comments below.

Let me see if I can rephrase what you want to make sure I understand it 
correctly.

 - Basis should include the cose of all stock purchased, no mater where 
the money came from.  I think this is correct in all cases now.

 - Money in should only include money in from external sources, not 
reinvested dividends.  I agree that this should be the case, the trick 
is how to do it.  If you ignore money from parent accounts, then this 
is what you get, but it might be possible to make it work without using 
this option.  I'll work on this some more.

 - Income should include all dividends, whether or not the were 
reinvested.  I think this is correct and will fix it unless someone 
points out why I shouldn't.

> Where a stock account has no sells, money out is reporting the
> reinvested income which I don't understand. I would expect money out
> to report the value of shares sold (in this case zero) plus any
> income that has not been reinvested.

This is related to the previous point.  If you select the ignore parent 
account option for your test case, money out will be zero.  If you 
don't select it, then the reinvested part of the dividend goes into 
both money in and money out.  If I change things so reinvested 
dividends are not counted as money in, regardless of any options, then 
money in will be zero if there are no other transactions.

>>
>> This version of the report calculates money in and out of the stock
>> account directly instead of inferring it from other splits.  In
>> connection with this change there is a new option that causes the
>> report to ignore money into or out of an account that is the parent
>> or a sibling of the account it is working on.  This can be used to
>> make certain DRP transactions work better if the dividend passes
>> through an parent or sibling account before being reinvested.
>
> Include brokerage fees in basis selected, ignore money moved to parent
> and sibling accounts selected.
>
> Without an example, I don't understand what the new option is intended
> to do. Basis is ok but the money in and money out columns show zeros.
> The rate of gain and rate of return columns are blank (not even
> zeroes).

The example is your test data:

> Acc		Tot Buy		Tot Sell
> Stock Account	366.95
> Commission	3.66
> Stamp Duty	1.83
> Cash				372.44
> Income			374.92
> Cash		374.92

Since the Cash account is a parent of the Stock account (isn't it?), 
the ignore option ignores money moved by the two Cash splits.  If this 
is the only transaction in the stock account, then money in and out 
will both be zero.  However in real life (and in my test file) there 
will probably be an earlier transaction that purchased the stock which 
is paying the dividend in this transaction.  If the money used to buy 
that stock came from an account that is not a parent or sibling of the 
stock account it will be counted as money in.

The rate of gain and rate of return columns are blank in this case 
because the denominator of both is zero.  Rather than printing 
infinity, it prints a blank entry.  I didn't change this behavior.

I'll see about fixing the problems mentioned above, although I want to 
think about it a bit to see if it looks like it will be just trading 
one set of problems for another.  As often happens, the process of 
explaining it to someone else makes me understand things better and I 
think I may be able to make things work more nearly the way you want.

I think now that income should always include all dividends, reinvested 
or not.  To go back to your example, assume a previous transaction that 
bought 1000 shares at 1.00.  Then after the dividend transaction, the 
basis is 1372.44 and the value is 1366.95.  The total return should be 
-5.49 unrealized gain (all due to brokerage fees included in the basis) 
plus the dividend of 374.92 or 369.43.  Right now the total return is 
-3.01 since only the non-reinvested dividend is included.  I think I 
was wrong when I said that the reinvested dividend shouldn't be 
included in income.  It's true that they are included in the basis, but 
they are also included in the current value (or realized gain if shares 
were sold).

It's too late to do this tonight, and I want to think about it some 
more, but I'll try to come up with a better version soon.

           Mike
 


More information about the gnucash-user mailing list