Research · TRUEFIX LABS
Designing a Financial Instrument Domain Model for Trading Systems
A domain model for stocks, bonds, ETFs, FX, derivatives, perpetuals, indices, baskets, and multi-venue instruments without an inheritance tree that collapses under real market coverage.
Short answer. A production trading system should model financial instruments with orthogonal dimensions instead of making Stock, Option, Future, and Crypto subclasses of one Instrument type. Keep canonical identity, classification, economic exposure, product family, contract terms, venue listing, provider identifiers, trading rules, settlement, lifecycle, and relationships as separate concepts.
The modeling principle
The useful question is not “which subclass is this?” It is a set of independent questions: What is it? What economic exposure does it represent? What product family does it belong to? What exact contract terms apply? Where is it listed? How is it identified by each provider? How does it trade and settle? Treat the answers as separate dimensions.
FinancialInstrument
├── Identity
├── Classification: AssetClass, InstrumentType, InstrumentSubType, CFI
├── Economics: currency, underlying, multiplier, contract size
├── TypeSpecificTerms
├── Lifecycle
├── Identifiers[]
├── Listings[]
└── Relationships[]Separate the domain layers
Keep the economic or reference object separate from the financial product, the concrete instrument, and its market representation. An issuer, currency, commodity, index, rate, basket, or reference entity can be an economic reference. A product family describes the family of exposure. A concrete instrument adds exact terms. A listing or venue instrument describes where and under which market segment it trades.
| Concept | Purpose |
|---|---|
| FinancialInstrument | Stable domain object that can be identified, priced, held, traded, settled, or referenced. |
| ProductFamily | Broad family such as equity, bond, fund, option, future, forward, swap, or perpetual. |
| Contract / Instrument | Exact economic terms, including expiry, strike, settlement, multiplier, and underlying. |
| Listing / VenueInstrument | Tradable representation on a venue, market, segment, or listing. |
| ProviderInstrument | A broker or exchange representation mapped to the canonical instrument. |
Classification is not identity
InstrumentType, CFI, security classification, and asset class explain what an instrument is. They do not identify one exact instrument. ISIN, CFI, MIC, ticker, exchange symbol, and provider IDs serve different namespaces and should remain separate records with source and validity metadata. A classification code must never be used as an internal instrument ID.
Type-specific terms without nullable-field sprawl
Shared fields belong on the core instrument. Product-specific terms belong in separate value objects: EquityTerms, BondTerms, OptionTerms, FutureTerms, ForwardTerms, SwapTerms, PerpetualTerms, and FundTerms. For an option, keep underlying, call or put, strike, exercise style, expiration, and settlement together. Do not put every possible strike, coupon, funding rate, and face value into one table as nullable columns.
OptionTerms {
underlying: InstrumentId,
callPut: CallPut,
strike: Decimal,
exerciseStyle: ExerciseStyle,
expiration: Instant,
settlement: SettlementSpecification
}Canonical instrument, listing, and provider mapping
A canonical instrument can have multiple listings and multiple provider mappings. A venue symbol such as BTCUSDT, BTC-USDT, or an IBKR contract identifier is a representation in a namespace, not a universal identity. Preserve provider, venue, market segment, native symbol, native contract ID, environment, validity, and verification evidence in the mapping.
CanonicalInstrument
├── VenueInstrument / Listing
│ └── InstrumentIdentifier[]
└── ProviderInstrumentMapping[]Trading rules and lifecycle are first-class
Trading behavior belongs outside the instrument identity but must be linked to it. Model price increments, quantity rules, trading calendars, sessions, status, issue and effective dates, expiry or maturity, settlement specifications, corporate actions, and delisting or successor events. The same canonical product may have different rules on two venues or in two environments.
PriceIncrementRuleandQuantityRuledefine valid orders.TradingCalendarandTradingSessiondefine when orders and data are valid.InstrumentLifecyclerecords issue, effective, expiry, maturity, status, and transitions.SettlementSpecificationcaptures settlement asset, currency, timing, and method.
Relationships instead of hidden inheritance
Use explicit relationships for meaning that crosses products: UNDERLYING, DERIVED_FROM, CONVERTS_TO, DELIVERS, TRACKS, COMPONENT_OF, SUCCESSOR_OF, ROLLS_TO, and SAME_SHARE_CLASS. This represents options, futures, ETFs, indices, baskets, rolls, deliverables, and multi-leg instruments without pretending they are all the same subtype.
Implementation checklist
- Assign a stable internal identity independent of ticker and provider.
- Attach classifications and economic exposure as separate dimensions.
- Store type-specific terms in dedicated structures.
- Model listings, venue instruments, and provider mappings explicitly.
- Attach rules, lifecycle, settlement, and corporate actions with effective dates.
- Represent underlyings, components, deliverables, successors, and legs as relationships.
- Require exact, current mappings before an execution command reaches a broker adapter.
Sources
- Supplied TrueFix instrument-domain design memo (PDF, 2026-09-17)
- FIX Trading Community standards
- ISO 10962 / CFI overview
Last verified: 2026-09-28. Provider capabilities can change by region, account, product, environment, and entitlement; verify the linked official documentation before production use.
Last updated: 2026-09-28