Cross FXFP2 RawMD vs Direct Case Study
Cross FXFP2 RawMD vs Direct Case Study
Visit the Mathema Option Pricing System for foreign exchange options and structured product valuation!
Same pillars: JSON (RawMD / C++ Manager) vs Excel VP (Direct Cross from legs); plus Fxfpc2GetCurve vs rawmd mid-from-2.
Overview
Same valuation date: build cross FX forward-points curve CNHTHB_FXFP_CROSS_2 two ways — JSON RawMD (rawmdGetFXForwardPointsCurve2 via C++ Manager) vs Excel Direct VP (McpFXForwardPointsCurve2 from legs USDTHB_FXFP_BGN_2 / USDCNH_FXFP_BGN_2). Then extract the mid curve with Fxfpc2GetCurve and compare to rawmdGetFXForwardPointsCurve MidFrom2.
Data: data/market_data/MCP_MARKET_DATA_20260626.json. Key sheets: Config (paths / date / Manager), PillarData (pillars for Direct VP), Compare_YC2 / Compare_FXFP2 / Compare_Cross2 (RawMD vs Direct), Curve_From2 (GetCurve vs MidFrom2). After F9, same-tenor diffs should be near zero.
Download MCP-TC35-CrossFXFP2RawMDvsDirect.xlsx
Object chain
=McpRawMarketManager("data/market_data")=rawmdGetFXForwardPointsCurve2(mgr,"CNHTHB_FXFP_CROSS_2",val_date)=Fxfpc2FXForwardOutright(curve, date, "MID")=Fxfpc2GetCurve(curve2,"MID")vsrawmdGetFXForwardPointsCurve(...,"CNHTHB_FXFP_CROSS",...)
Relative JSON: data/market_data/MCP_MARKET_DATA_20260626.json
curve_ids: CNHTHB_FXFP_CROSS_2, USDTHB_FXFP_BGN_2, USDCNH_FXFP_BGN_2, CNHDEPO_2
Key functions
| Function | Description |
|---|---|
| rawmdGetFXForwardPointsCurve2 | Cross2 / FXFP2 object |
| McpFXForwardPointsCurve2 | Direct VP (Leg1/Leg2) |
| Fxfpc2GetCurve | Curve2 → mid curve |
Python example
See example/market_data/cross_fxfp2_demo.py — LiveStore required; Python RawMD cannot build Cross2 (no Tenors in JSON).
Troubleshooting
- MarketDataRoot:
data/market_data(relative to workbook) #NAME?: registermcp_raw_market_dataand Reload PyXLL
