Skip to main content
Derivatives Compass

Data and Risk Calculation FoundationsPractitionerEstimated reading timeAbout 11 min

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.

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 or 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 published by OpenGamma, builds on four basic concepts: products, securities, trades, and positions1.

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 calculations2. Securities are treated as reference data that trades look up by identifier1.

In the 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 identifiers3. The state of a trade at a point in time holds a state used for position management alongside states used for regulatory reporting3. Changes in trade state and their history are covered on the Lifecycle Event Data page.

Names in three published specifications

Each published specification represents the same concepts with differently named components345678. 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 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

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, the trade component (SwapTrade) contains the swap terms (Swap) directly5. A listed trade can be held in three ways5.

  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 data5. A position is used when individual trades in a security do not need to be distinguished, and it holds the security ID and a quantity1.

Consider a hypothetical example in which Bank K buys 30 contracts of the same 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.

How legs relate to cash flows

An interest rate swap exchanges one stream of payments (a leg) based on a notional amount for another stream9. 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 leg and a floating rate leg6.

How each specification represents legs

In ORE, a swap has one or more legs, with no upper limit on their number9. 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 (CDS)4. Every payout holds the payer and receiver direction in its common part4.

The main items a leg holds correspond as follows in ORE and Strata106.

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 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 valuation11.

With the same terms, if the swap becomes an 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 coupon10.

When cash flows are generated from the terms

In the published libraries described here, the trade record holds the leg terms, and cash flows 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 data12.

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 library7. The cash flow list is one of the reports produced in the valuation step, and each row holds the leg number, payment date, and amount1311. Payment dates follow from the holiday calendar and business day convention in the leg terms10.

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 type14. The steps for building a schedule of dates from the terms are covered on the Generating Swap Payment Schedules page.

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 exposures15.

The 2011 US supervisory guidance on 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 level16. 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 management17.

The April 1, 2025 edition of the US Volcker Rule regulations defines a trading desk as the unit of organization of a 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 together18.

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 to19. Portfolios do not assume a hierarchy, and one trade can be placed in several portfolios. The VaR report can show a breakdown by portfolio ID19.

In ORE, books and desks go in fields that can be freely added as informational items not used in calculations19. In CDM, a party to a trade (Party) can carry a business unit (businessUnit) and an account (account)20. ORE can also distinguish netting sets by combining the netting set ID with items such as a legal entity ID21.

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 under the corresponding ISDA Master Agreement, and a trade without an ID belongs to no netting set22. The terms of each agreement (such as whether there is a credit support annex (CSA) and the collateral threshold) are held in a definitions file separate from the trades23. Exposure is calculated after the value of each trade is aggregated by netting set13.

Current exposure is the larger of the netting set's market value and zero24. The US CCR guidance says that aggregation should take into account whether netting agreements are valid and legally enforceable16.

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 institutions121319.

Trade storePricerAggregationReportingRecord legterms andmembershipsLook upcalendars,securitiesConvert topricingformCalculatevalues andcash flowsAggregateby nettingsetBreak downby portfolio
Figure 1Flow of trade data from recording to aggregation
Figure description

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 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.

Notes

  1. OpenGamma, "Strata Documentation: Product Model" (external site) (the "Strata Product Model"), "Concepts" (the Product, Security, Trade, and Position items). ↩ ↩2 ↩3

  2. The Strata Product Model (external site), opening section ("data only design"; pricing and risk are in strata-pricer). ↩

  3. FINOS, "Event Model" (external site) (7.0.0), "Trade" (definition, tradeIdentifier, tradeDate, party) and "State" (positionState and the reporting states). ↩ ↩2 ↩3

  4. FINOS, "Product Model" (external site) (7.0.0), "Economic Terms" and "Payout" (examples of combining payouts; payerReceiver in PayoutBase). ↩ ↩2 ↩3

  5. The Strata Product Model (external site), "Design" (OTC trades, Listed trades, Positions). ↩ ↩2 ↩3 ↩4

  6. OpenGamma, "Strata Documentation: Swap" (external site), opening section (legs), "Key classes" (SwapTrade and Swap), and "Product model" (fields of RateCalculationSwapLeg, NotionalSchedule, and FixedRateCalculation). ↩ ↩2 ↩3

  7. LSEG, "ORE Design" (external site) (April 2026), section 1.2.2.2 "Portfolio and CSA Data" (page 16) and the list of trade types (pages 17–18). ↩ ↩2

  8. Acadia, "ORE Product Catalogue" (external site) (April 2026; the "ORE product catalog"), chapter 2 "Trade Data" and section 2.1 "Envelope" (pages 13–14). ↩

  9. The ORE product catalog (external site), section 2.2.1 "Swap" (pages 16–17). ↩ ↩2

  10. The ORE product catalog (external site), section 2.3.3 "Leg Data and Notionals" (pages 381–383). ↩ ↩2 ↩3

  11. LSEG, "ORE User Guide" (external site) (August 2026; the "ORE user guide"), the cashflow analytic in section 5.1.2 and Table 13 "Cashflow Report" (page 94). ↩ ↩2

  12. The Strata Product Model (external site), "Resolved form". ↩ ↩2

  13. The ORE user guide (external site), chapter 2 "ORE Data Flow" (pages 14–15). ↩ ↩2 ↩3

  14. The ORE product catalog (external site), section 2.3.9 "Cashflow Leg Data" (pages 406–407). ↩

  15. Financial Services Agency, "主要行等向けの総合的な監督指針" (external site) (Comprehensive Guidelines for Supervision of Major Banks, etc., November 2026, in Japanese), III-2-3-6-2(2)② (page 143). ↩

  16. Office of the Comptroller of the Currency et al., "Interagency Supervisory Guidance on Counterparty Credit Risk Management" (external site) (June 2011, revised June 2026; the "US CCR Guidance"), III.2 "Aggregation of Exposures" (pages 5–6). ↩ ↩2

  17. Board of Governors of the Federal Reserve System, "Trading and Capital-Markets Activities Manual" (external site), section 2100.1 (April 2003), page 9, "Reports to Management". ↩

  18. U.S. Government Publishing Office, "17 CFR 75.3 Prohibition on proprietary trading" (external site) (April 1, 2025 edition), 17 CFR 75.3(e)(14) (pages 226–227). ↩

  19. The ORE product catalog (external site), section 2.1 "Envelope", PortfolioIds and AdditionalFields (pages 14–15). ↩ ↩2 ↩3 ↩4

  20. FINOS, "Reference Data Model" (external site) (7.0.0), the Party type (businessUnit, account). ↩

  21. The ORE product catalog (external site), section 2.1.1 "Netting Set Details" (page 15). ↩

  22. The ORE product catalog (external site), section 2.1 "Envelope", NettingSetId (page 15). ↩

  23. The ORE user guide (external site), chapter 8 "Netting Set Definitions" (pages 347–348). ↩

  24. The US CCR Guidance (external site), Appendix A "Current Exposure" (page 20). ↩

Summary

  • 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.

Share this page