One Model, All Assets: DolphinDB's Answer to Cross-Asset Complexity
In institutional environments, cross-asset analysis frequently breaks down due to inconsistent standards, siloed interfaces, and complex reconciliation processes. A single transaction can produce divergent valuations across different systems, while introducing a new asset class often requires building custom parsers or maintaining duplicate workflows.
DolphinDB V3.00.4 solve this with a unified multi-asset data model that treats all financial instruments as standardized, strongly typed computational objects. These objects are stored efficiently as single database columns and accessed through uniform calculation interfaces, enabling teams to value, price, and manage risk across diverse portfolios without wrestling with asset-specific implementation details.
A Unified Foundation: INSTRUMENT and MKTDATA
In this release, we converge cross-asset valuation onto two strongly typed object classes:
- INSTRUMENT – the financial contract itself (e.g., bonds, futures, forwards, swaps, options, etc.).
- MKTDATA – the market inputs driving valuation (e.g., spot quotes, yield curves, volatility surfaces).
Developers simply provide standard fields as JSON or Dict objects and pass them through parseInstrument and parseMktData. Once parsed, everything downstream ignores asset-specific quirks and data-source variations. Valuation and risk interfaces stay uniform, and your codebase gets shorter, more reliable, and far easier to maintain.
Here's what this looks like in practice—a fixed-rate bond and an FX spot rate:
// Instrument:Fixed Rate Bond
bond = {
"productType": "Cash",
"assetType": "Bond",
"bondType": "FixedRateBond",
"version": 0,
"instrumentId": "240025.IB",
"start": 2024.12.25,
"maturity": 2031.12.25,
"issuePrice": 100.0,
"coupon": 0.0149,
"frequency": "Annual",
"dayCountConvention": "ActualActual"
}
instrument = parseInstrument(bond)
// Market Data:Fx Spot (USDCNY)
fxSpot = {
"mktDataType": "Spot",
"spotType": "FxSpot",
"version": 0,
"referenceDate": 2025.08.18,
"value": 7.2659,
"unit": "USDCNY",
"spotDate": 2025.08.20 // referenceDate + 2 business days
}
mktData = parseMktData(fxSpot)
That's it. Both objects are now strongly typed and ready for curve construction, pricing, and risk analytics—no need for separate bond parsers, FX parsers, or any other asset-specific plumbing.
One Core, Two Pricers
Our unified model delivers its value through two pricing functions, each solving the fundamental questions every institution must nail: "What's each trade worth? " and "What's the total book worth? "
- Multi-asset Single-Trade Valuation —
instrumentPricer
Gives traders and portfolio managers mark-to-market pricing at any point in time. It answers a simple question: "What's this contract worth right now? " Typical uses include market making, quote validation, model backtesting, and single-trade P&L attribution.
Importantly,instrumentPricerhandles cross-asset vectorized inputs: bonds, interest-rate swaps, and FX forwards, swaps, or options can all be priced in a single call, returning trade-level NPV (and Greeks) under a unified methodology.
- Portfolio Valuation —
portfolioPricer
Gives risk, treasury, and accounting teams a complete book-level view. Under the same market scenario, it aggregates position sizes and directions into portfolio NPV. It answers: "What's my total exposure? Where's my risk? What drove today's P &L?" This supports limit monitoring, scenario and stress testing, and end-of-day reporting.
Here's how it works in practice: using the same pricingDate and mktData, you can value a bond, an interest-rate swap, and an FX forward separately—or combine them into a single portfolio valuation.
// Valuation date (intraday risk refresh or EOD batch)
pricingDate = 2025.08.18
// Multi-asset single-trade pricing: marks for trading and research
singlePrices = instrumentPricer(
instrument = [bond, irs, fxFwd], // any asset mix
pricingDate = pricingDate,
marketData = mktData
)
// Pushes to: trader screens, quote systems, backtests
// Returns: singlePrices = [bondValue, irsValue, fxFwdValue]
// Portfolio-level: book NPV and risk breakdown
positions = [
10000, // bond notional
10, // swap contracts
2 // FX forward contracts
]
portfolioResult = portfolioPricer(
instrument = [bond, irs, fxFwdUsdCny],
amount = positions, // quantities + long/short
pricingDate = pricingDate,
marketData = mktData
)
// Feeds: EOD reports, risk limits, scenario analysis
// Returns: portfolioResult = portfolioValue
Curves and Surfaces on Demand
Beyond valuation, this release adds two lightweight, production-ready tools that turn the zero-coupon yield curve and volatility surface into queryable services—same snapshot, same rules, consistent outputs that are easy to reproduce.
- curvePredict — One-tap yield curve lookup Pass in a curve and a tenor (as a date or year fraction) to get the annualized zero rate at that point. Front office uses it for discounting and mark-to-market, middle office for DV01/CS01 calculations and scenario analysis, and back office for reconciliation—everyone working from the same curve with the same logic.
- optionVolPredict — Precise picks on the vol surface Provide an expiry (date or year fraction) and strike to retrieve the corresponding annualized volatility. Trading, risk management (Vega, stress testing), and accounting all reference the same surface—same coordinates, same implied vol.
Examples
// Yield curve
curvePredict(curve, "2025-10-18") // zero rate on that date
curvePredict(curve, 1.0) // 1-year zero rate
// Vol surface
optionVolPredict(volSurf, "2025-10-18", 7.20)
Tool Matrix: Asset-Level Builders & Specialized Pricers
On top of a unified object model and interface, DolphinDB provides Builders for major asset classes and Pricers tailored to specific instruments.
Builders
| Category | Function | Description |
|---|---|---|
| Curve construction | bondYieldCurveBuilder | Yield curve construction from bond inputs |
| Curve construction | irSingleCurrencyCurveBuilder | Single-currency interest-rate swap (IRS) curve construction |
| Curve construction | irCrossCurrencyCurveBuilder | Cross-currency IRS curve construction (CNY/USD/EUR/GBP/JPY/HKD) |
| Surface construction | fxVolatilitySurfaceBuilder | FX volatility surface build, interpolation, and consistency checks |
Pricers
| Asset Class | Function | Description |
|---|---|---|
| Fixed Income | bondPricer | Discount notes / zero-coupon bonds / fixed-rate bonds |
| Fixed Income | bondFuturesPricer | Treasury bond futures |
| Rates | irDepositPricer | Deposits / short-end IR instruments |
| Rates | irFixedFloatingSwapPricer | Fixed-for-floating interest-rate swaps |
| FX | fxForwardPricer | FX forwards |
| FX | fxSwapPricer | FX swaps |
| FX | fxEuropeanOptionPricer | European-style FX options |
Looking Ahead: Toward Real-Time Streaming Pricing
In the next release, we're adding streaming market data support for curve and surface construction, along with real-time pricing interfaces. From market data ingestion and curve updates through to incremental trade and portfolio revaluation, the entire pipeline will become low-latency and event-driven—tightening the loop between front-office pricing and risk management.
Try It Now
Ready to dive in? Upgrade to DolphinDB V3.00.4 and experience a unified approach to cross-asset valuation—one object model and streamlined valuation pathways across all your assets.
Download: https://dolphindb.com/product#downloads-top
Learn more: https://dolphindb.com/