Filing-Revision Versioning
Install and import
npm install fintech-algorithmsimport { calculate } from "fintech-algorithms/corporate-actions-and-security-master-data/point-in-time-universe/filing-revision-versioning";Signature
calculate(data)Worked example
executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.
Input
{
"entityId": "CIK0000033619",
"reportPeriod": "2017-09-29",
"formFamily": "10-K",
"asOf": "2018-02-01T00:00:00Z",
"records": [
{
"entityId": "CIK0000033619",
"reportPeriod": "2017-09-29",
"form": "10-K",
"accessionNo": "0001564590-17-024189",
"amendmentNumber": 0,
"acceptedAt": "2017-11-21T16:32:41Z",
"ingestedAt": "2017-11-21T16:40:00Z",
"amendmentScope": ["Original annual filing"],
"facts": {
"basicEpsUsdPerShare": 3.94,
"netEarningsUsdMillions": 117.387
}
},
{
"entityId": "CIK0000033619",
"reportPeriod": "2017-09-29",
"form": "10-K/A",
"accessionNo": "0001564590-18-007244",
"amendmentNumber": 1,
"acceptedAt": "2018-03-30T14:43:54Z",
"ingestedAt": "2018-03-30T15:00:00Z",
"amendmentScope": ["Item 6", "Item 7", "Item 8", "Item 9A", "Item 15"],
"facts": {
"basicEpsUsdPerShare": 3.75,
"netEarningsUsdMillions": 111.554
}
}
]
}Call
calculate(data)Returns
object with 13 fields: entityId, reportPeriod, asOf, selectionBasis, accessionNo, form, amendmentNumber, acceptedAt, …
{
"entityId": "CIK0000033619",
"reportPeriod": "2017-09-29",
"asOf": "2018-02-01T00:00:00Z",
"selectionBasis": "latest accepted filing among locally ingested versions",
"accessionNo": "0001564590-17-024189",
"form": "10-K",
"amendmentNumber": 0,
"acceptedAt": "2017-11-21T16:32:41Z",
"ingestedAt": "2017-11-21T16:40:00Z",
"amendmentScope": ["Original annual filing"],
"facts": {
"basicEpsUsdPerShare": 3.94,
"netEarningsUsdMillions": 117.387
},
"eligibleAccessions": ["0001564590-17-024189"],
"excludedNotYetIngested": ["0001564590-18-007244"]
}Diagrams
Calculation flow
Causal filing-version query
flowchart LR
A["Immutable filing versions"] --> B["Validate identity and timestamps"]
B --> C{"ingestedAt <= asOf?"}
C -->|No| D["Exclude and report"]
C -->|Yes| E["Order by acceptedAt, amendment, accession"]
E --> F["Return selected version and audit trace"]
Filing-version lifecycle
stateDiagram-v2
[*] --> Submitted
Submitted --> Accepted: EDGAR accepts
Accepted --> Ingested: local system acquires
Ingested --> Validated: parser and checks complete
Validated --> Eligible: cutoff reaches policy timestamp
Accepted --> Excluded: cutoff before local ingestion
Eligible --> Superseded: later eligible amendment
Superseded --> [*]
How it works
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References
- Esterline fiscal-2017 original Form 10-K filing index
- Esterline fiscal-2017 Form 10-K/A filing index
- Esterline fiscal-2017 Form 10-K/A
- SEC Webmaster Frequently Asked Questions
- Accessing EDGAR Data
- EDGAR glossary