BondSpreadCurve Case
Less than 1 minute
BondSpreadCurve Case
Visit the Mathema Option Pricing System for FX options and structured-product valuation!
Load a bond-spread curve from a JSON two_curves entry, read zeroSpread, then shock the benchmark with a YieldCurve.
What it does: CNY_BOND_POLICY_SPREAD = treasury CNY_BOND_TREASURY vs policy CNY_BOND_POLICY (small times_and_rates samples). rawmdBondSpreadSetBenchmark requires an MYieldCurve (CNYDEPO_BUMP), not a BondCurve. Use C++ LiveStore / Manager; Python fromJson cannot build two_curves.
Download MCP-TC44-BondSpreadCurve.xlsx
Object chain
=McpLiveMarketDataStore("data/market_data/MCP_MARKET_DATA_20260827.json")=mdlsGetBondSpreadCurve(Store,"CNY_BOND_POLICY_SPREAD")=BondSpreadCurveZeroSpread(curve, date)=rawmdBondSpreadSetBenchmark(spread, mdlsGetYieldCurve(Store,"CNYDEPO_BUMP"))
RawMD: rawmdGetBondSpreadCurve + rawmdGetYieldCurve
After the benchmark swap, ZeroRate stays the same (adjusted curve unchanged); zeroSpread changes.
Key functions
| Function | Description |
|---|---|
| mdlsGetBondSpreadCurve | LiveStore spread curve |
| rawmdGetBondSpreadCurve | RawMD object |
| rawmdBondSpreadSetBenchmark | Replace benchmark (MYieldCurve) |
| BondSpreadCurveZeroSpread | Zero spread |
Python example
See example/market_data/bondspread_demo.py.
Troubleshooting
#NAME?: registermcp_market_data_live/mcp_raw_market_dataand Reload PyXLLsetBenchmarkCurvetype error: argument 2 must be a YieldCurve- Python RawMD returns empty: use C++ Manager / LiveStore
