Insights

Practical articles on financial data, financial documents, APIs, data extraction and the engineering behind Babylon.

Newsletter

Get Babylon insights by email, at most once a week.

Subscribe
  1. Why we built Megargy Newsletter Service

    We built Megargy Newsletter Service out of frustration with existing platforms. Sending a digest of Babylon’s latest articles should be straightforward: simple to set up, easy to configure and refine later, and sensibly priced. That is not what we found with incumbent vendors.

  2. Extracting Data from a Contract Note with babylon-table

    Contract notes are usually written for people, not software. This example shows how a carefully tagged PDF can do both: remain readable as a document, while allowing babylon-table to extract its tables and turn formatted strings into clean transaction data.

  3. Open Sourcing babylon-table

    Babylon has open-sourced babylon-table, a dependency-free Java library for ingesting and reshaping tabular data. Published under the Apache License 2.0 and available on Maven Central, the module grew out of Babylon’s practical financial data work. Its most distinctive feature is a small domain-specific language (DSL) for describing table transformations in a business-readable form.

  4. Data Friction at EasyEquities

    EasyEquities has transformed retail investing in South Africa, but access to transaction data remains unnecessarily difficult. Transaction confirmations, machine-readable trade histories, and stable security identifiers are essential for transparency, reconciliation, and investor trust.

  5. The Joy of Codex

    Codex isn’t just writing code — it’s changing how I think about building software.

  6. A Semantic Inference Engine for Tabular Data

    Brokerage accounts provide trade history data in many different tabular formats – each with its own naming quirks, column conventions, ordering, and hidden assumptions. Yet behind this diversity lies a consistent set of trade attributes with inherent structural relationships: quantities, prices, consideration, fees, proceeds, dates, instruments, and identifiers. This is exactly where a semantic inference engine can shine.

  7. What Does NOrd (“-N”) Mean on the JSE?

    If you scan JSE instrument lists, broker CSV files, or pricing feeds, you may notice that some shares end with “-N” in their short name. This isn’t a typo or data issue — the “-N” suffix indicates a specific, legacy class of reduced-vote ordinary shares known as N Ordinary shares, or NOrd.

  8. Developing the Segment Ledger Quick Entry

    TL;DR: We originally built a phrase-based parser for segment ledger quick entry, but it was too strict. Refactoring led us to anchor on the verb in the sentence (“buy”, “sell”), allowing us to identify the Subject–Verb–Object (SVO) structure. This made the parser far more flexible and capable of handling natural, messy, human descriptions — including tricky cases like “GBP”, which can be both a currency and a listing symbol!

  9. When Does GBP Not Represent Sterling?

    TL;DR: On the London Stock Exchange, GBP was, until very recently, the ticker symbol for Global Petroleum Limited. This rare overlap is confusing to humans and machines alike, and serves as a reminder that context matters.

  10. Rebasing Capital Gains With the gainSince Parameter

    When investors move between tax jurisdictions, capital gains must be split between the period before and after the move. Babylon’s new gainSince parameter makes this possible. By specifying a date, you can recalculate gains as if every holding were rebased at that moment — automatically replacing pre-date transactions with a single notional trade per security per account. The result is an accurate picture of gains arising since the jurisdiction change, while preserving your original trading history.

  11. The Babylon Portfolio Segment — The Ledger for a Group of Positions

    A Segment is one of Babylon’s core concepts. It defines the natural partition of a portfolio, ensuring every security — and all of its trades — belong to one, and only one, Segment. This simple rule keeps capital gains and performance calculations coherent, consistent, and correct at scale.

  12. Enhanced Query Parameters in the Babylon API

    Every API begins simply. A few clean endpoints, a handful of query parameters — ?symbol=AAPL, ?date=2025-09-01 — and everything feels elegant. Then the real world arrives. You need to exclude certain accounts, filter by date ranges, or select everything except one value. Suddenly that neat equality model starts to creak.

  13. ZAC, GBX, EUC and Other Misspelt Currencies

    In equity prices we often encounter what appear to be strange misspellings of currencies—for example, ZAC rather than ZAR, GBX rather than GBP, or EUC rather than EUR. Why does this happen? As it turns out, they are not misspellings at all! The data provider is usually trying to express the price in minor units of the currency. For instance, a quote of 2,345 ZAC is actually a price of 2,345 South African cents, which is 23.45 ZAR. The same pattern applies to other so-called “misspellings.”

Archives