After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603426 - Advanced Portfolio report - has blank columns for some stocks
Advanced Portfolio report - has blank columns for some stocks
Status: RESOLVED DUPLICATE of bug 587875
Product: GnuCash
Classification: Other
Component: Reports
2.3.x
Other Linux
: Normal normal
: ---
Assigned To: gnucash-reports-maint
gnucash-reports-maint
Depends on:
Blocks:
 
 
Reported: 2009-11-30 23:38 UTC by Jonathan Mark
Modified: 2018-06-29 22:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple test database showing Advanced Portfolio issue (2.66 KB, application/octet-stream)
2009-11-30 23:38 UTC, Jonathan Mark
Details
GnuCash file with updates in stock selling transaction for TGT (2.84 KB, application/x-gnucash)
2013-04-27 14:41 UTC, Carsten Rinke
Details

Description Jonathan Mark 2009-11-30 23:38:55 UTC
Created attachment 148797 [details]
simple test database showing Advanced Portfolio issue

For a stock which has been bought, sold, and bought again, the Advanced Portfolio report shows only a dollar sign (no digits) in the following columns:
Basis, Realized Gain, Unrealized Gain, Total Gain

This happens only with "Basis Calculation Method" set to "Average" (the default) in report options.

The attached database "test" shows this... the report columns are blank for stock account "TGT".  There is another stock account "RHT" which has only a single purchase, so does not show the problem.
Comment 1 Paweł Brodacki 2011-01-28 18:18:13 UTC
I have encountered the same bug in 2.4.0.
Comment 2 Carsten Rinke 2013-04-27 14:41:57 UTC
Created attachment 242659 [details]
GnuCash file with updates in stock selling transaction for TGT

When I work on the GnuCash file as attached by Jonathan I get the same effect.

But looking at the selling transaction for the TGT stock account it does not look like I expect it after reading the concept and tutorial guide.

I add an attachment where I changed the selling transaction according to my understanding how it should be done (involving a new checking account).

With this file, the Advanced Portfolio Report does not show empty fields anymore.

Would be good if Jonathan could check.

Right now, I would not confirm this bug.
Comment 3 Carsten Rinke 2013-04-27 14:42:45 UTC
Sorry, forgot to menation: Tried with GnuCash 2.4.10 and 2.5.0 on Ubuntu 12.04.
Comment 4 Jonathan Mark 2013-04-30 20:25:01 UTC
It looks like the problem is caused by using the "Scrub Account" feature which sets up lot allocation.

In Carsten's example file (with Gnucash 2.4.13), if I open the TGT account, choose menu "Actions / View Lots", then push the "Scrub Account" button:
Now the Advanced Portfolio report will show the unexpected blank fields.

(In this case the Scrub Account button also produces an incorrect result, because it adds a Realized Gain transaction, which is wrong since Carsten already entered the realized gain as part of the stock sale.)

So I think the Scrub Account feature behaves inconsistently with section 8.7 of the Tutorials and Concepts guide, and with the Advanced Portfolio report.  I am not sure what to suggest, but maybe Scrub Account should go away?
Comment 5 Carsten Rinke 2013-05-01 12:17:58 UTC
Did you read http://wiki.gnucash.org/wiki/Concept_of_Lots ?

I did, but I did not really get the idea out of it :-(
(As I am neither from the US nor a native English speaker, neither do I have any accounting background, this chapter is really hard to read for me).

I just noticed, if you press the Scrub Account button you will see this problem if the basis calculation method is set to "Average". It still gives you a result for FIFO or LIFO.

Does that make sense with the context what is described on the Wiki page?
Could that mean, there is no problem with the Scrub Account as such, but with the calculation method set to Average?
Comment 6 Jonathan Mark 2013-05-01 20:29:09 UTC
You are right, there must be a bug in the Average cost basis calculation.  The problem only occurs with Average.

If there is a problem with Scrub Account, it is a separate issue.

I think ideally, Advanced Portfolio would use lots (if they exist) to find the cost basis.  (Not FIFO or LIFO or Average method.)

However, maybe this is not necessary, since the Lots feature seems incomplete.  (For example, having only FIFO allocation, not handling stock splits correctly, and being inconsistent with the documentation of how to handle realized gains, as I said above.)

Thanks, please email me if I can explain anything better.
Comment 7 Geert Janssens 2013-12-08 15:38:54 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 587875 ***
Comment 8 John Ralls 2018-06-29 22:31:26 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=603426. Please update any external references or bookmarks.