<< Back to articles list

OTCStreaming Replay

OTCStreaming Replay enables fast, sophisticated market analysis by reusing historical calibrated market environments to value securities at a chosen valuation date. It supports both classic backtesting ("what would this have been worth then?") and attribution-style studies ("what would it be worth today if markets looked like they did then?").

Replay works by taking snapshots of fully calibrated models at a reference time (typically the market close, but any fixed time can be used). A snapshot captures the complete market environment needed for pricing (curves, surfaces, calibration state, and outputs), so valuations can be reproduced quickly and consistently — without having to rebuild the full calibration each time from granular market data.

When combined with dynamic queries (generic security definitions), Replay lets users price credit derivatives in a historical context with a single API call. A dynamic query is similar to a static query, except that for a CDS the user specifies a generic maturity (e.g., "5Y") rather than an explicit termination date. At pricing time, the query is resolved into a dated instrument by computing the maturity implied by "5Y" from the query’s as‑of date and applying the relevant business‑day conventions.

Crucially, users can control time consistently but flexibly by setting three dates independently:

Using a prior market as-of date helps evaluate a trade’s historical entry point on a realistic, contemporaneous market. Using a forward market as-of date helps measure subsequent performance while keeping the security definition fixed. This separation enables powerful historical studies that mix and match security definitions, market environments, and valuation points in time to answer complex "what-if" questions.

Use case: backtesting carry and roll-down

Investment‑grade credit curves are naturally steep — uncertainty in credit quality can only worsen over time — creating a stable, predictable landscape for systematic strategies. Credit investors benefit from two powerful return drivers: carry income over time and roll‑down gains as positions move closer to maturity and spreads compress.

A roll‑down‑only trade exemplifies this potential: buying 3Y and 7Y protection while selling 2× the 5Y amount. This barbell structure exploits the curvature of credit curves around the 5Y point, generating profits that are less sensitive to the absolute level of spreads.

OTCStreaming Replay transforms this analysis from theoretical to practical. With a single API call using dynamic queries, compute the NPV across your 3Y, 5Y, and 7Y positions and measure the expected 6‑month carry and roll‑down for the entire combo. Want to see how the strategy would have performed? Move the valuation date 6 months forward while keeping the trade definition constant — the system instantly returns the realized P&L (noting that the combo’s net coupons sum to zero).

We tested this methodology across all European and US investment‑grade index participants over the past decade (208 CDS curves). The data are provided by Hellebore Capital. The results are clear: portfolio expected performance aligns remarkably well with portfolio realized performance, validating the roll‑down signal as a highly reliable predictor — even in calm, stable market environments. Only 6% of the sample delivers returns opposite to expectation.

Figure — 6M carry & roll-down (expected) vs 6M realized performance of an average of 208 CDS investment grade 3/5/7 combo.

A valuation payload contains portfolio queries used to build the securities. Below are two equivalent examples: one derived from granular market data, and one derived from Replay snapshots. Both include a dynamic CDS query and a patch that requests the CRD6M scenario (6‑month carry & roll‑down). The scenario definition can be sourced from the record database and amended on the fly.

{
  "correlation": {
    "portfolioQueries": [
      {
        "type": "cdsQuery",
        "id": "5Y",
        "query": {
          "cdsCurve": "IBM",
          "maturity": "5Y"
        }
      }
    ],
    "ioRefPatches": {
      "gridPatches": [
        {
          "types": ["cdsGrid"],
          "modifications": {
            "$.content.scenarios": ["CRD6M"],
            "$.content.priceStyle": ["IsdaSpread", "NPV"]
          }
        }
      ]
    },
    "metadata": {
      "id": "Carry Roll Down",
      "asOf": "2025-01-12T17:20:00"
    }
  },
  "stage": "valuation"
}
Payload for a valuation derived from granular data.
{
    "correlation": {
      "portfolioQueries": [
        {
            "type": "cdsQuery",
            "id": "5Y",
            "query": {
                "cdsCurve": "IBM",
                "maturity": "5Y"
            }
        }
    ],
    "ioRefPatches": {
      "gridPatches": [
        {
          "types": ["cdsGrid"],
          "modifications": {
            "$.content.scenarios": ["CRD6M"],
            "$.content.priceStyle": ["IsdaSpread", "NPV"]
          }
        }
      ]
    },
    "replayLatentQueries": [
      {
        "tag": "London Close"
      }
    ],
    "metadata": {
      "id": "Carry Roll Down",
      "asOf": "2025-01-12T17:20:00"
    }
  },
  "stage": "valuation"
}
Payload for a valuation derived from replay.

The combination of Replay and dynamic queries allows you to handle a complex, bespoke case in a single API call—efficiently and consistently.

Explaining the P&L

The scenario set is designed to explain the performance of an investment between two dates by decomposing the realized P&L into intuitive drivers.

We proceed sequentially:

  1. Carry: revalue the initial portfolio at the forward valuation date while keeping market spreads unchanged. This isolates the impact of coupon accrual and the passage of time.
  2. Roll-down (carry + roll-down): revalue again using the same curve shape, but at the shorter remaining maturity. The incremental difference versus the carry-only result is the roll-down contribution.
  3. Curve and CS01 effects: finally revalue using the actual market curve observed at the end date. To make the comparison consistent, we first align maturities by translating the curve point corresponding to the portfolio’s new effective maturity (e.g., a 5Y position becomes ~4.5Y after 6M). Any remaining difference is attributed to curve moves (tightening/widening and changes in slope/shape).

The chart below shows, for a chosen start date, the contribution of each factor to the subsequent 6‑month performance. For example, on March 20, 2023, the dominant driver of the 6‑month outcome is the expected roll‑down, amplified by a favorable curve move (a steepening that benefits the strategy). Carry is close to neutral on this combo, while overall tightening contributes positively.

Figure — Waterfall of 6‑month P&L contributions for the average of 208 CDS IG 3/5/7 combos as of 20 March 2023.
The time‑series view that follows illustrates how, most of the time, the expected P&L (roll‑down) tracks the realized P&L closely. Deviations mainly occur during large market shocks, when adverse curve moves can offset the expected benefit and, in rarer cases, become the primary source of losses.
Figure — Time series of P&L factors for the average of 208 CDS IG 3/5/7 combos.

Availability

Replay is included in OTCStreaming's private service offering, providing users with powerful tools for combining their historical data with OTCStreaming analytics.

<< Back to articles list