JeffFerguson / gepsio

Gepsio is a document object model for XBRL documents based on .NET 6.
http://gepsio.wordpress.com
MIT License
68 stars 26 forks source link

Incorrect Sign On Some Numeric Facts #15

Open JeffFerguson opened 6 years ago

JeffFerguson commented 6 years ago

From a user email:

I still can't seem to get the correct value for some facts.

For example: (the interactive report is here: https://www.sec.gov/cgi-bin/viewer?action=view&cik=845877&accession_number=0000845877-17-000155&xbrl_type=v#)

CashFlow (CONSOLIDATED STATEMENTS OF CASH FLOWS) fact 'us-gaap_PaymentsToAcquireLoansHeldForInvestment', the raw value in .xml file is 1047001 but I expect -1047001.

Similarly, for 'us-gaap_RepaymentsOfDebt' I expect -3416300 but actual is 3416300.

mapiracha commented 6 years ago

Here is one more example:

I am trying to retrieve NetIncomeLossAttributableToNoncontrollingInterest NoncontrollingInterestMember value from Q1 2017 data ([SEC link to data](https://www.sec.gov/cgi-bin/viewer?action=view&cik=845877&accession_number=0000845877-17-000092&xbrl_type=v#

equitystatement_netincomelossattributabletononcontrollinginterest

))

The fact xml from agm_20170331.xml is below:

15000 The absolute value is 15000, but in the "CONSOLIDATED STATEMENTS OF EQUITY Statement" at SEC site showing the value as -15000 (negative 15). The presentation link (agm-20170331_pre.xml) is available and it has the reference to the above fact. However, there are no facts in Calculation link base (agm-20170331_cal.xml). My guess is perhaps there are few more xml files - probably from the default gaap - that need to be analyzed to determine the correct sign. I hope this helps. equitystatement_netincomelossattributabletononcontrollinginterest
JeffFerguson commented 6 years ago

Thank you for the additional information! Do you, by chance, have URLs to the XBRL document instances?

JeffFerguson commented 6 years ago

My guess is that it has to do with Gepsio possibly not respecting the decimals=-3 sign in the <us-gaap:NetIncomeLossAttributableToNoncontrollingInterest contextRef="FD2017Q1YTD_us-gaap_StatementEquityComponentsAxis_us-gaap_NoncontrollingInterestMember" decimals="-3" id="Fact-080C7834C860474640CE01C86E8BFB62" unitRef="usd"> element, but I would like to check to be sure.

mapiracha commented 6 years ago

Here is the link to xbrl instance: https://www.sec.gov/Archives/edgar/data/845877/000084587717000092/agm-20170331.xml

So far, I did not see any issues with decimals. All decimal values have expected zeros.