GnuCash
Contact   Instructions
Bug 798211 - Equity statement double calculates unrealized gain
Summary: Equity statement double calculates unrealized gain
Status: NEW
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Reports (show other bugs)
Version: git-maint
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: reports
QA Contact: reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-18 19:02 EDT by hong
Modified: 2021-06-24 16:57 EDT (History)
4 users (show)

See Also:


Attachments
The book (10.26 KB, application/x-gnucash)
2021-06-18 19:02 EDT, hong
no flags Details

Description hong 2021-06-18 19:02:45 EDT
Created attachment 374088 [details]
The book

Consider the following scenario.

1. At the beginning of April, I contributed $100 cash to the company. My equity at this moment is $100.
2. I purchased 10 shares of HYP (Hypothetical company) in mid April at $10/share. At this moment, my equity is $100.
3. On April 30, the price of HYP bumps to $20/share, and I put that into the price database. At this moment, GnuCash calculates my equity as $200, $100 of which is unrealized capital gain.
4. On May 31, the price of HYP bumps to $30/share. I put that into the price database. At this moment, GnuCash calculates my equity as $300, $200 of which is unrealized capital gain.

But the equity statement of May shows that my equity is $400:

  Equity Statement For Period Covering 05/01/2021 to 05/31/2021

        Capital, 05/01/2021		$200.00
        Net income for Period	$0.00	
        Investments for Period	$0.00	
        Withdrawals for Period	$0.00	
        Unrealized Gains	$200.00	
        Increase in capital		$200.00
        Capital, 05/31/2021		$400.00

It seems like the unrealized gain in April is calculated twice in this statement. I believe that "Unrealized Gains" in this statement is meant to be "Changes in Unrealized Gains".

I attached the book for reproducing this issue.
Comment 1 John Ralls 2021-06-18 19:18:23 EDT
The problem seems to be in the opening capital line. If one makes the start date 4/1/21 so that that line is 0 then the report is correct.
Comment 2 hong 2021-06-18 21:44:19 EDT
If we change the opening capital line to $100, then the opening capital of May would mismatch the ending capital of April.
Comment 3 Christopher Lam 2021-06-18 22:31:35 EDT
I've been trying to debug these reports for years. Any idea what would be the official definition of an equity statement?
Comment 4 John Ralls 2021-06-18 22:59:27 EDT
(In reply to hong from comment #2)
> If we change the opening capital line to $100, then the opening capital of
> May would mismatch the ending capital of April.

Hmm, didn't notice that.

I guess the intent might be for the statement to show the change in equity in the period and the unrealized gains line is showing the total instead of the increase for the period.

(In reply to Christopher Lam from comment #3)
> I've been trying to debug these reports for years. Any idea what would be
> the official definition of an equity statement?

I don't think it's a standard financial report. I guess the intent is something like an income statement to show changes in equity during the period.
Comment 5 hong 2021-06-24 16:57:35 EDT
I submitted a pull request to fix this: https://github.com/Gnucash/gnucash/pull/1053

Note You need to log in before you can comment on or make changes to this bug.