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

Invalid data in financial statements #28

Open
bbkrr opened this issue Apr 8, 2022 · 0 comments
Open

Invalid data in financial statements #28

bbkrr opened this issue Apr 8, 2022 · 0 comments

Comments

@bbkrr
Copy link

bbkrr commented Apr 8, 2022

SEC-API provides financial statements in separate tables such as BalanceSheet, StatementsOfIncome and many others.

But looking at some of the companies/cik the xbrl_to_json api is providing data from some other tables which does not belong to the Balancesheet or the StatementsOfIncome

One such company is 0000764897

If we select only the RevenueFromContractWithCustomerExcludingAssessedTax of the company in StatementsOfIncome,
it gives some extra data which is not present in StatementsOfIncome, rather in some other tables.

from sec_api import XbrlApi

xbrlApi = XbrlApi(api_key)

url = "https://www.sec.gov/Archives/edgar/data/0000764897/000156459021018959/brst-10k_20201231.htm"

json_statements = xbrlApi.xbrl_to_json(htm_url=url)

revenues = [rev for rev in json_statements['StatementsOfIncome']['RevenueFromContractWithCustomerExcludingAssessedTax'] 
 if rev['period']['endDate'] == '2020-12-31']

print(revenues)

Output:

[{'decimals': '-3',
  'unitRef': 'U_iso4217USD',
  'period': {'startDate': '2020-01-01', 'endDate': '2020-12-31'},
  'segment': {'dimension': 'srt:ProductOrServiceAxis',
   'value': 'brst:CommissionsMember'},
  'value': '2437000'},
 {'decimals': '-3',
  'unitRef': 'U_iso4217USD',
  'period': {'startDate': '2020-01-01', 'endDate': '2020-12-31'},
  'segment': {'dimension': 'srt:ProductOrServiceAxis',
   'value': 'brst:ManagementAndOtherFeesMember'},
  'value': '1358000'},
 {'decimals': '-3',
  'unitRef': 'U_iso4217USD',
  'period': {'startDate': '2020-01-01', 'endDate': '2020-12-31'},
  'segment': [{'dimension': 'srt:ProductOrServiceAxis',
    'value': 'brst:LeasingCommissionsMember'},
   {'dimension': 'us-gaap:AdjustmentsForNewAccountingPronouncementsAxis',
    'value': 'us-gaap:AccountingStandardsUpdate201409Member'},
   {'dimension': 'us-gaap:TimingOfTransferOfGoodOrServiceAxis',
    'value': 'us-gaap:TransferredAtPointInTimeMember'}],
  'value': '2313000'},
 {'decimals': '-3',
  'unitRef': 'U_iso4217USD',
  'period': {'startDate': '2020-01-01', 'endDate': '2020-12-31'},
  'segment': [{'dimension': 'srt:ProductOrServiceAxis',
    'value': 'us-gaap:AssetManagement1Member'},
   {'dimension': 'us-gaap:AdjustmentsForNewAccountingPronouncementsAxis',
    'value': 'us-gaap:AccountingStandardsUpdate201409Member'},
   {'dimension': 'us-gaap:TimingOfTransferOfGoodOrServiceAxis',
    'value': 'us-gaap:TransferredOverTimeMember'}],
  'value': '711000'},
.....
.....
.....
]

Extra data are fetched from the following tables,

Screen Shot 2022-04-06 at 15 57 50

Screen Shot 2022-04-06 at 15 58 04

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

No branches or pull requests

1 participant