Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing of Presentation Linkbase for UK submissions #20

Closed
shadow111 opened this issue May 25, 2021 · 11 comments
Closed

Parsing of Presentation Linkbase for UK submissions #20

shadow111 opened this issue May 25, 2021 · 11 comments
Assignees
Labels
question Further information is requested

Comments

@shadow111
Copy link

Hello,
is possible to map the extract facts to these subreport :
cashFlow,
balanceSheet,
profitAndLoss
Best

@shadow111 shadow111 added the bug Something isn't working label May 25, 2021
@manusimidt manusimidt added question Further information is requested and removed bug Something isn't working labels May 25, 2021
@manusimidt manusimidt self-assigned this May 25, 2021
@manusimidt
Copy link
Owner

Yes, the presentation linkbase structures the different facts from the instance document into multiple sections and tables.
I will add an example and screenshot later...

@manusimidt
Copy link
Owner

The presentation linkbase describes by its hierarchy the order in which the concepts of the taxonomy are to be arranged.
Here you can see how the structure of the Balance Sheet is represented in the presentation linkbase of the extending taxonomy.

image

The screenshot is from a parsed instance document from adobe.

Feel free to ask here, or also in the discussion form if you need further explaination.

@Pablompg
Copy link
Contributor

can you please explain how to extract the linkbase using your library for this given file for example please?
https://drive.google.com/file/d/1ClSSbO79M3yJqB2Ml2KCHvXECUDOOCnA/view?usp=sharing

I think you have shared a wrong url. There is no way to extract a linkbase from a doc file.

@shadow111
Copy link
Author

@Pablompg
Copy link
Contributor

Pablompg commented May 26, 2021

I am also having problems getting information from the the presentation linkbase. In my case I am getting the information from: microsoft 10k-2020 instance document and the object instance.taxonomy.pre_linkbases does not contain the same information as the linkbase document. It is missing all the locators and definitionArcs. I have spent a few hours looking into the code but I can't find where the error is.

@manusimidt
Copy link
Owner

@shadow111 On first sight it seems to me as the instance document you are referencing is a submission from the uk companies house, correct? The UK follows a strict reporting policy and thus does not allow for company specific extension taxonomies.
This means that all submissions use the same taxonomy and also the same presentation linkbase.
i.e: from your file:

<link:schemaRef xlink:type="simple" xlink:href="https://xbrl.frc.org.uk/FRS-102/2019-01-01/FRS-102-2019-01-01.xsd" />

In the past i really only tested on SEC Submissions which use custom extension taxonomies. So it could well be that there are problems parsing uk submissions. I will check today or tomorrow if the parser correctly parses the presentation linkbase.

@manusimidt manusimidt changed the title Is It possible to map the extracted fact for cashFlow, balanceSheet, profitAndLoss SUBREPORT? Parsing of Presentation Linkbase for UK submissions May 26, 2021
@manusimidt
Copy link
Owner

manusimidt commented May 27, 2021

@shadow111 I started with the question from @Pablompg, because I am already very familiar how the SEC EDGAR submissions are structured. But perhaps the explaination also helps you:
#21 (comment)

Later today i will have a look at the same thing with the UK submission you referenced.

@manusimidt
Copy link
Owner

I was able to print the presentation linkbase for the submission you provided with the same code that I have shown in #21 (comment).
However due to the closed reporting model the presentation linkbase for the UK submissions looks way uglier than the linkbases from the extension taxonomy of SEC submissions.

Differences between open and closed reporting:

  • Open Reporting (SEC)
    In a open reporintg model the filer is able to create a own taxonomy and thus can customize the presentation linkbase to his own xbrl submission.
  • Closed Reporting (UK Company House)
    In a closed reporting model, the filer is not able to create a custom taxonomy for his submission. This means that all filings use the same taxonomy and thus the same presentation linkbases which are therefore very detailed to cover the needs of every filer.

More information: https://www.xbrl.org/guidance/xbrl-and-ixbrl/#3-open-and-closed-reporting

@shadow111
So back to your question:

is possible to map the extract facts to these subreport :
cashFlow,
balanceSheet,
profitAndLoss

Yes it would be possible but it currently would require a bit of effort to map the facts to the presentation linkbase.
Currently the parser only parses the linkbase but does nothing with it.
To map the facts to the different financial statements/tables i would basically do the following:

Here is a snipped from the console output that the code in #21 (comment) produces for the given instance document:

======== ../../fr/2019-01-01/core/frc-core-2019-01-01.xsd#balanceSheetFRS102 ========
 core_BalanceSheetFormat1Heading
   core_CalledUpShareCapitalNotPaidNotExpressedAsCurrentAsset
   core_FixedAssets
     core_UseContinuingDiscontinuedDimensionToIdentifyHeldForSaleValuesGuidance
     core_IntangibleAssets
     core_PropertyPlantEquipment
     core_InvestmentsFixedAssets
       core_UseCurrentNon-currentDimensionToIdentifyCurrentNon-currentValuesGuidance
       core_InvestmentsInGroupUndertakings
       core_LoansToGroupUndertakings
       core_InvestmentsInAssociatesJointVenturesParticipatingInterests
       core_LoansToAssociatesJointVenturesParticipatingInterests
       core_OtherInvestmentsOtherThanLoans
       core_OtherLoansClassifiedUnderInvestments
       core_OwnShares
     core_InvestmentProperty
     core_BiologicalAssetsNon-current
   core_CurrentAssets
     core_TotalInventories
     core_BiologicalAssetsCurrent
     core_Debtors
       core_UseCurrentNon-currentDimensionToIdentifyWithinOneYearAfterOneYearValuesGuidance
       core_TradeDebtorsTradeReceivables
       core_AmountsOwedByGroupUndertakings
       core_AmountsOwedByAssociatesJointVenturesParticipatingInterests
       core_OtherDebtorsBalanceSheetSubtotal
       core_CalledUpShareCapitalNotPaidCurrentAsset
       core_PrepaymentsAccruedIncome
       core_DeferredTaxAssetDebtors
     core_CurrentAssetInvestments
       core_UseCurrentNon-currentDimensionToIdentifyCurrentNon-currentValuesGuidance
       core_InvestmentsInGroupUndertakings
       core_OwnShares
       core_OtherCurrentAssetInvestmentsBalanceSheetSubtotal
     core_CashBankOnHand
   core_PrepaymentsAccruedIncomeNotExpressedWithinCurrentAssetSubtotal
   core_NetCurrentAssetsLiabilities
   core_TotalAssetsLessCurrentLiabilities
   core_Creditors
     core_UseCurrentNon-currentDimensionToIdentifyWithinOneYearAfterOneYearValuesGuidance
     core_TradeCreditorsTradePayables
     core_DebenturesInIssue
     core_BankBorrowingsOverdrafts
     core_PaymentsReceivedOnAccount
     core_BillsExchangePayable
     core_AmountsOwedToGroupUndertakings
     core_AmountsOwedToAssociatesJointVenturesParticipatingInterests
     core_OtherCreditorsIncludingTaxationSocialSecurityBalanceSheetSubtotal
     core_AccruedLiabilitiesDeferredIncome
   core_ProvisionsForLiabilitiesBalanceSheetSubtotal
     core_RetirementBenefitObligationsSurplus
     core_TaxationIncludingDeferredTaxationBalanceSheetSubtotal
     core_OtherProvisionsBalanceSheetSubtotal
   core_AccruedLiabilitiesNotExpressedWithinCreditorsSubtotal
   core_NetAssetsLiabilities
   core_Equity

@shadow111
Copy link
Author

Thanks, it's working fine for uk submissions

@mrx23dot
Copy link
Contributor

mrx23dot commented Aug 25, 2021

These are the naming conventions I have seen, they are useful for selecting the correct fact if listed multiple places.

balance-sheet
  aapl-20200926.xsd#CONSOLIDATEDBALANCESHEETS
  nacco-20210630.xsd#UnauditedCondensedConsolidatedBalanceSheets
  mrna-20210630.xsd#CONDENSEDCONSOLIDATEDBALANCESHEETS

income
  aapl-20200926.xsd#CONSOLIDATEDSTATEMENTSOFOPERATIONS
  nacco-20210630.xsd#UnauditedCondensedConsolidatedStatementsofOperations
  mrna-20210630.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONS

cash-flow
  aapl-20200926.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWS
  nacco-20210630.xsd#UnauditedCondensedConsolidatedStatementsofCashFlows
  mrna-20210630.xsd#CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS

How can I list facts under a given section in an efficient way? eg:

for fact in inst['aapl-20200926.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWS'].facts:
  # items in balance sheet section only

Or decide if fact belongs to given presentation arc 'aapl-20200926.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWS' ?
inst.facts is on a different branch from inst.taxonomy in the object tree.
Should the fact have a reference to the related taxonomy inside it? (added by 'for fact_elem in fact_elements')

@mrx23dot
Copy link
Contributor

Answered in #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants