os-climate / DERA-ingest-pipeline

Apache License 2.0
0 stars 4 forks source link

Need overall corp view rollup view #6

Open MichaelTiemannOSC opened 2 years ago

MichaelTiemannOSC commented 2 years ago

Presuming we can get individual answers to market cap, enterprise value, EVIC, Debt, Assets, Revenue, etc., it would be good to also get an overall rolled up view as if there's a single table with all these nice answers. And to be able to provide a "waterfall" that selects the "best" data from available sources--one source being SEC DERA data.

See:

https://github.com/os-climate/DERA-ingest-pipeline/issues/3 https://github.com/os-climate/DERA-ingest-pipeline/issues/4 https://github.com/os-climate/DERA-ingest-pipeline/issues/5

The purpose of this issue is to originate the SQL query that gives us the view, and potentially a look at what the waterfall would look like, so we can document that and then users can customize their own queries based on the reference implementation.

MichaelTiemannOSC commented 2 years ago

At present, the solution I've come up with is to manually materialize tables for (annual) revenues and earnings and for (point-in-time) market cap, debt, cash, and assets. EV and EVIC can be derived easily from those. See tables t_r, t_f, t_d, t_c, t_a, and t_i in sec_dera.

Different companies have different ideas about when in their fiscal years they want to make point-in-time disclosures. Some measure market cap in the middle of the year, some at the end, some at the beginning. And some later-coming disclosures report different numbers than earlier reports. So as with revenues specifically, we need a query that prioritizes data for the large corp rollup generally.

MichaelTiemannOSC commented 2 years ago

See also: https://github.com/os-climate/DERA-ingest-pipeline/blob/master/notebooks/SEC%20Corp%20Financials.ipynb