Skip to content

bugfix: Erroneous values in line 2400 (net profit)#8

Merged
memoryfull merged 4 commits intomainfrom
bugfix-netprofit-2025-04
May 13, 2025
Merged

bugfix: Erroneous values in line 2400 (net profit)#8
memoryfull merged 4 commits intomainfrom
bugfix-netprofit-2025-04

Conversation

@sergey-bondarkov
Copy link
Copy Markdown

@sergey-bondarkov sergey-bondarkov commented Apr 22, 2025

The reason for the incorrect values was the sign with which the profit tax (line 2410) enters the calculation for adjusting net profit (2400).

In the reporting forms, there are lines with values enclosed in parentheses: this means that they can only be negative, but they need to be entered as positive. However, it sometimes happens that companies enter negative values in these fields. To correct this, during the data preparation stage, we make all values of the ()-ed lines positive. At first, I thought it was there that the problem occurred, because I missed line 2410 while compiling the list of ()-ed lines. But this was not the case: the list is correct, and line 2410 can indeed be both negative and positive — but only in the full statement form. In simplified form it is strictly negative, in parentheses. This is a useful side finding: now the correction of the ()-ed lines occurs separately for the firms that use simplified and non-simplified forms for their statements.

The error was further down the process, in the values adjustment part, where we check summary lines like 2400 against their recalculated values and change them if the difference is more than 4000 rubles. To subtract the profit tax from profit, we multiplied line 2410 by -1, as if it were ()-ed while it wasn't. I corrected this and changed the logic for adjusting line 2410 itself: previously, we adjusted it based on lines 2411 and 2412 only starting from 2020, when its content changed, but now the logic is expanded to all years. This should help with companies that were the first to implement the changes back in 2019, and it does not break anything for others. I checked it on a random set of selected companies, and it looks fine.

@sergey-bondarkov sergey-bondarkov force-pushed the bugfix-netprofit-2025-04 branch from 1465ce3 to 2e2b960 Compare April 25, 2025 16:52
@sergey-bondarkov
Copy link
Copy Markdown
Author

sergey-bondarkov commented Apr 25, 2025

Upon further investigation, I found bugs in adjustment of lines 1300 and 2500 (#9) and, more importantly, inconsistency in of handling signs in negative-only and signed variables (#10). As resolving both #7 and #9 were dependent on resolving #10 they are all fixed in one commit #8.

The updated lines 2400 are quite different from the original values. The value of line 2400 changed in 6-11% of observations in 2011-2018 and in about 25% observations in 2019-2023, the summed difference in the original and new values ranges from 5% to 110% depending on year. The fix for sign inconsistency implies revising scripts for all calculations where negative-only, those ()-ed in statement forms, variables were used.

@memoryfull
Copy link
Copy Markdown
Contributor

LGTM, thank you.

@memoryfull memoryfull merged commit 12d6f34 into main May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants