Appendix 8A: Chapter 8 milestone and the big picture (Ch01–Ch08) ================================================================= Chapter 8 is the point where Track D moves from *accounting mechanics* into *statistics applied to accounting data*. At this milestone you now have an end-to-end workflow that mirrors real work in small business bookkeeping / controllership: 1. Capture transactions in a double-entry system. 2. Produce financial statements. 3. Validate the numbers (reconciliations / controls). 4. Prepare analysis-ready data (tidy + rollups). 5. Compute descriptive statistics that reveal variability and risk. What we have built so far ------------------------- Ch01–Ch02: Accounting fundamentals + the ledger-as-data ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * **Ch01** frames accounting as a *measurement system* (what we measure, why it matters, and how the accounting equation constrains the story). * **Ch02** treats the general ledger as a structured database: transactions, accounts, and rules that make aggregation meaningful. Ch03–Ch06: Statements + validation as quality control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * **Ch03** uses financial statements as *summary statistics* (income statement, balance sheet, and how line items roll up). * **Ch04–Ch05** expand the accounting topics needed to support realistic analytics (assets/inventory/fixed assets/depreciation; liabilities/payroll/ taxes/debt/equity). * **Ch06** formalizes *reconciliations as quality control* so that downstream analytics don’t silently operate on bad inputs. Ch07: Preparing accounting data for analysis ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Chapter 7 creates two “analysis-ready” datasets: * ``gl_tidy.csv`` — a line-level, tidy general ledger with consistent types and signed amounts. * ``gl_monthly_summary.csv`` — a monthly rollup by account/category. This is the bridge between bookkeeping exports and statistical workflows. Ch08: Descriptive statistics for financial performance ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Chapter 8 is the first chapter that *uses statistics directly*. It produces: * ``gl_kpi_monthly.csv`` — monthly KPIs + ratios + rolling mean/std + simple z-score signals. * ``ar_monthly_metrics.csv`` — A/R roll-forward style metrics (credit sales, collections, DSO approximation). * ``ar_payment_slices.csv`` + ``ar_days_stats.csv`` — a small payment-lag distribution (FIFO allocation) and descriptive summaries (mean/median/ quantiles, including amount-weighted versions). Why this milestone matters -------------------------- Two “stats-first” ideas show up immediately in Chapter 8: * **Skew and tails (A/R):** average DSO can be misleading when a few late-paying customers create a long right tail. Median and upper quantiles (e.g., p90/p95) often communicate risk better. * **Volatility signals (performance):** rolling mean/std on margins and revenue growth provide a lightweight way to detect unusual months and prompt follow-up questions. These are small examples, but they demonstrate the core theme of Track D: *accounting data becomes powerful when it is treated as analyzable data.* How to reproduce the work locally --------------------------------- From the repo root (with the virtualenv active): .. code-block:: bash # generate the NSO synthetic dataset make business-nso-sim # run the bookkeeping + QC chapters make business-ch04 make business-ch05 make business-ch06 # build analysis-ready data and then compute descriptive stats make business-ch07 make business-ch08 # build docs locally make docs What remains (roadmap after Chapter 8) -------------------------------------- Chapter 8 sets up a clean runway for forecasting and statistical modeling. * **Chapter 9** will focus on *visualization and reporting that doesn’t mislead* (how to present KPIs and A/R risk clearly, and what common charting mistakes look like). * The following chapters can then build forecasting and regression tools using the same monthly KPI tables produced in Chapter 8. Contributing ideas ------------------ If you want an easy contribution after Chapter 8: * Add one new KPI ratio (e.g., operating margin, inventory turnover) with a test. * Add one new diagnostic check in ``ch08_summary.json`` (e.g., outlier month flag counts). * Add a short “interpretation” paragraph in the Chapter 8 docs tied to one specific column. The goal is to keep each chapter small, deterministic, and easy to run.