Zum Inhalt springen

Lektion 25 · Projects and Reference

Project: Company Health Dashboard

Complete project: validate statements, compute cash flow and ratios, flag warning rules and write a plain-language financial health summary in Python.

In this project you build a small financial health report that runs the same checks every period. It validates data first, then calculates metrics, applies warning rules and supports plain-language findings. This is how repeatable analysis works.

Design

flowchart LR
  A["Statement data"] --> B["Validate"]
  B --> C["Metrics"]
  C --> D["Rules"]
  D --> E["Report"]

Never calculate ratios from data that fails validation.

Step 1: validate

We check two things: each balance sheet balances, and equity rolls forward from the year before.

Python Part 1: validate two years of data

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Testing with deliberately broken data shows that your check can actually fail.

Step 2: metrics and rules

Rules turn numbers into attention flags. The thresholds below are invented policy choices for this exercise. Real thresholds depend on industry, seasonality and agreements.

Python Part 2: metrics, flags and report

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Step 3: explain the cash change

A flag should lead to a cause. Build a cash bridge from profit to the change in cash.

Python Part 3: cash bridge

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The bridge shows the main uses: equipment, then working capital and dividends. Notice that the running total is only a presentation order; it does not show when cash actually moved during the year.

Step 4: write the summary

Write it yourself, using this structure:

  • Headline: profit and margins improved; cash is thinner.
  • Why: equipment purchases and more money tied up in receivables and stock.
  • Watch: the cash ratio and the cash cycle.
  • Actions: run the 13-week cash forecast, review overdue invoices and revisit the dividend plan.
  • Limits: year-end snapshots only; no seasonal data.

If you use an AI assistant to draft commentary, give it only data you are allowed to share, check each number and claim against your own calculations, and keep a person responsible for the conclusion.

Extend the project

  1. Read figures from CSV text with the csv module and validate types.
  2. Add a third year and show trends. The three-statement forecast can supply one.
  3. Move thresholds into a configuration dictionary, with an owner and reason for each.
  4. Add safe handling for zero or negative denominators.
  5. Write tests for each rule just below, at and just above its limit.

Choosing rules well

A useful rule has four parts: a metric with a written formula, a threshold or change that triggers it, an owner who reviews it and an action to take. For example:

Part Cash ratio rule
Metric Cash / current liabilities at month end
Trigger Below 0.30
Owner Finance lead
Action Update the weekly cash forecast and report options

Avoid dozens of rules. If everything raises a flag, people stop reading. Review thresholds from time to time: did flags lead to useful action, and did problems appear that no rule caught?

A value just above a limit and falling fast may deserve more attention than a value just below the limit and improving. Where you have several periods, show the last few values next to each other. A simple text table is often clearer than a complex chart.

Data handling

Dashboards often become widely shared. Decide who may see them, remove personal details such as individual salaries or customer names when they are not needed, and show the data date prominently. A reader should never mistake last quarter's figures for today's.

What this report cannot tell you

It sees only the numbers you give it. It cannot tell whether a large customer is about to leave, whether equipment is failing or whether the figures were recorded correctly in the first place. Passing the balance check proves arithmetic consistency, not accuracy.

Common mistake: letting a rule replace judgment. A flag is a prompt to investigate, not a conclusion. A report with no flags can still miss a major risk.

Define done

Your dashboard is complete when another person can run it on a new period without editing the code. That means inputs sit in one clearly named structure, every metric has a written definition, validation errors name the year and the gap, and each flag shows the value that triggered it next to its threshold. Add a line at the top with the data date and the person who prepared the report. Then give it to a colleague with a deliberately broken input. If they can find and fix the problem using only the error message, your checks are useful. If not, improve the message first.

Practice tasks

Try each task on paper or in the editor above before you read the answer. When your result differs, compare definitions first, then timing, then arithmetic.

Task 1. The cash ratio rule triggers below 0.30. What is the smallest Year 2 cash balance that would avoid the flag, if current liabilities stay at 130,000?

Answer: 0.30 x 130,000 = 39,000. Harbor held 30,000, so it was 9,000 short of the policy minimum. Raising cash by borrowing short term would also raise current liabilities, so recalculate the whole ratio.

Task 2. Why should the dashboard stop when validation fails?

Answer: Every later metric would rest on figures that are known to be inconsistent. Report the validation error clearly and fix the source data first.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What should happen before ratios are calculated?

    Ratios from broken data are misleading.
  2. 2. Why test with deliberately broken data?

    A check that has never been seen to fail may not work.
  3. 3. What is the role of a warning rule?

    Rules direct attention, while judgment decides.
  4. 4. What does a cash bridge show?

    It reconciles two cash balances through each movement.

Summary

  • Validate first, then calculate, flag and explain.
  • Store thresholds as explicit, owned policy choices.
  • Tie explanations to a cash bridge that reconciles.
  • Keep people accountable for conclusions.

Next: Glossary and Cheat Sheet

Dein Fortschritt wird in diesem Browser gespeichert. Kein Konto nötig.