Knowledge
Table of Contents
Durable, cross-cutting knowledge that outlives any sprint. Each entry is a single-topic page — a definition, a convention, an explanation of how some piece of the system works — that other documents can link to without restating it. If you find yourself explaining the same concept in two places, that concept belongs here.
Knowledge is grouped by topic; jump to the section that fits what you are looking for. The external/ subfolder contains pure reference docs about systems and concepts ORE Studio does not own. For user-facing documentation see ORE Studio Manuals.
Domain
Finance concepts the codebase relies on.
- Data quality — the standard DQ-6 dimensions as we apply them inside ores.dq.core.
- ORE model configuration — how ORE Studio configures the pricing / risk models we hand to ORE.
- Interest Rate Curves — day-count conventions, discount factors, bootstrapping, and interpolation methods for rate curves.
- Time Structures and Tenors — scalar/tenor/term-structure concepts, settlement conventions, tenor labels, date rolling, IMM dates, and broken dates.
- FX Volatility Surface — pillar quoting (ATM/RR/STR), delta conventions, smile models (SABR, BS, spline), and cross-time interpolation.
- Probability measures: P (real-world) and Q (risk-neutral) — what each measure is, why both exist, which one QuantLib and ORE use in which context, and why GMM synthetic data lives in P while option pricers require Q.
- Covered Interest Parity and FX Forward Pricing — why FX forward rates are fully determined by the spot rate and IR curves, the arbitrage argument, the QuantLib discount-factor formula, and why synthetic data generation must derive forwards analytically.
- Vol surface no-arbitrage conditions — the three conditions a vol surface must satisfy (calendar-spread, butterfly, put-call parity), how QuantLib detects violations, and why the frozen-pool method matters for synthetic data generation.
- Volatility clustering and GARCH models — what vol clustering is, GARCH(1,1) as a recurrence relation, GJR-GARCH's leverage effect, and how this family relates to QuantLib's Heston model.
- Synthetic market data generation: approach — definitive approach for generating a consistent, arbitrage-free, evolvable synthetic market data environment covering all ORE-supported asset classes: chosen method per asset class, cross-asset constraint equations, P/Q-measure bridge, time evolution strategy, UI requirements, phased implementation roadmap.
- Market data identifiers — how market data series are identified across
external schemes (RIC, Bloomberg) and internally: the ORE canonical key
format (
FX/RATE/EUR/USD), its decomposition intoseries_type/metric/qualifier, the two-level subscription model (generation config vs client subscription), and the mapping from ORE key to NATS tick subject (lowercase,/→., e.g.marketdata.v1.tick.fx.rate.eur.usd). - ores.marketdata infrastructure inventory — inventory of the existing
market data stack across all tiers: DB schema and entities (
market_series,market_observation,market_fixing), FX spot encoding, tenant/workspace scoping, NATS request-reply subjects, Qt list windows,QueueChartWindowchart pattern, ORE CSV format, service registry entry, and CMake build conventions. Reference for the FX spot synthetic data PoC. - FX spot synthetic data PoC: architecture — architecture design for the FX
spot PoC vertical slice: gap analysis against the existing stack, new
ores.syntheticservice andores.marketdata.clientlibrary designs,IFxSpotFeedinterface, per-tick data flow, new NATS subjects, chart window and config dialog designs, 8 open design questions, and recommended 8-step implementation order. Gates implementation. - Cross-rates matrix (CRM) — hub note for the FX cross-rates matrix: the
no-arbitrage spanning-tree of driver/derived spot rates that lives in
ores.marketdata. Links the focused notes below.- FX spot date and settlement — spot days, T+2, the max-of-two rule.
- CRM graph topology and spanning tree — vertices/edges, acyclic, \(n-1\) edges, adjacency/weighting, slicing, directed-vs-undirected.
- Driver and derived rates — directly-quoted vs triangulated (proxy) rates and the never-set-both-sides / no-cycle invariant.
- Triangulation and cross rates — direct vs cross via a pivot, one-way/two-way matrices, sanity checks.
- FX currency conventions — majors/minors, base/quote precedence, reciprocals, Product-vs-Valuation split.
- CRM risk: recentering and artefacts — star-shaping on the aggregation currency, spot-date-mismatch artefacts, theta, risk routing.
- Spot rate derivation mechanics — covered interest parity, forward points, discount factors, pips/mfactor.
- Spot rate governance — local/global, spot verification, finance approval.
- Volatility surface driving — the driver/derived pattern applied to vol surfaces (correlation vs basis proxying).
- Correlation management — discrete per-tenor correlations that drive cross
ATM vol, managed in
ores.marketdata.
- Synthetic market data generators — architecture and specification of the generator
library:
IStochasticProcess/IFxSpotFeedseparation, all 12 process types (5 deterministic + 7 stochastic) with mathematical specifications, per-process RNG design, ring-buffer pre-generation, QuantLib vs standalone analysis, and performance design for 50–100 concurrent high-frequency FX feeds. - Polymorphic types over NATS — how to transport inheritance-like data
structures (instrument variants, feed config params) over NATS using RFL: the
type-specific subject pattern, discriminator-on-containing-entity convention,
two-phase dispatch for read paths that cannot know the type upfront, the RFL
std::variantindex fragility pitfall, and the wrapper struct idiom. Canonical example fromores.tradinginstruments; applied example fromores.marketdatafeed config parameters. - Pricing Configuration — named, versioned bundles of valuation settings: model mapping, smile surfaces, Greeks, layered overrides.
- Risk Reporting — market risk and trading desk reporting: report definitions, measures, Greek sets, classification taxonomy, EOD batch set.
- P&L Attribution — attribution identity, Bump and Reset/Run, trade activity categories, market data bucketing, time component, and EOD sign-off.
- Trade Blotter — primary front-office screen: deal grid, deal actions, entry form, STP panel, dynamic books, and cross-screen navigation.
- Compute Engine — distributed computation for valuation and reporting: run configurations, compute jobs, orchestration, chunking, environments, and lifecycle.
Architecture
How the codebase is put together.
- Component architecture — api/core/service split, facet placement, CMake dependency chain, and scaffold profiles.
- Anatomy of a Service — every layer of a NATS service (registry, IAM, certs, controller, runner, authentication) with a stand-up checklist.
- Market Data Architecture — producers, the marketdata authority (subscribe → persist → remap), feed configs, and source-independent consumers.
- CMake setup — preset menu, output directory layout, the conventions every component build follows.
- Entity lifecycle — layer ordering, type mappings, and service conventions for creating a full-stack entity.
- Qt plugin architecture —
ores.qt.apicontract, IPlugin lifecycle, the two-phase menu-building sequence. - Qt entity patterns — ClientModel, list window, detail dialog, history dialog, and async-fetch patterns.
- Badge system wiring — DB-driven pill badges:
ores.dqentities, SQL population,BadgeCache, and delegate wiring. - C++ code style: clang-format configuration — literate source for
.clang-format; every setting documented with rationale and examples. - Qt menu and toolbar patterns — plugin registration,
on_login()menu wiring, and MDI window toolbar construction. - CLI entity patterns — options structs, parser layout, and command-dispatch conventions.
- Shell entity patterns — REPL command registration, message-based communication, and operation shapes.
- HTTP entity patterns — REST route structure, handler skeleton, and CRUD conventions.
- Wt entity patterns — list widget, detail dialog, and application-integration patterns.
- SQL entity schema patterns — naming conventions, idempotency patterns, and entity-type catalogue.
- Unit test conventions — Catch2 file structure, naming, test-case shape, generators, database helpers.
- Code review checklist — the categorised checks both PR-delta and full-component reviews apply.
- Component documentation guide — how to write a
component_overview.orgthat passes audit. - PlantUML class diagram conventions — styling for component and system class diagrams.
- PlantUML ER diagram conventions — styling for the SQL schema ER diagram.
- PostgreSQL architecture — schema layout, roles, session settings, bitemporal design, extensions, and key utility functions.
- Time and timestamps — bitemporality,
TIMESTAMPTZ,db_timestamp,time_point, UTC standard, and the conversion layer.
Tooling
Developer tools, scripts, and automation that support the build, test, and documentation workflows. These are not user-facing features — they are the instruments contributors reach for to get work done.
- Developer scripts — inventory of the standalone scripts in
scripts/, grouped by purpose (metrics/reporting, validation, documentation generation, utilities), with a description of each script and notes on companion Python/shell pairs. - ores.compass — the Python repository compass: temporal orientation, semantic doc search, and agile scaffolding over the org-roam graph. Primary quality-of-life aid for both human contributors and LLM agents.
- ores.codegen — Python + Mustache code generator producing SQL, C++, and v2 org documents from JSON models.
- ores.lisp — Emacs Lisp developer tooling: dashboard, database browser, shell integration, and org-roam export pipeline.
- ores.sql — PostgreSQL schema, migration scripts, role provisioning, and
database lifecycle management. See the
* Scriptssection in the component overview for the full script inventory.
UI
How ORE Studio's surfaces look and feel.
- UI design principles — the Jony Ive-level rulebook: design direction, typography, colour, spacing, depth, motion.
- Icon guidelines — the visual-language catalogue (Fluent UI System Icons) grouped by semantic category.
Security
Authentication, authorisation, and tenancy.
- Identity and Access Management — how IAM is realised in ores.iam.core: tenants, accounts, roles, permissions.
- Role-Based Access Control — the RBAC model that backs IAM: roles compose permissions, the assignment graph.
Documentation tooling
The tools ORE Studio uses to author, publish, and navigate its documentation.
- Emacs — editor overview, our developer setup, and the CMake build
targets (
deploy_site,deploy_manual,deploy_skills,deploy_settings) that Emacs batch scripts drive. - org-roam — how the knowledge graph is built, how id-links resolve across the static site, and the non-obvious hacks that make it work in CI.
- Zettelkasten — the atomic-note method that motivates the graph structure
and id-link discipline across every
.orgfile.
External reference
Concepts and systems we don't own — captured here so other docs can link to them without restating. See the external knowledge index for the full list, or jump direct:
- Open Source Risk Engine (ORE) — the upstream risk-analytics library ORE Studio wraps.
- QuantLib — the open-source quantitative-finance library ORE itself builds on.
- Financial Products Markup Language (FpML) — industry XML standard for representing financial products.
- Coding schemes — FpML mechanism for restricting fields to a known set of values.
- Standing settlement instructions — SSIs and how they flow through the trading lifecycle.
- PostgreSQL Row-Level Security — what RLS is at the database level, before we describe how we use it.
- Shared library symbol visibility — visibility annotations and hidden-by-default policy at the compiler / linker level.