← All projects

Sophia

Design only

A planned trading-data service that combines broad signals over longer horizons through a versioned, point-in-time ontology.

Data OntologyPostgreSQLTimescaleDBAPIFinance

At a glance

  • Outcome: Designs a long-horizon signal service.
  • Status: Remains design-only after four days on the ontology in April 2026. Contains 29 markdown files, no code, no ingested rows. Defined the ontology before ingestion could harden around a wrong model.
  • Role: Solo: designed ontology, data model, action contract.
  • Stack (planned): Uses Python, Postgres time-series extensions, row-level tenancy security, and a bot-facing HTTP API. Generates the TypeScript client from the API schema, not by hand.
  • Source: Private.
  • Limitations: Lacks real-outcome calibration or working-system testing.

Scope

Most retail algorithmic trading competes on speed. Targets hours and days, not microseconds. Colocated firms use exchange-building machines, custom silicon, venture funding, and meter-scale matching-engine distances; retail distances span miles. Treats signal breadth and correctness as data modeling.

Covers equities and ETFs through ten source families: earnings, filings, insider activity, corporate actions, mergers, regulatory, macro, ETF context, press releases, and options flow. Combines many weak signals through an inspectable ontology and keeps future knowledge out of historical snapshots. Excludes broad news and social sentiment.

Service and contract design

Resolves and normalizes ingested, conflicting market data and corporate events across formats and schedules. Exposes current symbol views through an API. Prevents normalization from becoming each bot’s largest, least-tested component.

Replaced a model-first plan with one model per source family, model outputs as contract, a separate worker-side API, and add, hold, trim, exit actions. Defines the ontology first so rule-based and learned generators share meanings. Uses one language instead of two toolchains across package boundaries, plus two position-independent signals. Retains original brainstorm with a note listing its errors.

Signal ontology

Stores each subsignal in native units with confidence, coverage, direction, decay, evidence-known time, and source-row pointers. Keeps earnings surprise in consensus dispersion units, insider buying as a fraction, and rates in basis points. Writes a normalized value beside each snapshot’s raw value, retaining readability and allowing policy revisions without generator changes.

Passed one ontology stress test three days after decision-log closure. Added options as a new asset class through two new source families and a handful of new signal kinds without changing the schema. Stored volatility-surface data as scalar rows instead of surface objects, reused the decay, normalization, and weighting pipeline unchanged, and added no required equity-consumer fields.

Rejected an asset-specific signal block because it would add branches to every consumer and change the table key. Requires a weight audit before enabling the two families because they dilute all existing weights.

Point-in-time access

Treats point-in-time correctness as a permission boundary. Plans a database role denying signal-generation and training workers raw-event tables. Exposes history through functions applying time cutoffs before returning rows, blocking injected conditions from widening them. Gives Python an opaque handle, not a raw table.

Plans CI to reject raw-accessor imports in workers. Plans a property test that seeds future-dated rows and verifies that generators receive none. None of these three layers is built.

Action contract

Omits trim and exit from the wire contract because they require position size and cost basis, which Sophia does not own during signal generation. Returns an entry stance and exit pressure, then lets each bot choose portfolio actions. The SDK ships a default mapping to buy, hold, trim, and exit; documentation marks it illustrative, not canonical.

Pattern admission

Keeps an April draft that would replace the bottom-up aggregator with named, backtested patterns triggered by defined conditions. Leaves admission by hit rate, expected payoff, or their product unresolved. A loose policy would surface junk; a strict policy could surface nothing and provide no proof that the system works. Six questions remain open, so the document stays a draft and the bottom-up design remains current.

Introduced ideas now central to ageomaps: an infinite canvas and non-geospatial context inside an analysis workspace. Implements neither here because Sophia is specified as a headless service without an interface. Both projects support inspectable analysis across sources not designed to be combined.