# Trade Data Models: Trades, Legs, Positions, and Books

> A trade data model is the way a financial institution's systems divide trade data into units so that trades can be recorded and then used for valuation and aggregation. In the published libraries described here, trades, product terms, securities, and positions are kept apart, and the terms of a swap are split into pay and receive legs. Each trade carries memberships such as a netting set or a portfolio so that it can be aggregated by each view.

- URL: https://www.derivatives-compass.org/en/data-systems/trade-data-model/
- Area: Data and Systems › Data and Risk Calculation Foundations
- Last reviewed: 2026-11-22
- 日本語版: https://www.derivatives-compass.org/ja/data-systems/trade-data-model/index.md

When you design trading or risk management systems, you have to decide which units to split each trade into and which views it must be aggregated by. The same trade data feeds both valuation and aggregation by [book](https://www.derivatives-compass.org/en/glossary/book/) or [netting set](https://www.derivatives-compass.org/en/glossary/netting-set/).

## Key points

- Some published libraries treat trades, product terms, securities, and positions as separate concepts.
- OTC trades hold the product terms inside the trade, while listed trades can point to a security by ID.
- In some published libraries, a leg either generates cash flows from its terms at valuation or holds dates and amounts directly.
- Aggregation views differ by legal entity, business unit, desk, and netting set, and some published libraries attach several memberships to one trade.
- Assigning a trade to the wrong netting set can make exposure look either larger or smaller.

## Separating trades, products, securities, and positions

In published libraries such as Strata, trade data is split into several concepts. Strata, a [pricing library](https://www.derivatives-compass.org/en/glossary/pricing-library/) published by OpenGamma, builds on four basic concepts: products, securities, trades, and [positions](https://www.derivatives-compass.org/en/glossary/position/)[^strata-concepts].

### Roles of the four concepts

| Concept  | What it holds                                                                               | Relation to other concepts               |
| -------- | ------------------------------------------------------------------------------------------- | ---------------------------------------- |
| Product  | Terms sufficient for pricing (dates, holidays, indices, currencies, amounts)                | Each product type has its own form       |
| Security | A standard contract that is traded, such as a share or a futures contract                   | Shared by ID, and comes with one product |
| Trade    | A transaction between two parties, with information such as the counterparty and trade date | The target of calculations               |
| Position | A quantity of a security                                                                    | Points to a security by ID               |

Strata's product components hold data only, and separate components handle pricing and risk calculations[^strata-data-only]. Securities are treated as [reference data](https://www.derivatives-compass.org/en/glossary/reference-data/) that trades look up by identifier[^strata-concepts].

In the [ISDA CDM](https://www.derivatives-compass.org/en/glossary/isda-cdm/) published by FINOS, a Trade represents the outcome of a transaction concluded between parties and is defined as something that changes the parties' financial position. Trade extends the product type that holds the economic terms (TradableProduct), and holds the trade date, the parties, and one or more trade identifiers[^cdm-trade]. The state of a trade at a point in time holds a state used for position management alongside states used for regulatory reporting[^cdm-trade]. Changes in trade state and their history are covered on the [Lifecycle Event Data](https://www.derivatives-compass.org/en/data-systems/lifecycle-event-data/) page.

### Names in three published specifications

Each published specification represents the same concepts with differently named components[^cdm-trade][^cdm-payout][^strata-design][^strata-swap][^ore-design][^ore-trade]. ORE (Open Source Risk Engine) in the table below is a published risk calculation library.

| Concept                                                     | FINOS CDM                                 | Strata                                 | ORE                                      |
| ----------------------------------------------------------- | ----------------------------------------- | -------------------------------------- | ---------------------------------------- |
| Trade                                                       | Trade                                     | Trade (SwapTrade and others)           | Trade (type given by TradeType)          |
| Product terms                                               | TradableProduct, EconomicTerms            | Product (Swap and others)              | Type-specific data (SwapData and others) |
| [Leg](https://www.derivatives-compass.org/en/glossary/leg/) | Payout (InterestRatePayout and others)    | SwapLeg                                | LegData                                  |
| Position                                                    | positionState in State (management state) | Position (SecurityPosition and others) | Trade types such as EquityPosition       |
| Counterparty                                                | Party                                     | Counterparty in TradeInfo              | Counterparty in Envelope                 |

Go deeper: [The ISDA Common Domain Model (CDM)](https://www.derivatives-compass.org/en/data-systems/isda-cdm/)

## How OTC and listed trades are held differently

In Strata, an OTC trade holds its product directly inside the trade. For an [interest rate swap](https://www.derivatives-compass.org/en/glossary/interest-rate-swap/), the trade component (SwapTrade) contains the swap terms (Swap) directly[^strata-design]. A listed trade can be held in three ways[^strata-design].

1. Hold only the security ID, quantity, and trade price, and look up the security from reference data at valuation (SecurityTrade)
2. Give the trade a security that carries just enough information to convert a market quote into a monetary amount (GenericSecurityTrade)
3. Use a dedicated type that holds the product terms inside the trade (BondFutureTrade for a bond future)

The first way lets you create the security terms once and share them, but reference data must be available at valuation. The second and third ways work without reference data[^strata-design]. A position is used when individual trades in a security do not need to be distinguished, and it holds the security ID and a quantity[^strata-concepts].

Consider a hypothetical example in which Bank K buys 30 contracts of the same [JGB futures](https://www.derivatives-compass.org/en/glossary/jgb-futures/) contract, then buys 20 more, and then sells 10. There are three trades, but the position can be expressed as one security ID and a long position of 40 contracts (30 + 20 − 10). OTC interest rate swaps have different terms for each trade and have no shared security. So if Bank K enters into two swaps with Company L, each of the two trades holds its own terms.

Go deeper: [Reference Data: Counterparties, Instruments, Holiday Calendars, and SSIs](https://www.derivatives-compass.org/en/data-systems/reference-data/)

## How legs relate to cash flows

An interest rate swap exchanges one stream of payments (a leg) based on a [notional amount](https://www.derivatives-compass.org/en/glossary/notional-amount/) for another stream[^ore-swap]. In Strata, a leg typically represents the obligations of the seller or the buyer, and the simplest interest rate swap consists of two legs: a [fixed rate](https://www.derivatives-compass.org/en/glossary/fixed-rate/) leg and a [floating rate](https://www.derivatives-compass.org/en/glossary/floating-rate/) leg[^strata-swap].

### How each specification represents legs

In ORE, a swap has one or more legs, with no upper limit on their number[^ore-swap]. In CDM, the component that corresponds to a leg is called a Payout. Combining two interest rate payouts gives an interest rate swap, and combining an interest rate payout with a credit default payout gives a [credit default swap](https://www.derivatives-compass.org/en/glossary/credit-default-swap/) (CDS)[^cdm-payout]. Every payout holds the payer and receiver direction in its common part[^cdm-payout].

The main items a leg holds correspond as follows in ORE and Strata[^ore-legdata][^strata-swap].

| Item                                                                                          | ORE LegData                             | Strata RateCalculationSwapLeg                 |
| --------------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------------------------- |
| Pay or receive                                                                                | Payer                                   | payReceive                                    |
| Notional and currency                                                                         | Notionals, Currency                     | notionalSchedule                              |
| Schedule of dates                                                                             | ScheduleData                            | accrualSchedule, paymentSchedule              |
| How the rate is set                                                                           | Type-specific part such as FixedLegData | calculation                                   |
| [Day count convention](https://www.derivatives-compass.org/en/glossary/day-count-convention/) | DayCounter                              | dayCount in FixedRateCalculation (fixed rate) |

### Example of a swap between Bank K and Company L

Consider a hypothetical example in which Bank K and Company L enter into a five-year interest rate swap with a notional amount of 10 billion yen. Bank K pays a fixed rate of 1% once a year and receives a floating rate once a year. Bank K's trade record holds the following two legs.

| Item              | Leg 1          | Leg 2               |
| ----------------- | -------------- | ------------------- |
| Pay or receive    | Pay            | Receive             |
| Rate type         | Fixed          | Floating            |
| Notional amount   | 10 billion yen | 10 billion yen      |
| Rate              | 1% a year      | Floating rate index |
| Payment frequency | Once a year    | Once a year         |

The fixed leg amounts can be calculated from the terms. Taking each year's day count fraction as exactly 1, Bank K pays 10 billion yen × 1% = 100 million yen five times. The floating leg amounts are not known until the rates are set, so ORE generates them from projected values at valuation[^ore-ug-cf].

With the same terms, if the swap becomes an [amortizing swap](https://www.derivatives-compass.org/en/glossary/amortizing-swap/) whose notional falls by 2 billion yen each year, the fixed leg amounts are 100 million, 80 million, 60 million, 40 million, and 20 million yen. ORE holds such changes in the notional in the leg as a list of notionals, one for each coupon[^ore-legdata].

### When cash flows are generated from the terms

In the published libraries described here, the trade record holds the leg terms, and [cash flows](https://www.derivatives-compass.org/en/glossary/cash-flow/) are generated from those terms at valuation. Strata separates a form that can be stored long term in a database from a resolved form that exists only briefly for pricing. When a trade is converted to the resolved form, Strata looks up holiday calendars and securities from reference data[^strata-resolved].

When ORE loads a trade, it first holds the data as strings and numbers, and its build step then links the trade to a product and a pricing engine in the pricing library[^ore-design]. The cash flow list is one of the reports produced in the valuation step, and each row holds the leg number, payment date, and amount[^ore-ug-flow][^ore-ug-cf]. Payment dates follow from the holiday calendar and [business day convention](https://www.derivatives-compass.org/en/glossary/business-day-convention/) in the leg terms[^ore-legdata].

Irregular payments can instead be held in a leg that stores pairs of dates and amounts directly rather than terms. ORE represents this as a leg of the Cashflow type[^ore-cfleg]. The steps for building a schedule of dates from the terms are covered on the [Generating Swap Payment Schedules](https://www.derivatives-compass.org/en/basics/schedule-generation/) page.

Go deeper: [Integrating Pricing Libraries with Trading Systems](https://www.derivatives-compass.org/en/data-systems/pricing-library-integration/)

## Aggregation views and trade memberships

Trades are aggregated not by a single view but by many. The views include units of aggregation that supervisory documents and rules call for, and units defined by netting agreements with counterparties.

### Units of aggregation in supervisory documents and rules

As of November 2026, the Financial Services Agency's Comprehensive Guidelines for Supervision of Major Banks, etc. treat the capability to aggregate risk data by category as a supervisory point. This applies to banks designated as systemically important domestically or globally. The categories include business line, group company, asset type, and the industry and region of [exposures](https://www.derivatives-compass.org/en/glossary/exposure/)[^fsa-rda].

The 2011 US supervisory guidance on [counterparty credit risk](https://www.derivatives-compass.org/en/glossary/counterparty-credit-risk/) (CCR) likewise lists being able to measure exposure at levels such as business line and legal entity, and including all trades in the aggregation at every level[^frb-ccr-agg]. The 2003 US examination manual gives the example of including the sources of profit and loss and the risks by trading book in daily profit and loss reports to management[^frb-book].

The April 1, 2025 edition of the US [Volcker Rule](https://www.derivatives-compass.org/en/glossary/volcker-rule/) regulations defines a trading desk as the unit of organization of a [banking entity](https://www.derivatives-compass.org/en/glossary/banking-entity/) that buys and sells for its trading account, and sets out the requirements in two alternative ways. Under one of them, the desk must submit reports as a unit for monitoring by management and book its trades together[^cfr-desk].

### Memberships attached to one trade

Because each view divides trades differently, the published libraries described here attach several memberships to one trade. In ORE, the part common to all trades (Envelope) holds the counterparty, the netting set ID, and a list of IDs of the portfolios the trade belongs to[^ore-envelope]. Portfolios do not assume a hierarchy, and one trade can be placed in several portfolios. The [VaR](https://www.derivatives-compass.org/en/glossary/value-at-risk/) report can show a breakdown by portfolio ID[^ore-envelope].

In ORE, books and desks go in fields that can be freely added as informational items not used in calculations[^ore-envelope]. In CDM, a party to a trade (Party) can carry a business unit (businessUnit) and an account (account)[^cdm-party]. ORE can also distinguish netting sets by combining the netting set ID with items such as a legal entity ID[^ore-ns-details].

| Membership                | Where it is used for aggregation                                               | Example in published specifications                     |
| ------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------- |
| Legal entity              | Aggregation by group company and by legal entity                               | LegalEntityId in ORE's netting set details              |
| Business unit, desk, book | Aggregation by business unit, desk limits and reports, profit and loss by book | businessUnit in CDM's Party, ORE's informational fields |
| Netting set               | Exposure by counterparty                                                       | NettingSetId in ORE's Envelope                          |
| Portfolio                 | Breakdowns in reports                                                          | PortfolioIds in ORE's Envelope                          |

### Wrong netting set assignments

In ORE, a trade with a netting set ID is subject to [close-out netting](https://www.derivatives-compass.org/en/glossary/close-out-netting/) under the corresponding [ISDA Master Agreement](https://www.derivatives-compass.org/en/glossary/isda-master-agreement/), and a trade without an ID belongs to no netting set[^ore-ns]. The terms of each agreement (such as whether there is a [credit support annex](https://www.derivatives-compass.org/en/glossary/csa/) (CSA) and the collateral threshold) are held in a definitions file separate from the trades[^ore-ug-netting]. Exposure is calculated after the value of each trade is aggregated by netting set[^ore-ug-flow].

[Current exposure](https://www.derivatives-compass.org/en/glossary/current-exposure/) is the larger of the netting set's market value and zero[^frb-ccr-ce]. The US CCR guidance says that aggregation should take into account whether netting agreements are valid and legally enforceable[^frb-ccr-agg].

Consider a hypothetical example in which Bank K holds two swaps with Company L in one netting set, and the market values from Bank K's side are +300 million yen for trade 1 and −200 million yen for trade 2.

| Holding                                       | Calculation                                         | Current exposure |
| --------------------------------------------- | --------------------------------------------------- | ---------------: |
| Same netting set ID on both trades            | 300 million yen − 200 million yen                   |  100 million yen |
| ID missing on trade 2, counted trade by trade | 300 million yen + 0 yen (trade 2 is negative, so 0) |  300 million yen |

If the ID is missing, the −200 million yen that should offset is not used, and exposure comes out 200 million yen too large. Conversely, if a trade under a separate agreement whose netting is not legally recognized is given the same ID, an exposure that is really 300 million yen comes out as only 100 million yen.

## Flow from recording to aggregation

These ways of holding data come into play in order, from recording a trade to aggregating it. The figure below places the processing described in the Strata and ORE documents in a single figure as an example; it is not a procedure common to all financial institutions[^strata-resolved][^ore-ug-flow][^ore-envelope].

**Figure 1: Flow of trade data from recording to aggregation**

The figure follows trade data across four columns, from recording through valuation and aggregation to reporting. What passes from the trade store to the pricing library (the pricer in the figure) is the leg terms and memberships. The pricing library looks up holiday calendars and securities from reference data, converts the trade into the form used for pricing, and then calculates values and cash flows. The valuation results for each trade feed two uses, aggregation by netting set and breakdowns by portfolio ID, and wrong memberships show up in both results.

> **For systems professionals: Holding identifiers and memberships**
>
> In a design that allows one or more trade identifiers (CDM's Trade), the internal trade number and the [UTI](https://www.derivatives-compass.org/en/glossary/uti/) that the parties share for regulatory reporting can be held side by side as separate identifiers. In a design that writes book and desk memberships directly into trade fields, every book reassignment after an organizational change means rewriting the trades. If memberships are held in a separate table that trades point to by ID, a reassignment only needs an update to that table. In either design, make it possible to confirm, by comparing aggregations before and after a reassignment, that moving trades to another book leaves the netting set IDs unchanged.

[^strata-concepts]: [OpenGamma, "Strata Documentation: Product Model"](https://strata.opengamma.io/product_model/) (the "Strata Product Model"), "Concepts" (the Product, Security, Trade, and Position items).

[^strata-data-only]: [The Strata Product Model](https://strata.opengamma.io/product_model/), opening section ("data only design"; pricing and risk are in strata-pricer).

[^cdm-trade]: [FINOS, "Event Model"](https://cdm.finos.org/docs/event-model) (7.0.0), "Trade" (definition, tradeIdentifier, tradeDate, party) and "State" (positionState and the reporting states).

[^cdm-payout]: [FINOS, "Product Model"](https://cdm.finos.org/docs/product-model) (7.0.0), "Economic Terms" and "Payout" (examples of combining payouts; payerReceiver in PayoutBase).

[^strata-design]: [The Strata Product Model](https://strata.opengamma.io/product_model/), "Design" (OTC trades, Listed trades, Positions).

[^strata-swap]: [OpenGamma, "Strata Documentation: Swap"](https://strata.opengamma.io/swap/), opening section (legs), "Key classes" (SwapTrade and Swap), and "Product model" (fields of RateCalculationSwapLeg, NotionalSchedule, and FixedRateCalculation).

[^ore-design]: [LSEG, "ORE Design"](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/ore_design.pdf) (April 2026), section 1.2.2.2 "Portfolio and CSA Data" (page 16) and the list of trade types (pages 17–18).

[^ore-trade]: [Acadia, "ORE Product Catalogue"](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/products.pdf) (April 2026; the "ORE product catalog"), chapter 2 "Trade Data" and section 2.1 "Envelope" (pages 13–14).

[^ore-swap]: [The ORE product catalog](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/products.pdf), section 2.2.1 "Swap" (pages 16–17).

[^ore-legdata]: [The ORE product catalog](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/products.pdf), section 2.3.3 "Leg Data and Notionals" (pages 381–383).

[^ore-ug-cf]: [LSEG, "ORE User Guide"](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/userguide.pdf) (August 2026; the "ORE user guide"), the cashflow analytic in section 5.1.2 and Table 13 "Cashflow Report" (page 94).

[^strata-resolved]: [The Strata Product Model](https://strata.opengamma.io/product_model/), "Resolved form".

[^ore-ug-flow]: [The ORE user guide](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/userguide.pdf), chapter 2 "ORE Data Flow" (pages 14–15).

[^ore-cfleg]: [The ORE product catalog](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/products.pdf), section 2.3.9 "Cashflow Leg Data" (pages 406–407).

[^fsa-rda]: [Financial Services Agency, "主要行等向けの総合的な監督指針"](https://www.fsa.go.jp/common/law/city.pdf) (Comprehensive Guidelines for Supervision of Major Banks, etc., November 2026, in Japanese), III-2-3-6-2(2)② (page 143).

[^frb-ccr-agg]: [Office of the Comptroller of the Currency et al., "Interagency Supervisory Guidance on Counterparty Credit Risk Management"](https://www.federalreserve.gov/newsevents/pressreleases/files/bcreg20110705a1.pdf) (June 2011, revised June 2026; the "US CCR Guidance"), III.2 "Aggregation of Exposures" (pages 5–6).

[^frb-book]: [Board of Governors of the Federal Reserve System, "Trading and Capital-Markets Activities Manual"](https://www.federalreserve.gov/boarddocs/supmanual/trading/trading.pdf), section 2100.1 (April 2003), page 9, "Reports to Management".

[^cfr-desk]: [U.S. Government Publishing Office, "17 CFR 75.3 Prohibition on proprietary trading"](https://www.govinfo.gov/link/cfr/17/75?sectionnum=3\&year=mostrecent\&link-type=pdf) (April 1, 2025 edition), 17 CFR 75.3(e)(14) (pages 226–227).

[^ore-envelope]: [The ORE product catalog](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/products.pdf), section 2.1 "Envelope", PortfolioIds and AdditionalFields (pages 14–15).

[^cdm-party]: [FINOS, "Reference Data Model"](https://cdm.finos.org/docs/reference-data-model) (7.0.0), the Party type (businessUnit, account).

[^ore-ns-details]: [The ORE product catalog](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/products.pdf), section 2.1.1 "Netting Set Details" (page 15).

[^ore-ns]: [The ORE product catalog](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/products.pdf), section 2.1 "Envelope", NettingSetId (page 15).

[^ore-ug-netting]: [The ORE user guide](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/userguide.pdf), chapter 8 "Netting Set Definitions" (pages 347–348).

[^frb-ccr-ce]: [The US CCR Guidance](https://www.federalreserve.gov/newsevents/pressreleases/files/bcreg20110705a1.pdf), Appendix A "Current Exposure" (page 20).

## Sources

- [Strata Documentation: Product Model](https://strata.opengamma.io/product_model/) — OpenGamma
- [Event Model](https://cdm.finos.org/docs/event-model) — FINOS
- [Product Model](https://cdm.finos.org/docs/product-model) — FINOS
- [Strata Documentation: Swap](https://strata.opengamma.io/swap/) — OpenGamma
- [ORE Design](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/ore_design.pdf) — LSEG
- [ORE Product Catalogue](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/products.pdf) — Acadia
- [ORE User Guide](https://github.com/OpenSourceRisk/Engine/blob/master/Docs/userguide.pdf) — LSEG
- [主要行等向けの総合的な監督指針](https://www.fsa.go.jp/common/law/city.pdf) — 金融庁
- [Interagency Supervisory Guidance on Counterparty Credit Risk Management](https://www.federalreserve.gov/newsevents/pressreleases/files/bcreg20110705a1.pdf) — Office of the Comptroller of the Currency、Federal Deposit Insurance Corporation、Board of Governors of the Federal Reserve System、Office of Thrift Supervision
- [Trading and Capital-Markets Activities Manual](https://www.federalreserve.gov/boarddocs/supmanual/trading/trading.pdf) — Board of Governors of the Federal Reserve System
- [17 CFR 75.3 Prohibition on proprietary trading](https://www.govinfo.gov/link/cfr/17/75?sectionnum=3\&year=mostrecent\&link-type=pdf) — U.S. Government Publishing Office
- [Reference Data Model](https://cdm.finos.org/docs/reference-data-model) — FINOS
