Advanced Portfolio Income (maybe Brokerage Fees too) incorrect in switch and multiple investments transactions

Mike Alexander mta at umich.edu
Sun Jan 29 22:07:49 EST 2017


> On Jan 11, 2017, at 2:35 PM, Alberto Dante <alberto.dante at gmail.com> wrote:
> 
> I'm sorry for the long delay due to end year holidays.
> Please have a look at attached files (screenshots are of the Advanced Portfolio reports).
> You can compare results using split transactions (wrong report results) and no-split transactions (with DUMMY BANK right report results, as account tree values) in the following cases:
> 1) Switch Investments (FUND 1 and 2)
> 2) Multiple Investments (FUND 3 and 4)
> 3) Reinvested dividends (FUND 5)
> I think user manuals should emphasize that split transactions must be avoided in order to have right Advanced Report results (for not-so-experienced users as me).
> I've lost many time to separate lot of split investment transactions.

Sorry for the delay, I haven’t been checking EMail too well the last few weeks.

Thanks for the example files, they help a lot.  I have several comments that might or might not help.

First, as you’ve surmised, the APR makes the assumption that any given transaction will only buy or sell at most a single security.  Things like your case of buying fund 3 and 4 or selling fund 1 and buying fund 2 in a single transaction are not handled correctly.  Changing this would be difficult since a number of assumptions would have to be made and they wouldn’t be right in all cases.

Second, things might work better if you reversed the bottom two levels in your account hierarchy.  I.e., instead of “…:FUND 1:Capital Gain” and “…:FUND 1 Fee / Commission” you used “…:Capital Gain:FUND 1” and “…:Fee / Commission:FUND 1”.  The important thing is that the leaf account name “FUND1" be the same in the income/Expense and Asset accounts.  I know you may not like this, but this is the way the APR expects things to be set up.  I think your reinvested dividends example might work better in this case.  I know I’ve tested that sort of transaction and it works fine, although I can’t guarantee that my example is exactly the same as yours would be in that case.

Third, as I said above it’s probably not going to be reasonable to buy or sell multiple securities in the same transaction so some sort of holding account for the assets is going to be necessary.  In my case I use the parent account of the securities accounts as the account to hold the assets used in the purchase or sale.  I record a transfer from my bank account to my equivalent of “Broker DEF” and then record a purchase or sale of “FUND n” using “Broker DEF” as the source or destination of funds.  This actually models real life better in my case.  I send money to my broker who deposits it in my account.  Sometime after this (or before) the broker buys or sells the asset using money that is (or soon will be) in my account.  Usually the amount of money transferred from my bank account isn’t exactly the same as the cost of the asset since my broker account already has a cash balance.  The balance in “Broker DEF” represents this cash balance.

For things like your sale of FUND 1 with assets used to purchase FUND 2, I would deposit the assets from the sale in the broker account and then use them to buy FUND 2.  This also models real life fairly well, especially if the cost of FUND 2 isn’t exactly the same as the proceeds from the sale of FUND 1 (which seems to be the usual case for me).  This also makes it easy to record which fees go with the sale and which fees go with the purchase.  It also simplifies recording any capital gain from the sale.

I hope this sheds some light on things.  Perhaps some of this information should go into the documentation.  If you have further questions or comments, I’d be glad to hear them.

          Mike



More information about the gnucash-user mailing list