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 725197 - Balance Sheet Report calculates stock values incorrectly
Balance Sheet Report calculates stock values incorrectly
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: Reports
2.6.1
Other Linux
: Normal major
: ---
Assigned To: gnucash-reports-maint
gnucash-reports-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-26 06:28 UTC by Richard
Modified: 2018-06-29 23:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Richard 2014-02-26 06:28:41 UTC
If I create a Balance Sheet, stock values are calculated incorrectly.

For example,

If I buy 300 shares of XYZ at $20.00, the asset value will be reported
(correctly) as $6000.00.

If the price of XYZ is later updated to $35.00, the asset value is still
reported at $6000.00. I think the reported asset value should track the price
of the stock.

If I then sell 100 shares of XYZ at $40.00, the report shows the value of my
XYZ holdings as $2000.00 (which seems to come from the initial investment, minus
the proceeds of the sale, or $6000.00 - $4000.00). It should be the product of
the remaining number of shares (200) and the price per share ($40.00), or $8000.00.

If I sell another 50 shares at $40.00, the asset value goes to zero ($6000 - $4000 - $2000), even though I still have 150 shares which are worth $40 per
share.

If I sell another 100 shares at $50.00, the report shows a value of $5000, which
is the sum of the proceeds of the three sales ($4000 + $2000 + $5000) minus the
original cost ($6000).

In other words, the calculated value of my asset seems to be

   abs( (sum of investments) - (sum of proceeds of sale) )

which is a meaningless number.

Oddly enough, when I do sell all of my remaining shares, the asset value then
goes to zero, abandoning the above formula.
Comment 1 Richard 2014-02-26 06:43:39 UTC
I also observed that the "Unrealized Gain" in the report changes when I sell the
remaining shares. But it does not change for any of the other transactions.
Comment 2 John Ralls 2018-06-29 23:27:30 UTC
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=725197. Please continue processing the bug there and please update any external references or bookmarks.