Financial Modeling with Python: Building a Three-Statement Model
Author(s):
Edition: 1
Copyright: 2026
Pages: 1198
Choose Your Platform | Help Me Choose
I Unit 1 — Foundations & Data Readiness
1 Introduction to Financial Modeling
1.1 Understanding Financial Modeling
1.2 The Essence of Financial Modeling
1.3 Definition and Scope of Financial Modeling
1.4 Key Components of Financial Modeling
1.5 Types of Financial Models
1.6 Utilization in Strategic Planning
1.7 Comprehensive Application in Business
1.8 Chapter Summary
2 Fundamentals of Financial Statement Analysis
2.1 The Big Picture: Three Statements, One Story
2.1.1 Structure and Purpose
2.1.2 Interconnections and Flow of Funds
2.2 Common-Size and Trend Analysis
2.2.1 Vertical Analysis in Python
2.2.2 Horizontal (Trend) Analysis
2.3 The Financial Ratio Toolbox
2.3.1 Liquidity Ratios
2.3.2 Profitability Ratios
2.3.3 Efficiency (Working Capital) Ratios
2.3.4 Leverage and Coverage Ratios
2.3.5 Valuation (Market) Multiples
2.3.6 Building an Interactive Ratio Dashboard in Python
2.4 Integrated Case: Ratio Analysis in Practice
2.4.1 TechTrend Inc. (Investment Perspective)
2.4.2 Green Energy Co. (Credit Perspective)
2.5 Automating a Ratio Dashboard in Python
2.5.1 Step 1: Load and Tidy the Source Data
2.5.2 Step 2: Compute the Ratio Matrix
2.5.3 Step 3: Format for Visualization
2.5.4 Step 4: Build the Interactive Heat-Map
2.6 Linking Ratios to Strategic Decisions
2.6.1 A Decision Framework
2.6.2 Mini‑Case: Diagnosing Margin Erosion
2.6.3 Automated Trigger Example
2.6.4 Key Messages
2.7 Unit 1: Mini‑Project Brief: Historical Data Pack & EDA Notebook
2.7.1 Deliverables & Marking Grid
2.7.2 Data Requirements
2.7.3 Notebook Must Haves
2.8 Key Takeaways
2.8.1 What You Should Now Be Able to Do
II Unit 2 — The Income Statement
3 Constructing the Income Statement
3.1 Income Statement Fundamentals
3.1.1 Line-Item Anatomy
3.1.2 GAAP vs IFRS Presentation Formats
3.1.3 Accrual vs Cash Timing Pitfalls
3.2 Data Acquisition & Cleaning
3.2.1 Source Options: SEC XBRL, APIs, and Data Vendors
3.2.2 Parsing and Normalizing with pandas
3.2.3 Fiscal‑Year Alignment and Calendar Normalization
3.3 Revenue Construction
3.3.1 Price × Volume × Mix (PVM) Framework
3.3.2 Deferred‑Revenue Roll‑Forward
3.3.3 Scenario Grid: Price‑Elasticity × Adoption‑Curve
3.3.4 Python Build Function
3.4 Cost of Goods Sold (COGS)
3.4.1 Direct Costs & Inventory Flows (FIFO�vs�LIFO)
3.4.2 Gross‑Margin Sanity Checks
3.4.3 Linking COGS to the Inventory Schedule (Python)
3.5 Operating Expenses
3.5.1 Classifying Operating Expenses
3.5.2 Vertical and Horizontal Trend Diagnostics
3.5.3 Modeling Fixed vs. Variable Expense Behavior
3.5.4 Non-Cash OpEx and Add-Backs
3.6 EBIT, EBITDA, and Non‑Operating Items
3.6.1 Calculating EBIT from Modeled Inputs
3.6.2 Understanding EBITDA
3.6.3 Classifying Non‑Operating Items
3.7 Tax Expense & Effective Rate
3.7.1 Statutory vs. Effective Tax Rates
3.7.2 Calculating Tax Expense
3.7.3 Deferred Tax and Non-Cash Adjustments
3.7.4 Visualizing Effective Tax Behavior
3.8 Assembling the Income Statement in Python
3.8.1 Building the Income Statement Framework
3.8.2 Computing Intermediate Lines
3.8.3 Validation and Sanity Checks
3.8.4 Output and Export
3.9 Mini‑Project Prompt: Constructing a Python‑Based Income Statement
3.10 Key Takeaways & Review Questions
4 Operating Expenses, KPIs, and Cost Drivers
4.1 Introduction to Operating Expense Forecasting
4.1.1 Functional vs. Natural Classification of OpEx
4.1.2 Vertical Structure of OpEx on the Income Statement
4.1.3 OpEx and Profitability Diagnostics
4.1.4 From Cost Centers to Forecast Lines
4.2 Modeling COGS Using Cost Drivers
4.2.1 COGS Structure and Key Components
4.2.2 Forecasting COGS Step-by-Step in Python
4.2.3 Modeling Considerations and Scenario Flexibility
4.2.4 Linking COGS to Inventory and Working Capital
4.3 Forecasting SG&A Through Scaled Infrastructure Costs
4.3.1 SG&A Structure: Fixed vs. Variable Components
4.3.2 Forecast Drivers and Modeling Strategies
4.3.3 Common-Sized Trend Diagnostics
4.3.4 Scenario Tuning: Scaling Behavior Under Growth or Stress
4.3.5 Summary: Building Scalable and Defensible SG&A Forecasts
4.4 R&D and Innovation Investment Modeling
4.4.1 Modeling R&D with Functional Drivers
4.4.2 Capitalized R&D and Amortization Flow
4.4.3 Visual Illustration: R&D Flow Logic
4.4.4 KPI Diagnostics and Investment Performance
4.4.5 Case Study: NovaSoft Platform Build
4.5 Mapping Operational KPIs to Financial Forecasts
4.5.1 From Operational Systems to Financial Inputs
4.5.2 Visual Map — KPI Flow to Financial Outputs
4.5.3 Python Forecast Logic — KPI to Expense Model
4.5.4 Modeling Defensive KPIs and Divergence
4.6 Integrating Scenario Assumptions with Cost Drivers
4.6.1 Scenario Architecture and Assumption Control
4.6.2 Scenario Assumption Table
4.6.3 Visual Framework — Scenario-Driver Integration
4.6.4 Best Practices for Scenario Integration
4.7 Diagnostic Dashboards and Expense Flagging
4.7.1 Purpose of Diagnostic Dashboards
4.7.2 Visual Framework — Dashboard Component Map
4.7.3 Python Logic — Flagging Outliers and Threshold Breaches
4.7.4 Dashboard Design Best Practices
4.8 Chapter Summary and Review Exercises
4.8.1 Key Takeaways
4.8.2 Conceptual Review Questions
4.8.3 Technical Modeling Prompts
4.8.4 Suggested Extensions
5 Income‑Statement Forecasting and Sensitivity
5.1 Overview of Income Statement Forecasting
5.1.1 The Role of the Forecasted Income Statement
5.1.2 From History to Forecast: Bridging the Gap
5.1.3 Python Architecture for Forecast Models
5.1.4 Forecasting Best Practices
5.1.5 A Preview of What’s Ahead
5.2 Time Series Framework: Three-Year Forecast Horizon
5.2.1 Defining the Forecast Horizon in Python
5.2.2 Forecast Structures: Flat vs. Dynamic
5.2.3 Initializing the Forecast Container
5.2.4 Looping Across the Horizon
5.2.5 Preview: Time-Aware Scenario Toggling
5.2.6 Summary
5.3 Revenue and Cost Integration
5.3.1 Revenue Integration: Flat vs. Scenario-Based
5.3.2 COGS and Gross Margin Forecasting
5.3.3 Summary Table: Revenue and COGS Forecast Structure
5.3.4 Integrated Logic Flow Diagram
5.3.5 Next Step: Operating Expense Forecasting
5.4 Modeling Assumption Blocks and Version Control
5.4.1 Design Goals and Architecture
5.4.2 Structuring Assumption Blocks (Nested Dictionaries)
5.4.3 Visualizing the Assumption Flow (with Callout)
5.4.4 Using the Block in the Forecast Loop
5.4.5 Validation and QA Checks
5.4.6 Audit Trail and Reproducibility
5.4.7 Common Pitfalls (and Fixes)
5.4.8 Professional Illustration — Assumption Path to Forecast
5.5 Sensitivity Analysis: Logic and Use Cases
5.5.1 Concepts, Targets, and Use Cases
5.5.2 One-Way Sensitivity (Driver Sweeps)
5.5.3 Two-Way Sensitivity (Grids/Surfaces)
5.5.4 Tornado Charts (Ranking Driver Impact)
5.5.5 Sensitivity Engine: Design Pattern
5.5.6 Communicating Results (Tables and Heatmaps)
5.5.7 Section Summary — Sensitivity Analysis
5.6 Tornado Charts in Python (Matplotlib & Plotly)
5.6.1 Design Goals and Chart Anatomy
5.6.2 Computing Tornado Inputs (Reusable Helper)
5.6.3 Matplotlib Rendering (Paired Bars)
5.6.4 Matplotlib Rendering (Floating Range Bars)
5.6.5 Plotly Rendering (Interactive)
5.6.6 Export-Ready Table (Sorted by Swing)
5.6.7 Professional Illustration — Tornado Workflow
5.6.8 Section Summary
5.7 Capstone Exercise: Build and Stress-Test a 3-Year Forecast
5.7.1 Objectives, Briefing, and Data Pack
5.7.2 Build the Baseline (Effective Assumptions & Forecast Loop)
5.7.3 Stress Suite I — One-Way Sweeps
5.7.4 Stress Suite II — Two-Way Grids & Heatmaps
5.7.5 Stress Suite III — Tornado Synthesis & Executive Pack
5.7.6 Automation, Reproducibility & Submission Checklist
III Unit 3 — The Balance Sheet
6 Balance Sheet Mechanics and Linkages
6.1 Structure, Identity, and Modeling Conventions
6.1.1 Balance-Sheet Identity and Layout
6.1.2 Core Sub-Totals and Diagnostic Anchors
6.1.3 Modeling Conventions: Signs, Deltas, and CFS Logic
6.1.4 Time Axis and Roll-Forward Logic
6.1.5 Data Normalization and Mapping to Schema
6.2 Assets: Mechanics, Roll-Forwards, and Linkages (Overview)
6.2.1 Current Operating Assets
6.2.2 Non-Current Assets
6.2.3 Roll-Forward Schematics (AR, Inventory, PP&E)
6.2.4 Cash-Flow Linkages (Indirect Method)
6.2.5 Python Blueprint and Quick QA
6.3 Liabilities: Mechanics, Accruals, and Deferreds
6.3.1 Current Operating Liabilities — Mechanics & Links
6.3.2 Roll‑Forward Templates & Unified Schematic
6.3.3 Non‑Current Liabilities — Overview & Policy Notes
6.3.4 Cash‑Flow Linkages & Liability Micro‑Bridge
6.3.5 Python Blueprint & Quick QA
6.4 Equity: Retained Earnings, AOCI, and Capital Transactions
6.4.1 Equity Components — Mechanics & Links
6.4.2 Retained Earnings — Roll‑Forward & Waterfall
6.4.3 Capital Transactions — Issuances, Buybacks, Dividends, SBC
6.4.4 AOCI & NCI — Bypass, Reclassifications, and Minority Interests
6.4.5 Python Blueprint & Quick QA
6.5 Cross-Statement Linkages and Reconciliation Map
6.5.1 Linkage Grammar — IS ↔ BS and BS ↔ CFS
6.5.2 Deferred Taxes — Mechanics & Cash Bridge
6.5.3 Circularities — Interest, Cash Sweep, and Toggles
6.5.4 Reconciliation Workflow — Period Close & QA
6.5.5 Python Blueprint — Cross‑Statement Reconciler
6.6 Modeling Blueprint in Python: Data Model, Checks, and Exports
6.6.1 Data Model & Mapping Layer
6.6.2 Roll‑Forward Utilities & Linkage Stubs
6.6.3 Diagnostics, Assertions & Dashboard
6.6.4 Artifacts, Exports & Reproducibility
6.6.5 Model Diagram & Example Workflow
7 Working Capital Drivers and Schedules
7.1 Working Capital Essentials & Modeling Choices
7.1.1 Definitions and Scope
7.1.2 Metric Mechanics & Calendar Conventions
7.1.3 Modeling Architectures & Policy Assumptions
7.1.4 Python Blueprint & Worked Examples
7.1.5 Validation, Diagnostics & Governance
7.2 Accounts Receivable Schedule & Collections
7.2.1 Days‑Based Mechanics (algebraic, non‑circular)
7.2.2 Waterfall Timing (collections schedule with buckets)
7.2.3 Policy Levers, Credit Quality & Extensions
7.2.4 Python Implementation & Worked Example
7.2.5 Validation & Diagnostics for AR
7.3 Inventory Schedule, Purchases Logic & Cost Methods
7.3.1 Core Mechanics & Identities (days‑based, non‑circular)
7.3.2 Policy Architectures & Stock Coverage Choices
7.3.3 Cost Methods & Presentation (WAC/FIFO/LIFO)
7.3.4 Python Implementation & Worked Example
7.3.5 Validation, Diagnostics & Illustration
7.4 Accounts Payable Schedule & Disbursements
7.4.1 Core Mechanics & Identities (days‑based, non‑circular)
7.4.2 Policy Levers & AP Coverage
7.4.3 Python Implementation & Worked Example
7.4.4 Validation & Diagnostics
7.4.5 Illustrations & Reference
7.5 Integration, Circularity Handling & Diagnostics
7.5.1 Integration Blueprint & Cash Bridge
7.5.2 Where Circularity Arises & How to Neutralize It
7.5.3 Python Orchestrator (End‑to‑End WC)
7.5.4 Validation, Stress & Variance Analysis
7.5.5 Illustrations, Governance & Reference
8 Fixed Assets, Depreciation, and Capex Planning
8.1 PP&E Foundations and Roll-Forward Mechanics
8.1.1 Scope & Definitions
8.1.2 Roll-Forward Anatomy (by class and total)
8.1.3 Transactions to Model
8.1.4 Financial-Statement Linkages
8.1.5 Analytics & Diagnostics
8.2 Depreciation Methods, Conventions, and Book–Tax Effects
8.2.1 Book Depreciation Methods (economics, math, and selection)
8.2.2 Conventions and Partial‑Period Rules (timing and proration)
8.2.3 Implementation Patterns in Python (methods + conventions)
8.2.4 Book–Tax Differences and Deferred Taxes (timing effects)
8.2.5 Controls, Disclosures, and Diagnostics
8.3 Capex Planning, Capacity Scaling, and Scenario Design
8.3.1 Maintenance vs. Growth CapEx
8.3.2 Capacity‑Driven Modeling (from demand to CapEx)
8.3.3 Cash Phasing, CIP, and In‑Service Transfer
8.3.4 Project Evaluation (lightweight screens)
8.3.5 Scenario Framework & Reporting
8.4 Implementing the PP&E Schedule in Python & Linking All Three Statements
8.4.1 Data Model & Inputs (contracts over code)
8.4.2 Roll‑Forward Engine (algorithm & formulas)
8.4.3 Three‑Statement Linkages (interfaces & mapping)
8.4.4 Testing & Validation (controls you can trust)
8.4.5 Performance, Logging & Deployment
8.5 Unit 3 Capstone Project — PP&E Roll‑Forward & Capex Planner Integrated into the Three‑Statement Model
8.5.1 Functional Requirements & Public Interfaces
8.5.2 Integration Tests, Controls & Acceptance
8.5.3 Evaluation Rubric & Required Exhibits
IV Unit 4 — The Cash‑Flow Statement
9 Cash‑Flow Statement Fundamentals
9.1 Executive Overview and Setup
9.1.1 Why this chapter matters
9.1.2 Prerequisites & Setup
9.1.3 Visual overview: from Net Income to ∆Cash
9.1.4 Quick Python scaffold and toy example
9.2 CFS Structure and Classification Policy
9.2.1 Anatomy of the Cash‑Flow Statement
9.2.2 Classification rules and edge cases
9.2.3 Documenting your policy (template & example)
9.2.4 Implementing classification in Python
9.2.5 Controls, diagnostics, and disclosures
9.3 Methods & Mechanics: Indirect vs. Direct
9.3.1 Indirect method (from Net Income to CFO)
9.3.2 Direct method (receipts and payments)
9.3.3 Equivalence—indirect = direct (and how to prove it)
9.3.4 Three‑statement reconciliation
9.3.5 Python scaffold—compute both methods and assert equivalence
9.3.6 Cash‑based diagnostics (preview)
9.4 Common Pitfalls, Diagnostics, and Controls
9.4.1 Frequent pitfalls (what breaks and why)
9.4.2 Diagnostic invariants (what must hold)
9.4.3 Automated controls & exception reporting
9.4.4 Debugging playbooks (step–by–step fixes)
9.4.5 Practice & self-check (apply the controls)
10 Building the Direct Cash‑Flow Statement
10.1 Policy Envelope & Direct-Method Blueprint
10.1.1 Scope & Stance (Fixed Policies)
10.1.2 Direct-Method Identity & Component Builds
10.1.3 Equivalence, Invariants, and Assertions
10.1.4 Data Model & Mapping Pipeline
10.1.5 Controls & Practice
10.2 Constructing Receipts from Customers (and Other Operating Inflows)
10.2.1 Core Identity & Policy Envelope
10.2.2 Segmentation & Channel Effects
10.2.3 Factoring & Securitization (Derecognition vs. Financing)
10.2.4 Controls, Reconciliations & Diagnostics
10.2.5 Exhibits & Implementation
10.3 Constructing Receipts from Customers (and Other Operating Inflows)
10.3.1 Core Identity & Build
10.3.2 Segmentation & Channel Effects
10.3.3 Factoring & Securitization (Derecognition vs. Financing)
10.3.4 Controls, Reconciliations & Diagnostics
10.3.5 Exhibits & Implementation
10.4 Assembly, Reconciliation, and Diagnostics
10.4.1 Assembly of CFOdir & Statement Layout
10.4.2 Equivalence & Cash‑Bridge Invariants
10.4.3 Diagnostics & Exception Framework
10.4.4 Policy Toggles & Reclassification Bridges
10.4.5 Exhibits & Implementation (End‑to‑End)
11 Integrating the Indirect Cash Flow Statement with Income Statement & Balance Sheet
11.1 Core Identities and Mapping (Indirect Method)
11.1.1 Global Conventions and Notation
11.1.2 CFO (Indirect) Identity and Working-Capital Mapping
11.1.3 CFI and CFF Identities and Key Roll-Forwards
11.1.4 Cash-Bridge Identity and Reconciliation Controls
11.1.5 Implementation Aids: Python Routines and Diagnostics
11.2 Integration Logic and Circularity Closure
11.2.1 Policy Envelope and Timing Conventions
11.2.2 Closed-Form Revolver Proposal (with Bounds)
11.2.3 Fixed-Point Loop for Interest–Tax–Cash Circularities
11.2.4 Diagnostics, Status Codes, and Shortfalls
11.2.5 Stress Testing and Sensitivity Hooks
11.3 Diagnostics, Stress Testing, and Wrap-Up
11.3.1 Must-Hold Controls (Per Period)
11.3.2 Automated Diagnostic Dashboard
11.3.3 Stress and Scenario Hooks
11.3.4 Reporting and Audit Trail
11.3.5 Unit 4 Capstone Project — The Cash‑Flow Statement Integrated into the Three‑Statement Model
V Unit 5 — Capstone: Integrated Three‑Statement Model
12 Historical Model Build and Data QA
12.1 Scope & Interfaces
12.1.1 Scope & Boundaries
12.1.2 Interface Contract & Data Map
12.1.3 Policies, Conventions & Units
12.1.4 Governance, Materiality & Gating
12.1.5 Quick-Start: Python Hooks for the Interface
12.2 Data Intake & Cleaning Pipeline
12.2.1 Source Intake & Provenance Registry
12.2.2 Canonical Input Schema & Data Dictionary
12.2.3 Normalization & CoA Mapping
12.2.4 Structural QA Harness
12.2.5 Artifacts, Lineage & Rebuildability
12.3 Historical Statements & Linkage Validation
12.3.1 Statement Assembly (Historical)
12.3.2 Linkage Identities & Roll-Forward Mechanics
12.3.3 Classification Rules & Harmonization
12.3.4 QA Test Library & Python Harness
12.3.5 Diagnostics & Troubleshooting Playbook
12.4 Opening Balances & Diagnostics Handoff
12.4.1 Define the Forecast Start t0
12.4.2 Build the Opening-Balance Set (Deliverable)
12.4.3 Diagnostics Dashboard (Handoff Artifact)
12.4.4 Freeze Mechanics & Provenance
12.4.5 Final Gate & Go/No‑Go Criteria
13 Forward Projections, Scenarios, and Sensitivities
13.1 Orientation and Scope
13.1.1 Prerequisites
13.1.2 Core Conventions and Notation
13.1.3 Implementation Scaffold (Minimal, Testable)
13.1.4 Deliverables and Exhibit Roadmap
13.2 Driver-Based Forward Projections
13.2.1 Driver Blueprint (Units and Horizons)
13.2.2 Interface and Stubs (Expanded)
13.2.3 Mechanics—From Drivers to Statements
13.2.4 Scenarios, Sensitivities, and Controls
13.3 Scenarios and Monte Carlo
13.3.1 Deterministic Scenario Packs
13.3.2 Scenario Batch Runner and Precedence Rules
13.3.3 Monte Carlo Design: Distributions, Bounds, and Correlation
13.3.4 Monte Carlo Execution and Reporting
13.3.5 Validation and Interpretation
13.4 Sensitivities, Validation, and Reporting
13.4.1 One‑ and Two‑Way Sensitivity Tables
13.4.2 Visual Summaries: Tornado and Optional Heatmap
13.4.3 Validation and Audit Checks
13.4.4 Reporting Templates and File Outputs
13.4.5 Implementation Exercises
14 Valuation, Decision Support, and Model Automation
14.1 Valuation Foundations: DCF and Trading Multiples
14.1.1 Cash Flow Definitions and Bridges
14.1.2 Discount Rates and Terminal Value
14.1.3 Trading Multiples: Peer Selection and Normalization
14.1.4 Minimal Python Hooks (Integrated Outline)
14.1.5 Diagnostics and Sanity Checks
14.2 Decision Support: Scenarios, Sensitivities, and Executive Summary
14.2.1 Scenario Definitions and Governance
14.2.2 Scenario Runner and Outputs
14.2.3 Sensitivities: One‑ and Two‑Way, Plus Tornado
14.2.4 Executive Summary: Decision‑Ready Table and Visuals
14.2.5 Narrative, Risks & Mitigants, and Review Checklist
14.3 Model Automation: Reporting and Handoff
14.3.1 Configuration, CLI, and Reproducibility
14.3.2 Excel/PDF Exports (Python‑first, VBA optional)
14.3.3 Artifact Management and Run Ledger
14.3.4 Scheduling and Orchestration
14.3.5 Handoff Package and Reviewer Checklist
14.4 Unit Projects (Units 1–4) and Unit 5 Capstone
14.4.1 Unit 1 Project — Foundations & Data Readiness
14.4.2 Unit 2 Project — Three‑Statement Core Build
14.4.3 Unit 3 Project — Drivers, Forecasting, and Scenarios
14.4.4 Unit 4 Project — Diagnostics & Reporting Readiness
14.4.5 Unit 5 Project (Capstone) — Valuation & Automation
I Unit 1 — Foundations & Data Readiness
1 Introduction to Financial Modeling
1.1 Understanding Financial Modeling
1.2 The Essence of Financial Modeling
1.3 Definition and Scope of Financial Modeling
1.4 Key Components of Financial Modeling
1.5 Types of Financial Models
1.6 Utilization in Strategic Planning
1.7 Comprehensive Application in Business
1.8 Chapter Summary
2 Fundamentals of Financial Statement Analysis
2.1 The Big Picture: Three Statements, One Story
2.1.1 Structure and Purpose
2.1.2 Interconnections and Flow of Funds
2.2 Common-Size and Trend Analysis
2.2.1 Vertical Analysis in Python
2.2.2 Horizontal (Trend) Analysis
2.3 The Financial Ratio Toolbox
2.3.1 Liquidity Ratios
2.3.2 Profitability Ratios
2.3.3 Efficiency (Working Capital) Ratios
2.3.4 Leverage and Coverage Ratios
2.3.5 Valuation (Market) Multiples
2.3.6 Building an Interactive Ratio Dashboard in Python
2.4 Integrated Case: Ratio Analysis in Practice
2.4.1 TechTrend Inc. (Investment Perspective)
2.4.2 Green Energy Co. (Credit Perspective)
2.5 Automating a Ratio Dashboard in Python
2.5.1 Step 1: Load and Tidy the Source Data
2.5.2 Step 2: Compute the Ratio Matrix
2.5.3 Step 3: Format for Visualization
2.5.4 Step 4: Build the Interactive Heat-Map
2.6 Linking Ratios to Strategic Decisions
2.6.1 A Decision Framework
2.6.2 Mini‑Case: Diagnosing Margin Erosion
2.6.3 Automated Trigger Example
2.6.4 Key Messages
2.7 Unit 1: Mini‑Project Brief: Historical Data Pack & EDA Notebook
2.7.1 Deliverables & Marking Grid
2.7.2 Data Requirements
2.7.3 Notebook Must Haves
2.8 Key Takeaways
2.8.1 What You Should Now Be Able to Do
II Unit 2 — The Income Statement
3 Constructing the Income Statement
3.1 Income Statement Fundamentals
3.1.1 Line-Item Anatomy
3.1.2 GAAP vs IFRS Presentation Formats
3.1.3 Accrual vs Cash Timing Pitfalls
3.2 Data Acquisition & Cleaning
3.2.1 Source Options: SEC XBRL, APIs, and Data Vendors
3.2.2 Parsing and Normalizing with pandas
3.2.3 Fiscal‑Year Alignment and Calendar Normalization
3.3 Revenue Construction
3.3.1 Price × Volume × Mix (PVM) Framework
3.3.2 Deferred‑Revenue Roll‑Forward
3.3.3 Scenario Grid: Price‑Elasticity × Adoption‑Curve
3.3.4 Python Build Function
3.4 Cost of Goods Sold (COGS)
3.4.1 Direct Costs & Inventory Flows (FIFO�vs�LIFO)
3.4.2 Gross‑Margin Sanity Checks
3.4.3 Linking COGS to the Inventory Schedule (Python)
3.5 Operating Expenses
3.5.1 Classifying Operating Expenses
3.5.2 Vertical and Horizontal Trend Diagnostics
3.5.3 Modeling Fixed vs. Variable Expense Behavior
3.5.4 Non-Cash OpEx and Add-Backs
3.6 EBIT, EBITDA, and Non‑Operating Items
3.6.1 Calculating EBIT from Modeled Inputs
3.6.2 Understanding EBITDA
3.6.3 Classifying Non‑Operating Items
3.7 Tax Expense & Effective Rate
3.7.1 Statutory vs. Effective Tax Rates
3.7.2 Calculating Tax Expense
3.7.3 Deferred Tax and Non-Cash Adjustments
3.7.4 Visualizing Effective Tax Behavior
3.8 Assembling the Income Statement in Python
3.8.1 Building the Income Statement Framework
3.8.2 Computing Intermediate Lines
3.8.3 Validation and Sanity Checks
3.8.4 Output and Export
3.9 Mini‑Project Prompt: Constructing a Python‑Based Income Statement
3.10 Key Takeaways & Review Questions
4 Operating Expenses, KPIs, and Cost Drivers
4.1 Introduction to Operating Expense Forecasting
4.1.1 Functional vs. Natural Classification of OpEx
4.1.2 Vertical Structure of OpEx on the Income Statement
4.1.3 OpEx and Profitability Diagnostics
4.1.4 From Cost Centers to Forecast Lines
4.2 Modeling COGS Using Cost Drivers
4.2.1 COGS Structure and Key Components
4.2.2 Forecasting COGS Step-by-Step in Python
4.2.3 Modeling Considerations and Scenario Flexibility
4.2.4 Linking COGS to Inventory and Working Capital
4.3 Forecasting SG&A Through Scaled Infrastructure Costs
4.3.1 SG&A Structure: Fixed vs. Variable Components
4.3.2 Forecast Drivers and Modeling Strategies
4.3.3 Common-Sized Trend Diagnostics
4.3.4 Scenario Tuning: Scaling Behavior Under Growth or Stress
4.3.5 Summary: Building Scalable and Defensible SG&A Forecasts
4.4 R&D and Innovation Investment Modeling
4.4.1 Modeling R&D with Functional Drivers
4.4.2 Capitalized R&D and Amortization Flow
4.4.3 Visual Illustration: R&D Flow Logic
4.4.4 KPI Diagnostics and Investment Performance
4.4.5 Case Study: NovaSoft Platform Build
4.5 Mapping Operational KPIs to Financial Forecasts
4.5.1 From Operational Systems to Financial Inputs
4.5.2 Visual Map — KPI Flow to Financial Outputs
4.5.3 Python Forecast Logic — KPI to Expense Model
4.5.4 Modeling Defensive KPIs and Divergence
4.6 Integrating Scenario Assumptions with Cost Drivers
4.6.1 Scenario Architecture and Assumption Control
4.6.2 Scenario Assumption Table
4.6.3 Visual Framework — Scenario-Driver Integration
4.6.4 Best Practices for Scenario Integration
4.7 Diagnostic Dashboards and Expense Flagging
4.7.1 Purpose of Diagnostic Dashboards
4.7.2 Visual Framework — Dashboard Component Map
4.7.3 Python Logic — Flagging Outliers and Threshold Breaches
4.7.4 Dashboard Design Best Practices
4.8 Chapter Summary and Review Exercises
4.8.1 Key Takeaways
4.8.2 Conceptual Review Questions
4.8.3 Technical Modeling Prompts
4.8.4 Suggested Extensions
5 Income‑Statement Forecasting and Sensitivity
5.1 Overview of Income Statement Forecasting
5.1.1 The Role of the Forecasted Income Statement
5.1.2 From History to Forecast: Bridging the Gap
5.1.3 Python Architecture for Forecast Models
5.1.4 Forecasting Best Practices
5.1.5 A Preview of What’s Ahead
5.2 Time Series Framework: Three-Year Forecast Horizon
5.2.1 Defining the Forecast Horizon in Python
5.2.2 Forecast Structures: Flat vs. Dynamic
5.2.3 Initializing the Forecast Container
5.2.4 Looping Across the Horizon
5.2.5 Preview: Time-Aware Scenario Toggling
5.2.6 Summary
5.3 Revenue and Cost Integration
5.3.1 Revenue Integration: Flat vs. Scenario-Based
5.3.2 COGS and Gross Margin Forecasting
5.3.3 Summary Table: Revenue and COGS Forecast Structure
5.3.4 Integrated Logic Flow Diagram
5.3.5 Next Step: Operating Expense Forecasting
5.4 Modeling Assumption Blocks and Version Control
5.4.1 Design Goals and Architecture
5.4.2 Structuring Assumption Blocks (Nested Dictionaries)
5.4.3 Visualizing the Assumption Flow (with Callout)
5.4.4 Using the Block in the Forecast Loop
5.4.5 Validation and QA Checks
5.4.6 Audit Trail and Reproducibility
5.4.7 Common Pitfalls (and Fixes)
5.4.8 Professional Illustration — Assumption Path to Forecast
5.5 Sensitivity Analysis: Logic and Use Cases
5.5.1 Concepts, Targets, and Use Cases
5.5.2 One-Way Sensitivity (Driver Sweeps)
5.5.3 Two-Way Sensitivity (Grids/Surfaces)
5.5.4 Tornado Charts (Ranking Driver Impact)
5.5.5 Sensitivity Engine: Design Pattern
5.5.6 Communicating Results (Tables and Heatmaps)
5.5.7 Section Summary — Sensitivity Analysis
5.6 Tornado Charts in Python (Matplotlib & Plotly)
5.6.1 Design Goals and Chart Anatomy
5.6.2 Computing Tornado Inputs (Reusable Helper)
5.6.3 Matplotlib Rendering (Paired Bars)
5.6.4 Matplotlib Rendering (Floating Range Bars)
5.6.5 Plotly Rendering (Interactive)
5.6.6 Export-Ready Table (Sorted by Swing)
5.6.7 Professional Illustration — Tornado Workflow
5.6.8 Section Summary
5.7 Capstone Exercise: Build and Stress-Test a 3-Year Forecast
5.7.1 Objectives, Briefing, and Data Pack
5.7.2 Build the Baseline (Effective Assumptions & Forecast Loop)
5.7.3 Stress Suite I — One-Way Sweeps
5.7.4 Stress Suite II — Two-Way Grids & Heatmaps
5.7.5 Stress Suite III — Tornado Synthesis & Executive Pack
5.7.6 Automation, Reproducibility & Submission Checklist
III Unit 3 — The Balance Sheet
6 Balance Sheet Mechanics and Linkages
6.1 Structure, Identity, and Modeling Conventions
6.1.1 Balance-Sheet Identity and Layout
6.1.2 Core Sub-Totals and Diagnostic Anchors
6.1.3 Modeling Conventions: Signs, Deltas, and CFS Logic
6.1.4 Time Axis and Roll-Forward Logic
6.1.5 Data Normalization and Mapping to Schema
6.2 Assets: Mechanics, Roll-Forwards, and Linkages (Overview)
6.2.1 Current Operating Assets
6.2.2 Non-Current Assets
6.2.3 Roll-Forward Schematics (AR, Inventory, PP&E)
6.2.4 Cash-Flow Linkages (Indirect Method)
6.2.5 Python Blueprint and Quick QA
6.3 Liabilities: Mechanics, Accruals, and Deferreds
6.3.1 Current Operating Liabilities — Mechanics & Links
6.3.2 Roll‑Forward Templates & Unified Schematic
6.3.3 Non‑Current Liabilities — Overview & Policy Notes
6.3.4 Cash‑Flow Linkages & Liability Micro‑Bridge
6.3.5 Python Blueprint & Quick QA
6.4 Equity: Retained Earnings, AOCI, and Capital Transactions
6.4.1 Equity Components — Mechanics & Links
6.4.2 Retained Earnings — Roll‑Forward & Waterfall
6.4.3 Capital Transactions — Issuances, Buybacks, Dividends, SBC
6.4.4 AOCI & NCI — Bypass, Reclassifications, and Minority Interests
6.4.5 Python Blueprint & Quick QA
6.5 Cross-Statement Linkages and Reconciliation Map
6.5.1 Linkage Grammar — IS ↔ BS and BS ↔ CFS
6.5.2 Deferred Taxes — Mechanics & Cash Bridge
6.5.3 Circularities — Interest, Cash Sweep, and Toggles
6.5.4 Reconciliation Workflow — Period Close & QA
6.5.5 Python Blueprint — Cross‑Statement Reconciler
6.6 Modeling Blueprint in Python: Data Model, Checks, and Exports
6.6.1 Data Model & Mapping Layer
6.6.2 Roll‑Forward Utilities & Linkage Stubs
6.6.3 Diagnostics, Assertions & Dashboard
6.6.4 Artifacts, Exports & Reproducibility
6.6.5 Model Diagram & Example Workflow
7 Working Capital Drivers and Schedules
7.1 Working Capital Essentials & Modeling Choices
7.1.1 Definitions and Scope
7.1.2 Metric Mechanics & Calendar Conventions
7.1.3 Modeling Architectures & Policy Assumptions
7.1.4 Python Blueprint & Worked Examples
7.1.5 Validation, Diagnostics & Governance
7.2 Accounts Receivable Schedule & Collections
7.2.1 Days‑Based Mechanics (algebraic, non‑circular)
7.2.2 Waterfall Timing (collections schedule with buckets)
7.2.3 Policy Levers, Credit Quality & Extensions
7.2.4 Python Implementation & Worked Example
7.2.5 Validation & Diagnostics for AR
7.3 Inventory Schedule, Purchases Logic & Cost Methods
7.3.1 Core Mechanics & Identities (days‑based, non‑circular)
7.3.2 Policy Architectures & Stock Coverage Choices
7.3.3 Cost Methods & Presentation (WAC/FIFO/LIFO)
7.3.4 Python Implementation & Worked Example
7.3.5 Validation, Diagnostics & Illustration
7.4 Accounts Payable Schedule & Disbursements
7.4.1 Core Mechanics & Identities (days‑based, non‑circular)
7.4.2 Policy Levers & AP Coverage
7.4.3 Python Implementation & Worked Example
7.4.4 Validation & Diagnostics
7.4.5 Illustrations & Reference
7.5 Integration, Circularity Handling & Diagnostics
7.5.1 Integration Blueprint & Cash Bridge
7.5.2 Where Circularity Arises & How to Neutralize It
7.5.3 Python Orchestrator (End‑to‑End WC)
7.5.4 Validation, Stress & Variance Analysis
7.5.5 Illustrations, Governance & Reference
8 Fixed Assets, Depreciation, and Capex Planning
8.1 PP&E Foundations and Roll-Forward Mechanics
8.1.1 Scope & Definitions
8.1.2 Roll-Forward Anatomy (by class and total)
8.1.3 Transactions to Model
8.1.4 Financial-Statement Linkages
8.1.5 Analytics & Diagnostics
8.2 Depreciation Methods, Conventions, and Book–Tax Effects
8.2.1 Book Depreciation Methods (economics, math, and selection)
8.2.2 Conventions and Partial‑Period Rules (timing and proration)
8.2.3 Implementation Patterns in Python (methods + conventions)
8.2.4 Book–Tax Differences and Deferred Taxes (timing effects)
8.2.5 Controls, Disclosures, and Diagnostics
8.3 Capex Planning, Capacity Scaling, and Scenario Design
8.3.1 Maintenance vs. Growth CapEx
8.3.2 Capacity‑Driven Modeling (from demand to CapEx)
8.3.3 Cash Phasing, CIP, and In‑Service Transfer
8.3.4 Project Evaluation (lightweight screens)
8.3.5 Scenario Framework & Reporting
8.4 Implementing the PP&E Schedule in Python & Linking All Three Statements
8.4.1 Data Model & Inputs (contracts over code)
8.4.2 Roll‑Forward Engine (algorithm & formulas)
8.4.3 Three‑Statement Linkages (interfaces & mapping)
8.4.4 Testing & Validation (controls you can trust)
8.4.5 Performance, Logging & Deployment
8.5 Unit 3 Capstone Project — PP&E Roll‑Forward & Capex Planner Integrated into the Three‑Statement Model
8.5.1 Functional Requirements & Public Interfaces
8.5.2 Integration Tests, Controls & Acceptance
8.5.3 Evaluation Rubric & Required Exhibits
IV Unit 4 — The Cash‑Flow Statement
9 Cash‑Flow Statement Fundamentals
9.1 Executive Overview and Setup
9.1.1 Why this chapter matters
9.1.2 Prerequisites & Setup
9.1.3 Visual overview: from Net Income to ∆Cash
9.1.4 Quick Python scaffold and toy example
9.2 CFS Structure and Classification Policy
9.2.1 Anatomy of the Cash‑Flow Statement
9.2.2 Classification rules and edge cases
9.2.3 Documenting your policy (template & example)
9.2.4 Implementing classification in Python
9.2.5 Controls, diagnostics, and disclosures
9.3 Methods & Mechanics: Indirect vs. Direct
9.3.1 Indirect method (from Net Income to CFO)
9.3.2 Direct method (receipts and payments)
9.3.3 Equivalence—indirect = direct (and how to prove it)
9.3.4 Three‑statement reconciliation
9.3.5 Python scaffold—compute both methods and assert equivalence
9.3.6 Cash‑based diagnostics (preview)
9.4 Common Pitfalls, Diagnostics, and Controls
9.4.1 Frequent pitfalls (what breaks and why)
9.4.2 Diagnostic invariants (what must hold)
9.4.3 Automated controls & exception reporting
9.4.4 Debugging playbooks (step–by–step fixes)
9.4.5 Practice & self-check (apply the controls)
10 Building the Direct Cash‑Flow Statement
10.1 Policy Envelope & Direct-Method Blueprint
10.1.1 Scope & Stance (Fixed Policies)
10.1.2 Direct-Method Identity & Component Builds
10.1.3 Equivalence, Invariants, and Assertions
10.1.4 Data Model & Mapping Pipeline
10.1.5 Controls & Practice
10.2 Constructing Receipts from Customers (and Other Operating Inflows)
10.2.1 Core Identity & Policy Envelope
10.2.2 Segmentation & Channel Effects
10.2.3 Factoring & Securitization (Derecognition vs. Financing)
10.2.4 Controls, Reconciliations & Diagnostics
10.2.5 Exhibits & Implementation
10.3 Constructing Receipts from Customers (and Other Operating Inflows)
10.3.1 Core Identity & Build
10.3.2 Segmentation & Channel Effects
10.3.3 Factoring & Securitization (Derecognition vs. Financing)
10.3.4 Controls, Reconciliations & Diagnostics
10.3.5 Exhibits & Implementation
10.4 Assembly, Reconciliation, and Diagnostics
10.4.1 Assembly of CFOdir & Statement Layout
10.4.2 Equivalence & Cash‑Bridge Invariants
10.4.3 Diagnostics & Exception Framework
10.4.4 Policy Toggles & Reclassification Bridges
10.4.5 Exhibits & Implementation (End‑to‑End)
11 Integrating the Indirect Cash Flow Statement with Income Statement & Balance Sheet
11.1 Core Identities and Mapping (Indirect Method)
11.1.1 Global Conventions and Notation
11.1.2 CFO (Indirect) Identity and Working-Capital Mapping
11.1.3 CFI and CFF Identities and Key Roll-Forwards
11.1.4 Cash-Bridge Identity and Reconciliation Controls
11.1.5 Implementation Aids: Python Routines and Diagnostics
11.2 Integration Logic and Circularity Closure
11.2.1 Policy Envelope and Timing Conventions
11.2.2 Closed-Form Revolver Proposal (with Bounds)
11.2.3 Fixed-Point Loop for Interest–Tax–Cash Circularities
11.2.4 Diagnostics, Status Codes, and Shortfalls
11.2.5 Stress Testing and Sensitivity Hooks
11.3 Diagnostics, Stress Testing, and Wrap-Up
11.3.1 Must-Hold Controls (Per Period)
11.3.2 Automated Diagnostic Dashboard
11.3.3 Stress and Scenario Hooks
11.3.4 Reporting and Audit Trail
11.3.5 Unit 4 Capstone Project — The Cash‑Flow Statement Integrated into the Three‑Statement Model
V Unit 5 — Capstone: Integrated Three‑Statement Model
12 Historical Model Build and Data QA
12.1 Scope & Interfaces
12.1.1 Scope & Boundaries
12.1.2 Interface Contract & Data Map
12.1.3 Policies, Conventions & Units
12.1.4 Governance, Materiality & Gating
12.1.5 Quick-Start: Python Hooks for the Interface
12.2 Data Intake & Cleaning Pipeline
12.2.1 Source Intake & Provenance Registry
12.2.2 Canonical Input Schema & Data Dictionary
12.2.3 Normalization & CoA Mapping
12.2.4 Structural QA Harness
12.2.5 Artifacts, Lineage & Rebuildability
12.3 Historical Statements & Linkage Validation
12.3.1 Statement Assembly (Historical)
12.3.2 Linkage Identities & Roll-Forward Mechanics
12.3.3 Classification Rules & Harmonization
12.3.4 QA Test Library & Python Harness
12.3.5 Diagnostics & Troubleshooting Playbook
12.4 Opening Balances & Diagnostics Handoff
12.4.1 Define the Forecast Start t0
12.4.2 Build the Opening-Balance Set (Deliverable)
12.4.3 Diagnostics Dashboard (Handoff Artifact)
12.4.4 Freeze Mechanics & Provenance
12.4.5 Final Gate & Go/No‑Go Criteria
13 Forward Projections, Scenarios, and Sensitivities
13.1 Orientation and Scope
13.1.1 Prerequisites
13.1.2 Core Conventions and Notation
13.1.3 Implementation Scaffold (Minimal, Testable)
13.1.4 Deliverables and Exhibit Roadmap
13.2 Driver-Based Forward Projections
13.2.1 Driver Blueprint (Units and Horizons)
13.2.2 Interface and Stubs (Expanded)
13.2.3 Mechanics—From Drivers to Statements
13.2.4 Scenarios, Sensitivities, and Controls
13.3 Scenarios and Monte Carlo
13.3.1 Deterministic Scenario Packs
13.3.2 Scenario Batch Runner and Precedence Rules
13.3.3 Monte Carlo Design: Distributions, Bounds, and Correlation
13.3.4 Monte Carlo Execution and Reporting
13.3.5 Validation and Interpretation
13.4 Sensitivities, Validation, and Reporting
13.4.1 One‑ and Two‑Way Sensitivity Tables
13.4.2 Visual Summaries: Tornado and Optional Heatmap
13.4.3 Validation and Audit Checks
13.4.4 Reporting Templates and File Outputs
13.4.5 Implementation Exercises
14 Valuation, Decision Support, and Model Automation
14.1 Valuation Foundations: DCF and Trading Multiples
14.1.1 Cash Flow Definitions and Bridges
14.1.2 Discount Rates and Terminal Value
14.1.3 Trading Multiples: Peer Selection and Normalization
14.1.4 Minimal Python Hooks (Integrated Outline)
14.1.5 Diagnostics and Sanity Checks
14.2 Decision Support: Scenarios, Sensitivities, and Executive Summary
14.2.1 Scenario Definitions and Governance
14.2.2 Scenario Runner and Outputs
14.2.3 Sensitivities: One‑ and Two‑Way, Plus Tornado
14.2.4 Executive Summary: Decision‑Ready Table and Visuals
14.2.5 Narrative, Risks & Mitigants, and Review Checklist
14.3 Model Automation: Reporting and Handoff
14.3.1 Configuration, CLI, and Reproducibility
14.3.2 Excel/PDF Exports (Python‑first, VBA optional)
14.3.3 Artifact Management and Run Ledger
14.3.4 Scheduling and Orchestration
14.3.5 Handoff Package and Reviewer Checklist
14.4 Unit Projects (Units 1–4) and Unit 5 Capstone
14.4.1 Unit 1 Project — Foundations & Data Readiness
14.4.2 Unit 2 Project — Three‑Statement Core Build
14.4.3 Unit 3 Project — Drivers, Forecasting, and Scenarios
14.4.4 Unit 4 Project — Diagnostics & Reporting Readiness
14.4.5 Unit 5 Project (Capstone) — Valuation & Automation

