Skip to content
All library documents

Generating Arbitrage-Free Yield Curve Data for Model Testing

Article Quant Q&A · Author: Lanza

Summary

The document considers how to create yield-to-maturity data for testing curve-fitting methods such as Nelson–Siegel and cubic splines. Its central caution is that independently randomized yields can produce curves that violate no-arbitrage relationships, making them poor test data for methods intended to describe market curves.

Two alternatives are suggested: repurpose observed yield data from another market, or resample complete sets of observed market data. Resampling whole curve snapshots preserves the relationships among maturities present in each observation better than randomizing individual yields independently. The response is brief and offers no implementation details, validation results, or guidance on adjusting data across markets, so the proposed approaches still require care if the goal is realistic data for a particular currency or market regime.

Key ideas

  • Independent random draws of yields can create curves that violate no-arbitrage conditions.
  • Observed curves from another market can provide realistic sample shapes for testing.
  • Resampling complete yield curve observations preserves cross-maturity structure.
  • The suggestions do not explain how to adjust foreign market data or validate synthetic samples.

Tags

Full text
# Generating random yields


# Generating random yields












I would like to test different methods for fitting a yield curve, like the Nelson-Siegel, cubic splines etc.

I would like to generate random yield to maturity data, that somehow reflects the common observed yields in the markets. I am using R but I appreciate any idea.

Thanks in advance!

## Answer by Larasing (score 1)

https://quant.stackexchange.com/a/25513

Challenge with completely randomized yields is that it's hard to ensure the data is arbitrage-free. What you can do is either using the data from another market (say take the UK yield and pretend they are in USD) or use randomized resampling of SETS of data.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.