Portfolio

Bloomberg Internal tool 2022–2025

Supply-chain relationship screener

I built a SQL script that checked every relationship in a supply-chain model for an expired disclosure, all at once. In 2024 it saved an estimated 360–480 hours, and it became a core reference for rebuilding the workflow tool.

241

Reports in 2024 up 15% on 2023

360–480

Hours saved in 2024 estimate, from the survey’s 30–40%

95%

Recommended actions accepted

Role
Sole builder: the query, the four-year rule QC, the recommendation algorithm and the pipeline
Team
Built solo, from earlier attempts I studied with the team’s senior analysts. Used across the team, especially on large models
Timeline
Built in Q1 2022 and live from Q2 2022. Large-model features in Q3 2022, and the cloud pipeline in Q2 2023. In use until 2025
Stack
SQL on the team’s database; Python; Bloomberg’s internal cloud; Terminal APIs

Before

Each analyst on the team covered about a hundred companies, with a supply-chain model for each: the company’s customers and suppliers, and for the quantified ones, their share of its revenue or costs. A relationship counts only while its disclosure is under four years old, and a model with an expired relationship can’t be published.

So before publishing, an analyst opened the legacy workflow tool and clicked through every relationship, one at a time, reading each disclosure date. A large model has one or two hundred. The market data came alongside, gathered by hand or pulled through a spreadsheet API with a notebook running next to the tool. The team had talked about it for a decade, and several analysts had tried to fix it.

Representative diagram. The steps are the real ones; three clicks per relationship, 100–200 relationships in a large model.

Why it mattered

Two clocks run at once: the four-year rule on every relationship, and a 14-month rule on every model. A model not refreshed within 14 months loses its quantified relationships from the Terminal, so once a year is the floor.

The team required a refresh twice a year and aimed for quarterly. At twice a year, models alone would take about half of each analyst’s working year; at quarterly, all of it. So some analysts fell back to once a year, the last safe point. By their own estimate, about half a large model’s time went to work that waited on outside data vendors, such as renewing disclosure documents before publishing.

The moves

The bet was to move the check off the screen and into one query, then get each answer to the analyst who needed it. I built it alone, starting from the earlier attempts: I worked through their scripts, spreadsheets and API calls with the senior analysts, and taught myself the legacy tool’s database schema.

01

Ask the database, not the screen.

The engineering

Representative
SELECT e.name, e.bbid,
       r.side, r.reported_by,
       d.doc_url, d.disclosed_on,
       q.rel_id IS NOT NULL
         AS quantified
FROM relationships r
JOIN entities e
  ON e.bbid = r.counterparty
LEFT JOIN disclosures d
  ON d.rel_id = r.id
 AND d.disclosed_on = latest(r.id)
LEFT JOIN quantified q
  ON q.rel_id = r.id
WHERE r.company = :bbid
  -- one BBID in
02

Put the four-year rule in the query.

The engineering

Representative
expires_on  = disclosed_on + 4 years
months_left = months_between(
                expires_on, today)

status = CASE
  WHEN months_left <  0
    THEN 'EXPIRED'
  WHEN months_left <= 6
    THEN 'APPROACHING'
  ELSE 'CURRENT'
END
disclosed · current for 42 monthsapproaching · 6 → expired
03

Say what to do, and why.

The engineering

Representative
condition
  → ACTION · reason on the row

in filing ∧ not in model
  → ADD · {doc} discloses a new pair
bics(counterparty) ≠ slice
  → RE-SLICE · fits {slice} better
expired ∧ newer filing names pair
  → RENEW · {doc} re-discloses it
expired ∧ nothing newer
  → REMOVE · no disclosure
             under 4 years
approaching ∧ quantified
  → RENEW · newer filing
            resets the clock
current
  → MAINTAIN · holds until
               {expires_on}
04

Work inside the access limits.

The engineering

Representative
analyst ─► BBID, in a message ─► me
                                 │
  query    team’s database       │
  rule     status · months_left  │
  enrich   Terminal API:         │
           BICS, mkt status,     │
           adj cap               │
  decide   action · reason       │
                                 ▼
  report ─► internal cloud
         ─► analyst collects

from Q2 2023: a Python wrapper runs
the four steps and drops the file

After

The report as an analyst received it, for one company: a spreadsheet with every relationship, its status under the four-year rule, and what to do about it.

birch_motors_12345_2024-10-24.csv8 relationships · run 2024-10-24 09:14
Counter­partyBBIDSideReported byDisclosedExpiresStatusMo.ActionReasonBICS industryMkt statusAdj. cap
39440SupplierBirch MotorsMar 2020 10-QMar 2024−7Tamsin’s 2024 10-K names Birch; quantifiedSemiconductorsActive12.6B
Orrin Fleet Leasing51907CustomerOrrin Fleet LeasingJun 2020 WireJun 2024Expired−4RemoveAcquired in 2023; nothing newer discloses the pairCommercial financeAcquired0.9B
Pell Distribution60281CustomerBirch MotorsDec 2020 10-KDec 2024Approaching2Renew the disclosureQuantified; Birch’s 2024 10-K re-discloses itDistributorsActive0.6B
Harlow Metals48213SupplierHarlow MetalsFeb 2021 10-KFeb 2025Approaching4Renew the disclosureQuantified; find a newer filing to reset the clockSteelActive4.2B
Marrow Chemicals55732SupplierMarrow ChemicalsJan 2022 10-KJan 2026Current15Re-sliceA coatings supplier sitting in the powertrain sliceChemicalsActive6.7B
Ostrava Glass47731SupplierOstrava GlassAug 2022 Annual reportAug 2026Current22MaintainDisclosure holds until Aug 2026Building productsActive1.1B
Kestrel Logistics44120SupplierBirch MotorsSep 2023 10-KSep 2027Current35MaintainDisclosure holds until Sep 2027Transport & logisticsActive1.8B
Volt Cycleworks41166CustomerVolt CycleworksSep 2024 10-KSep 2028Current47AddIn Volt’s 10-K, not yet in the modelAutosActive2.3B
SELECT … WHERE r.company = 12345today = 2024-10-24 · window = 6 months · horizon = 4 years0.8 s · enriched 8/8 · wrapper → cloud
entities eerelationships rrdisclosures druleruleruledecidedecideterminal ttt
e.namee.bbidr.sider.reported_byd.disclosed_onexpires_onCASE mmactionconditiont.bics(bbid)t.mkt_statust.adj_cap
← counter­party 3944039440SUPPLIER · 12345123452020-03-12 latest2020-03-12 +4ym<0 → EXPIRED−7→ RENEWexpired ∧ newer filing names pairbics(39440) = SEMISACTV12.6e9
← counter­party 5190751907CUSTOMER · 51907519072020-06-02 latest2020-06-02 +4ym<0 → EXPIRED−4→ REMOVEexpired ∧ nothing newerbics(51907) = COMFINACQ0.9e9
← counter­party 6028160281CUSTOMER · 12345123452020-12-15 latest2020-12-15 +4ym≤6 → APPROACHING2→ RENEWapproaching ∧ quantifiedbics(60281) = DISTRBACTV0.6e9
← counter­party 4821348213SUPPLIER · 48213482132021-02-10 latest2021-02-10 +4ym≤6 → APPROACHING4→ RENEWapproaching ∧ quantifiedbics(48213) = STEELACTV4.2e9
← counter­party 5573255732SUPPLIER · 55732557322022-01-20 latest2022-01-20 +4yelse → CURRENT15→ RE-SLICEbics(counterparty) ≠ slicebics(55732) = CHEMACTV6.7e9
← counter­party 4773147731SUPPLIER · 47731477312022-08-04 latest2022-08-04 +4yelse → CURRENT22→ MAINTAINcurrentbics(47731) = BLDPRDACTV1.1e9
← counter­party 4412044120SUPPLIER · 12345123452023-09-28 latest2023-09-28 +4yelse → CURRENT35→ MAINTAINcurrentbics(44120) = TRNLOGACTV1.8e9
← counter­party 4116641166CUSTOMER · 41166411662024-09-30 latest2024-09-30 +4yelse → CURRENT47→ ADDin filing ∧ not in modelbics(41166) = AUTOSACTV2.3e9

Drag the divider, or focus it and use the arrow keys. The outlined parts open the engineering behind them.

Representative data. Company names are invented; the columns, the rule and the actions are the real ones. The status shading is the page’s, not the file’s.

How I measured it

Years in, it was still an interim tool, so I measured it to make the case for it.

First, timestamps. The same companies and analysts come round again and again, so I timed models made before the screener against the ones after, from the moment a work item was opened to the moment it was published. The results supported the idea but couldn’t prove it: the system was never built to measure analysts, and the timestamps include idle time.

The timestamp comparisonOne company · one analyst

Representative. The method is real; the bars are not measurements. Timestamps include idle time, so this supports the result without proving it.

Then a survey. I asked the analysts who used it most about each of a model’s main tasks: updating, adding and removing relationships, re-slicing a company into its product lines, and reassigning its customers and suppliers to them. Across those tasks, it shaved 30–40% off a model’s time. The next two sections are built on that number.

30–40%

Of a model’s time saved from the survey

What happened

Most of the team used it on their large models. Requests kept climbing year on year, and I ran every one of them for the analysts who had no database access. By the survey’s numbers, the time it freed was enough for 72–96 more models at the old pace.

241

Reports in 2024 up 15% on 2023

360–480

Hours saved in 2024 estimate, from the survey’s 30–40%

95%

Recommended actions accepted

At full use

Only the models analysts asked about got screened. Run it on every model, twice a year as the rules require, and the arithmetic says it hands the team back the equivalent of three or four full-time analysts a year. A forecast, kept apart from what happened.

Twice a year · the requirement

20 analysts× 100 companies each× 2 models a year× 5 hours a model× 30–40% of it saved

6,000–8,000

Hours a year forecast

Once a year · the floor

20 analysts× 100 companies each× 1 model a year× 5 hours a model× 30–40% of it saved

3,000–4,000

Hours a year forecast

5 hours a model: a quarter are large and take 8, the rest 4. 30–40%: the survey of the analysts who used it.

What it led to

Its query, API calls and enrichment became a core reference for rebuilding the workflow tool: the backend process, and the data fields the new interface needed.

In 2024, management saw its flags as groundwork for prioritizing the queue of the LLM pipeline. Pairs that were new, approaching expiry, or expired but quantified would go first.

What I’d carry forward

An interim tool deserves real engineering. This one became a core reference for its replacement.

Start from the people who tried before. Their scripts and spreadsheets were most of the way there.

When people can’t reach the data, deliver the answer to them. No interface was ever built; the report was enough.