Why Is FICC Multi-Asset Backtesting So Challenging?
Compared with equity and futures backtesting, where data models and trading rules are relatively standardized, backtesting for FICC (Fixed Income, Currencies, and Commodities) must handle a much wider range of market data, pricing conventions, order behaviors, and cross-asset account management requirements.

Interbank bond trading is a good example. Quotes may be expressed as either yield or clean price, while the settlement amount must include accrued interest. Interest rate swap (IRS) valuation, meanwhile, depends on contract specifications, historical fixing data, and the relevant interest rate curves.
Applying a general-purpose backtesting framework to these scenarios often requires substantial additional development to handle pricing, order execution, account management, and risk calculations.
Applying a general-purpose backtesting framework to these scenarios usually requires substantial extra development for pricing, order execution, account management, and risk calculation.
So how should a backtesting framework be designed to support multi-asset FICC strategies?
This article examines the key challenges of FICC backtesting and shows how DolphinDB connects market data, financial engineering, trade execution, and portfolio management in a unified framework.
1. Why Is FICC Backtesting More Challenging?
Traditional quantitative backtesting typically takes standardized market data as its primary input. For equity or futures strategies, the process can often be simplified into a sequence: read historical bars or tick data, generate trading signals, simulate order execution, and calculate returns.
The diverse asset characteristics and trading mechanisms in FICC make this approach considerably more complicated.
Different data models and trading conventions
Equity strategies generally operate on standardized market data such as prices and trading volumes. FICC strategies, however, may involve bond snapshots, trades, yields, interest rate curves, and other types of market data. Trading conventions also vary across instruments, including order placement methods, pricing conventions, and accrued interest calculations.
A key challenge is therefore to bring different asset classes and market data types into a common backtesting workflow without losing their individual business semantics.
More complex trading behaviors
For many directional strategies, the backtesting process can be represented as:
Market Data → Signal Generation → Order Submission → Execution → Position Updates
Market-making and arbitrage strategies, however, require more sophisticated event-driven logic. They must continuously monitor market conditions, update quotes, handle order cancellations and executions, and adjust their behavior based on inventory.
The framework must therefore simulate not only when an order is submitted, but also how a strategy interacts with the market over time.
Unified account and risk management
FICC strategies ultimately need to be evaluated at the portfolio level rather than leg by leg.
Cash, positions, margin, and PnL must be managed consistently across asset classes, and portfolio-level risk measures such as net exposure and DV01 (the change in value for a one-basis-point move in yield) must be calculated as well.
Running a separate backtest for each asset class and merging the results afterward adds significant engineering overhead and makes portfolio-level accounting and risk management more difficult.
2. What Should a FICC Backtesting Framework Provide?
Based on these requirements, a FICC backtesting framework should cover four essential layers:
- Multi-asset market data: Support different market data types and instrument-specific reference data within a unified workflow.
- Financial engineering: Provide pricing, valuation, and risk calculations required by different asset classes.
- Event-driven execution: Simulate strategy behavior, order submission, cancellation, repricing, and execution.
- Account and portfolio management: Maintain consistent cash, positions, PnL, and risk exposures across multiple assets.
These layers are interconnected parts of one backtesting workflow, not independent modules.
3. How DolphinDB Supports Multi-Asset FICC Backtesting
DolphinDB's backtesting framework extends conventional backtesting capabilities to support Xbond cash bonds, two-sided market making, and interest rate swaps.
Multiple asset classes, together with their market and reference data, can be handled within a single backtesting instance. The framework also maintains unified records of cash, positions, executions, and portfolio equity. On top of this, strategies can calculate metrics such as basis, duration, and DV01, and implement cross-asset trading and hedging logic.

The extensions correspond to the four layers described above: market data, financial engineering, event-driven execution, and account management.
3.1 Multi-Asset Data: Bringing Different Instruments into a Unified Workflow
FICC strategies may rely on different types of market data, including snapshots, bars, tick data, and interest rate curves. Different instruments also require their own contract specifications, pricing parameters, and reference data.
Maintaining completely separate data structures and interfaces for each asset class can lead to considerable data adaptation work.
DolphinDB organizes different types of market data as backtesting events and uses a unified msg dictionary to deliver multiple data streams. Instrument-specific contract information, curves, and historical fixing data can be passed through a reference dictionary, for example:
securityReference = {
xbond: bondRef,
futures: future,
xswap: xswapRef,
swapCurve: swapCurve,
swapAssetPriceHistCurve: swapAssetPriceHistCurve
}This allows different asset classes to be handled within the same backtesting framework, without requiring a completely separate data interface for each instrument.
3.2 Financial Engineering: Integrated Pricing and Risk Calculations
In FICC strategies, quoted prices are often only one part of the calculation.
Bond strategies may need to convert between yield, clean price, and dirty price, while calculating accrued interest, yield to maturity (YTM), duration, and DV01. IRS strategies, meanwhile, depend on interest rate curves, valuation models, and related risk measures.
Performing these calculations outside the backtesting system and importing the results afterward introduces additional data processing steps and can create inconsistencies between research and execution logic.
DolphinDB integrates financial engineering functions into its FICC backtesting framework. These include bond pricing conversions between YTM, clean price, and dirty price, as well as calculations of accrued interest, duration, and DV01.
For bond strategies, the framework also supports YTM-based order placement and execution logic, together with dirty-price settlement, allowing pricing conventions and transaction rules to better reflect actual bond trading practices.
As a result, strategies can directly calculate YTM, duration, and DV01 within their event callbacks, without relying on a separate external pricing system. Pricing, risk analytics, and strategy backtesting are all part of the same computational workflow.
3.3 Event-Driven Execution: Simulating the Trading Process
DolphinDB uses an event-driven architecture to execute FICC strategies. Different market events can trigger corresponding strategy callbacks, for example:
- Bar events: Generate trading signals based on historical bar data.
- Market snapshot events: Evaluate market conditions and execute trading logic.
- End-of-day events: Process positions and account states after trading.
In an XBOND intraday strategy, for instance, signals can be generated from bar data, while subsequent snapshot events drive execution according to predefined matching rules. For a two-sided market-making strategy, the framework can also simulate quote submission, cancellation, repricing, and execution.
The following example shows a bar callback used in an Xbond intraday strategy:
def onBar(mutable context, data){
context["lastPx"] = data.close
s = calcMaSignal(data.ma10, data.ma30, context["lastPx"], context["filter"], context["prevFast"], context["prevSlow"])
context["prevFast"] = s["prevFast"]
context["prevSlow"] = s["prevSlow"]
if (s["golden"]) context["sig"] = 1
if (s["death"]) context["sig"] = -1
}Each time a new bar arrives, the strategy updates its latest price and moving-average state, then generates a signal (+1 on a golden cross, −1 on a death cross).
This approach lets the framework simulate how a strategy evolves and reacts to changing market conditions, rather than merely computing its final trading results.
3.4 Unified Account Management: Positions, Risk, and PnL at the Portfolio Level
DolphinDB manages cash, positions, executions, and equity changes within the same backtesting process, aggregating trading results from different asset classes into a unified portfolio.
In a bond–IRS arbitrage strategy, for example, trading and hedging relationships can be determined from basis and DV01, while the unified account system records position and cash changes on both legs. The final results reflect portfolio-level returns and risk exposures, rather than separate bond and IRS results that must be combined manually.
After a backtest, the framework provides access to detailed results for further analysis:
| Category | Available Results |
|---|---|
| Trading | Order details and market-making execution records |
| Account | Positions, cash balances, and portfolio equity |
| Strategy | Cumulative returns, annualized returns, maximum drawdown, Sharpe ratio, and other performance metrics |
These results can be used to derive further statistics, such as win rate, profit-loss ratio, number of trades, and average holding period. For more detailed attribution, returns can be decomposed into sources such as carry and basis convergence.
Conclusion
FICC backtesting requires more than the ability to replay historical market data and calculate strategy returns. Different strategies place different demands on the framework: directional strategies focus on market data and signal generation; market-making strategies require more sophisticated order-state management, quote adjustments, and inventory tracking; cross-asset arbitrage strategies require synchronized market data, integrated pricing and risk calculations, and unified portfolio management.
DolphinDB addresses these requirements through a unified framework that connects multi-asset data, financial engineering, event-driven execution, and portfolio-level account management.
By bringing these capabilities into a single computational environment, the DolphinDB database helps reduce the engineering complexity of FICC strategy development and provides a consistent foundation for researching, testing, and evaluating multi-asset trading strategies.