This document contains visual representations of the framework's key concepts using Mermaid diagrams.
1. Equity Bridge Flow Diagram
The equity bridge shows how equity reconciles from one period to the next through various source terms:
flowchart TD
Start["Opening Equity
E₀
$1,000M"] --> NI["+ Net Income
IAS 1.106
$50M"]
NI --> OCI1["+ FVOCI Investments
IFRS 9.5.7.1
$28M"]
OCI1 --> OCI2["+ FX Translation
IAS 21.52
$6M"]
OCI2 --> OCI3["+ Actuarial Gains
IAS 19.93
$1M"]
OCI3 --> DIV["- Dividends
IAS 1.107
$10M"]
DIV --> BUY["- Treasury Stock
IAS 32.33
$25M"]
BUY --> NCI["± NCI Changes
IFRS 10
$0M"]
NCI --> End["Closing Equity
E₁
$1,050M"]
style Start fill:#e1f5ff
style End fill:#e1f5ff
style NI fill:#d4edda
style OCI1 fill:#fff3cd
style OCI2 fill:#fff3cd
style OCI3 fill:#fff3cd
style DIV fill:#f8d7da
style BUY fill:#f8d7da
style NCI fill:#d1ecf1
Validation Check:
- Expected: $1,000 + $50 + $35 - $10 - $25 = $1,050 ✓
- If gap exists: Framework identifies missing OCI components or NCI changes
2. M&A Boundary Flux Diagram
This diagram illustrates the Reynolds Transport Theorem concept applied to accounting consolidation:
flowchart LR
subgraph Before["Before Acquisition (t=0)"]
direction TB
A1["Company A
Equity: $500M
Consolidated Group"]
B1["Company B
Equity: $100M
External Entity"]
end
subgraph During["Acquisition Event"]
direction TB
Arrow["Boundary Flux
ΦE = $100M
Entity crosses ∂V"]
end
subgraph After["After Acquisition (t=1)"]
direction TB
A2["Company A (Consolidated)
Parent Equity: $450M
NCI: $50M
Total: $500M"]
B2["Company B
Now inside boundary
Contributes $50M NCI"]
end
Before --> During
During --> After
style Before fill:#fff3cd
style During fill:#d1ecf1
style After fill:#d4edda
style Arrow fill:#f8d7da
Mathematical Form:
dE/dt = ∫(sources) dV + ∫(flux across ∂V) dA + ∫(boundary velocity · ρ) dA
↑ ↑ ↑
operational static boundary moving boundary (M&A)
Key Insight: Company B's $100M equity is NOT operational income—it's boundary flux. Framework distinguishes:
- ✅ Operational sources: Net income, OCI
- ✅ Boundary flux: M&A, NCI changes
- ⚠️ Misclassification → Framework detects as reconciliation error
3. Framework Architecture
Technical pipeline from raw XBRL to validated results:
flowchart TD
subgraph Input["Data Sources"]
EDGAR["SEC EDGAR
companyfacts API"]
XBRL["XBRL Filings
.xml format"]
CSV["Custom Dataset
.csv format"]
end
subgraph Parser["Parsing Layer"]
Extract["XBRL Extractor
scripts/hydrate_companyfacts.py"]
Map["Concept Mapper
config/concept_aliases.yaml"]
Taxonomy["Standards Taxonomy
91 IFRS/GAAP mappings"]
end
subgraph Validator["Validation Engine"]
Leverage["Leverage Identity
A = L + E"]
Bridge["Equity Bridge
ΔE = sources"]
NCI["NCI Reconciliation
IFRS 10 checks"]
OCI["OCI Completeness
7 component checks"]
end
subgraph Output["Results"]
Metrics["metrics.json
Pass/fail rates"]
Report["HTML Reports
index.html"]
Alerts["Risk Alerts
High-risk flags"]
end
Input --> Parser
Parser --> Validator
Validator --> Output
style Input fill:#e1f5ff
style Parser fill:#fff3cd
style Validator fill:#d1ecf1
style Output fill:#d4edda
Key Components:
- Extractor: Fetches data from SEC EDGAR (rate-limited 10 req/sec)
- Mapper: Handles XBRL tag variations (us-gaap vs. ifrs-full)
- Taxonomy: Maps each tag to specific IFRS/GAAP standard
- Validators: Apply mathematical constraints
- Metrics: Statistical analysis with Wilson intervals
4. Audit Workflow Integration
How practitioners use the framework in real audit engagements:
flowchart TD
Start([Audit Planning]) --> Risk["Risk Assessment
ML Model (AUC 0.949)"]
Risk --> |High Risk| Priority["Prioritize Client"]
Risk --> |Low Risk| Standard["Standard Procedures"]
Priority --> Hydrate["Hydrate Client Data
scripts/hydrate_companyfacts.py"]
Standard --> Hydrate
Hydrate --> Validate["Run Validation
scripts/demo.py --ticker CLIENT"]
Validate --> Results{Results?}
Results --> |All Pass| Green["✓ Green Flag
Document & Continue"]
Results --> |Failures| Red["⚠ Red Flag
Investigate"]
Red --> Diagnose["Diagnose Gap
scripts/diagnose_equity_gap.py"]
Diagnose --> Root{Root Cause?}
Root --> |XBRL Gap| Request["Request OCI Rollforward
from Client"]
Root --> |Disclosure Gap| Adjust["Adjust Expectations
Document Limitation"]
Root --> |Potential Error| Escalate["Escalate to Partner
Consider Adjustment"]
Request --> Revalidate["Re-run Validation"]
Adjust --> Document["Document in Workpapers"]
Escalate --> Document
Revalidate --> Final{Resolved?}
Final --> |Yes| Document
Final --> |No| Escalate
Green --> Final_Report([Issue Audit Opinion])
Document --> Final_Report
style Start fill:#e1f5ff
style Risk fill:#fff3cd
style Validate fill:#d1ecf1
style Green fill:#d4edda
style Red fill:#f8d7da
style Final_Report fill:#e1f5ff
Time Savings:
- Traditional: 8-12 hours manual tracing per client
- Framework: 2 minutes automated validation + targeted follow-up
- Efficiency Gain: ~95% time reduction on reconciliation procedures
5. Validation Test Hierarchy
Relationship between different validation tests:
graph TD
Root["Financial Statement Validation"]
Root --> L1_Leverage["Leverage Identity
A = L + E"]
Root --> L1_Equity["Equity Conservation
ΔE = sources + flux"]
L1_Leverage --> L2_Balance["Balance Sheet Integrity
Assets = Liabilities + Equity"]
L1_Equity --> L2_Bridge["Equity Bridge Closure
E₁ = E₀ + ΔE"]
L1_Equity --> L2_NCI["NCI Reconciliation
IFRS 10 compliance"]
L2_Bridge --> L3_Sources["Source Decomposition"]
L3_Sources --> L4_NI["Net Income
IAS 1.106"]
L3_Sources --> L4_OCI["OCI Components
7 items"]
L3_Sources --> L4_Owner["Owner Transactions
Div, Buybacks"]
L4_OCI --> L5_FVOCI["FVOCI
IFRS 9.5.7.1"]
L4_OCI --> L5_FX["FX Translation
IAS 21.52"]
L4_OCI --> L5_Pension["Actuarial
IAS 19.93"]
L4_OCI --> L5_Hedge["Hedging
IFRS 9 hedge"]
style Root fill:#e1f5ff
style L1_Leverage fill:#d1ecf1
style L1_Equity fill:#d1ecf1
style L2_Balance fill:#fff3cd
style L2_Bridge fill:#fff3cd
style L2_NCI fill:#fff3cd
style L3_Sources fill:#ffeaa7
style L4_NI fill:#d4edda
style L4_OCI fill:#d4edda
style L4_Owner fill:#d4edda
style L5_FVOCI fill:#dfe6e9
style L5_FX fill:#dfe6e9
style L5_Pension fill:#dfe6e9
style L5_Hedge fill:#dfe6e9
Test Strategy:
- Level 1: Fundamental identities (must pass)
- Level 2: Component reconciliation (high-level)
- Level 3: Source term decomposition
- Level 4: Standard-specific validation
- Level 5: Granular tag-level checks
6. Empirical Results Summary
Visual representation of 500-company validation results:
%%{init: {'theme':'base', 'themeVariables': { 'fontSize':'16px'}}}%%
graph LR
subgraph Results["N=500 S&P 500 Companies (2,000 Filings)"]
direction TB
L["Leverage Identity
72.9% pass
[70.8%, 74.9%]"]
E["Equity Bridge
54.9% pass
[52.6%, 57.2%]"]
N["NCI Reconciliation
68.3% pass
[66.1%, 70.4%]"]
O["OCI Completeness
43.2% pass
[41.0%, 45.4%]"]
end
subgraph Interpretation["Interpretation"]
direction TB
I1["Not accounting fraud
XBRL data quality issues"]
I2["Framework = diagnostic tool
for disclosure gaps"]
I3["ML audit risk model
AUC 0.949"]
end
Results --> Interpretation
style L fill:#d4edda
style E fill:#fff3cd
style N fill:#d4edda
style O fill:#f8d7da
style I1 fill:#e1f5ff
style I2 fill:#e1f5ff
style I3 fill:#d1ecf1
Key Findings:
- 72.9% leverage pass rate: Most companies have balance sheet integrity
- 54.9% equity bridge: Significant XBRL/disclosure gaps (especially OCI)
- 43.2% OCI completeness: Weakest area—most companies don't itemize OCI components
- AUC 0.949: ML model successfully predicts high-risk filings
7. Standards Taxonomy Structure
Organization of 91 IFRS/GAAP standards mapped to equity source terms:
graph TD
Root["Equity Change Sources
ΔE = ΣSource Terms"]
Root --> Cat1["Profit/Loss
IAS 1"]
Root --> Cat2["Other Comprehensive Income
IAS 1.7"]
Root --> Cat3["Owner Transactions
IAS 32/IFRS 2"]
Root --> Cat4["Consolidation
IFRS 10/IFRS 3"]
Root --> Cat5["Measurement
IFRS 13/IAS 8"]
Cat2 --> OCI1["Financial Instruments
IFRS 9"]
Cat2 --> OCI2["Foreign Currency
IAS 21"]
Cat2 --> OCI3["Employee Benefits
IAS 19"]
Cat2 --> OCI4["Revaluation
IAS 16/IAS 38"]
Cat3 --> Owner1["Dividends
IAS 1.107"]
Cat3 --> Owner2["Share Buybacks
IAS 32.33"]
Cat3 --> Owner3["Share-Based Payment
IFRS 2"]
Cat3 --> Owner4["Capital Contributions
IAS 1.108"]
Cat4 --> Consol1["Acquisitions
IFRS 3"]
Cat4 --> Consol2["NCI Changes
IFRS 10.23"]
Cat4 --> Consol3["Loss of Control
IFRS 10.25"]
OCI1 --> Tag1["us-gaap:OCI_FVOCI"]
OCI2 --> Tag2["us-gaap:OCI_ForeignCurrency"]
OCI3 --> Tag3["us-gaap:OCI_PensionPlans"]
style Root fill:#e1f5ff
style Cat1 fill:#d4edda
style Cat2 fill:#fff3cd
style Cat3 fill:#f8d7da
style Cat4 fill:#d1ecf1
style Cat5 fill:#ffeaa7
style Tag1 fill:#dfe6e9
style Tag2 fill:#dfe6e9
style Tag3 fill:#dfe6e9
Complete Taxonomy: See docs/standards/STANDARDS_CROSSWALK.md
8. Cross-Domain Conservation Analogy
Structural similarity across different domains (conceptual only):
graph TD
subgraph Physics["Physics: Mass Conservation"]
P1["∂ρ/∂t + ∇·J = s
Density change = flow + source"]
P2["Example: Fluid in control volume"]
end
subgraph Accounting["Accounting: Equity Conservation"]
A1["ΔE = flows + sources
Equity change = transactions + income"]
A2["Example: Company balance sheet"]
end
subgraph Math["Mathematical Structure"]
M1["Graph Theory
Nodes + Directed Edges"]
M2["Discrete Continuity
Balance = In - Out + Source"]
end
Physics --> Math
Accounting --> Math
style Physics fill:#e1f5ff
style Accounting fill:#d4edda
style Math fill:#fff3cd
Important Qualifier: This is a structural analogy, not a claim that "accounting IS physics." The mathematical form appears similar, but:
- Physics: Empirical physical law (mass/energy cannot be created/destroyed)
- Accounting: Conventional system designed by humans (double-entry is a definition)
- Framework: Uses similar mathematical tools to formalize accounting rules
Usage in Documentation
These diagrams are embedded in:
- README.md: Simplified equity bridge flow
- FOR_AUDITORS.md: Audit workflow integration
- FOR_RESEARCHERS.md: Mathematical structure diagrams
- index.html: Consider adding interactive versions
Generating Custom Diagrams
To create custom diagrams for specific companies:
# Generate equity bridge diagram for specific ticker
python scripts/make_equity_bridge_diagram.py --ticker AAPL --quarter 2024Q3
# Output: docs/figures/equity_bridge_AAPL_2024Q3.svg
Note: All diagrams use Mermaid syntax and render natively in GitHub, GitLab, and most modern markdown viewers. For PDF exports, use mermaid-cli:
npm install -g @mermaid-js/mermaid-cli
mmdc -i docs/DIAGRAMS.md -o docs/DIAGRAMS.pdf
Last Updated: 2025-01-05