You're a credit analyst at a fund that lends directly to private companies. Your borrowers hold cash in many currencies. Night’s Watch warns you when one may not have enough usable cash for its next interest payment, and ranks which to handle first, by money at stake.
Today you learn a borrower is short of cash on the payment date, when the easy fixes are gone. The vision: every borrower's usable cash forecast to its next payment date, ranked by money at stake, with every number one click from its source.
The cash total you watch includes currencies the borrower can't convert or send. In the sample file, $9.31M is held and $796K can pay you.
Cash on the payment date is unknown today, and a single guess hides the bad case.
Each analyst handles borrowers in their own order, not by money at stake and recoverability.
A warning you can't check gets rebuilt in a spreadsheet, or set aside.
Actions and outcomes aren't recorded, so nobody can tune when a warning should fire.
| Your job | Hypothesis | Metric and target, then result | Expected impact |
|---|---|---|---|
| When bank balances arrive, I want coverage on cash the borrower can actually send, so no one looks safe when they aren't. | If coverage counts only usable cash, fewer borrowers look safe just before a missed payment, because trapped cash can't pay interest owed in dollars, euros or pounds. | Share of missed payments with coverage of 1.0 or more one period before: down. Baseline unobserved. Sample file: 91% trapped | Fewer missed payments that arrive without a warning |
| When I look ahead, I want the bad case on the payment date, so I warn in time. | If the warning depends on where cash due falls in the range, more misses are flagged in time at the same false alarm rate, because the threshold sits at the bad-case end. | Recall: share of missed payments flagged at least N days before the date: up. Baseline unobserved | More time to fix a shortfall (unobserved) |
| When I plan my day, I want the most money I can still save on top, so I handle it first. | If the list is sorted by level and principal at risk, more principal at risk gets an action on the day of the warning, because the largest savable loans come first. | Principal at risk with an action within one day: up. Baseline unobserved | More principal protected per analyst hour (unobserved) |
| When a borrower is flagged, I want every number traced to its record, so I can check it before I call. | If every number shows its formula and source field, you act on warnings sooner, because checking takes a click, not a rebuild. | Time from warning to first action: down. Baseline unobserved | Fewer warnings dismissed as wrong (unobserved) |
| When I act, I want it logged where I saw the warning, so my head of credit sees nothing was ignored. | If logging sits on the warning screen, more warnings end in a recorded action, because the step costs one click. | Share of High and Medium warnings with an action logged within one day: up. Baseline unobserved | A record to set the warning threshold |
Must not get worse: the false alarm rate (warnings where the borrower then paid in full) stays under the limit your head of credit sets. No analyst has used the tool, so every result is still unobserved.
In the sample bank file, a borrower holds $9.31M. Only $796K is in currencies it can use to pay you.
The weak link is belief, for both of you. For you: test the forecast on past data. If actual cash on the payment date lands above P10 about 90% of the time, the forecast is well set. For your head of credit: sit with two analysts and compare their order of work with the tool's list on the same day.
Also: agent view · data roadmap · data model
demo/test.js runs 19 checks on 3 fixed borrowers plus 2 bank data events. 19 pass.This build tackles 1 to 5.
The assignment deck sets five layers of success. Each layer builds on the one before.
| Layer | Metric | Type | Tests hypothesis | How measured |
|---|---|---|---|---|
| Signal + pipeline | Share of warnings sent within the agreed time | Early signal | 1, 2 (precondition) | Bank data timestamp vs warning timestamp |
| Signal quality | Range accuracy; recall and F1 (recall and precision combined) on known missed payments | Early signal | 1, 2 | Test on past snapshots kept aside |
| Operation | Share of warnings with an action within the agreed time (e.g. one day) | Early signal | 4, 5 | Action log timestamps |
| Decision | Principal at risk handled in the first hour; principal saved over time | Early / late signal | 3 | Action log joined to outcomes |
| Business | Near-losses, same or fewer; defaults nobody saw coming | Late signal | All | Credit records, quarterly |
| In scope | Not in scope (includes sub-problems not tackled) |
|---|---|
| Usable vs trapped cash, by how convertible each currency is | Data plumbing (6): no real CRM or bank connector. The connector is simulated; a Salesforce connector is next |
| Range of usable cash on the next payment date | Recoverability (7): a rough Strong / Partial / Weak score the analyst enters. No balance sheet, cash flow or loan condition data |
| Level rule, worst-first ranking, P1 to P4 priority | Calibration (8): fixed cut-offs and an assumption that daily cash swings follow a bell curve. No past missed payments to learn from |
| Trace of every number to a simulated source field | Forecasting money coming in (contracts, sales pipeline, interest rates, input costs) |
| Action log, event replay, field edits | Automated actions. The deck allows them later, only for low-stakes cases that can be undone |
| Automated test of the maths | Morning summary email, credit lines the borrower can draw and repay, borrowers with several loans, access control |
| Chose | Over | Gain | Cost |
|---|---|---|---|
| warn at P40 (recall-first) | warn at P10 | fewer surprise defaults | more false alarms, each costing an analyst hour |
| usable cash only | all cash | coverage matches what can pay interest owed in dollars, euros or pounds | depends on correct currency categories |
| rules and a range now | a statistical model now | easy to explain, runs without past outcomes | rougher forecast until outcomes build up |
| full principal as money at stake | expected shortfall | simple, matches the deck's four priority boxes | overstates small shortfalls on large loans |
| static page, simulated connector | live CRM link | $0, public, no client data | shows the logic, not the connection |
| human-logged actions | automated actions | analyst keeps every decision | one manual step per warning |
Night’s Watch has no separate opportunity assessment or PRD. The delivery deck plays both roles. Open the PDF in a new tab.
Related project: BDC Footnote Tape. It asks the same question (which borrowers are in trouble) from the public filings of BDCs (stock-listed funds that lend to private companies).
| Stage | Artifact | Repeatable with |
|---|---|---|
| Discovery | Questions for the credit team: what counts as distress, how early to warn, recall vs precision | /interview-guide |
| Opportunity | Sample bank file analysis: $9.31M total cash, $796K usable | /opportunity-analysis |
| Strategy | 32-page assignment deck: warning signal, workflow, data roadmap | /write-prod-strategy |
| PRD | Requirements and data model: entities, data layers from raw to clean (medallion), phases | /prd-draft |
| Metrics | 5-layer success model, from warning on time to business outcome | /metrics-framework |
| Rollout | Staged internal rollout plan with resources per stage | /launch-checklist |
| Build | Static prototype pages with goal files; this demo | /prototype, /goal-gate |
| Showcase | This page, name audit, goals and state files | /portfolio-case-study, /name-audit |
Skills are mapped from the artifact each stage produced. They show how each stage repeats with PM OS; the original working sessions were not logged.
/goal-gate /interview-guide /launch-checklist /metrics-framework /name-audit /opportunity-analysis /portfolio-case-study /prd-draft /prototype /write-prod-strategy