antgoldbloom / xbrl_parser Goto Github PK
View Code? Open in Web Editor NEWParsing Raw XBRL to JSON
Parsing Raw XBRL to JSON
From Presentation XML
document date -> Statement -> metric -> order [DONE]
document date -> Statement -> metric -> link from [DONE]
document date -> Statement -> metric -> link to [DONE]
From Instance XML
document date - > Statement -> metric -> date -> value [DONE]
[QUESTION]: Am I handling YTD sensibly?
From Label XML
document date -> Statement -> metric -> label
From XSD
document date -> statement -> statement name
These are for foreign companies listed on a US exchange.
40-F is for Canadian companies. 20-F is for everything else.
This is what I'm aiming to replicate
https://www.sec.gov/cgi-bin/viewer?action=view&cik=1018724&accession_number=0001018724-20-000010&xbrl_type=v#
We lose history for companies that changes their CIK code (GOOG from 2015 Q3, ZG from 2015 Q1).
This security has an amendment
https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&owner=exclude&start=0&count=100&CIK=VER&type=10-Q&dateb=None&output=atom
Can see the amendment as 10-Q/A. Behavior we want is to replace version with the amendment before the amendment.
A good example is in ZG
us-gaap_costofrevenue___z_homesmember is missing for 2019-12-31 and 2018-12-31
However there is a 2019-12-31 and 2018-12-31 with the tag us-gaap_costofrevenue___z_homessegmentmember. This is the missing value and it wouldn't be hard to identify that.
Could use cosine similarlity on tags as part of the solution to address this issue.
E.g. this company has a 10-KT
https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0000007084&type=10-K&dateb=&owner=include&count=40&search_text=
It's a transitional 10-K for when companies are changing their year end filing date:
https://www.investopedia.com/terms/s/sec-form-10-kt.asp
For December, September and June.
There's no standard naming for statements and disclosures.
Balance sheets are referred to as CONDENSED CONSOLIDATED BALANCE SHEETS (ZM) or Consolidated Balance Sheets (AMZN). Come up with a standard naming for all financial statements.
Currently using GAAP tags as labels. They are not always comparable across companies. For example, some companies report revenue as us-gaap_revenuefromcontractwithcustomerexcludingassessedtax, while others report as us-gaap_revenues. It'd be helpful to have a label that's just "Revenue".
For example, AAP reports revenue for the last four months:
https://www.sec.gov/cgi-bin/viewer?action=view&cik=1158449&accession_number=0001158449-20-000149&xbrl_type=v#
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.