Fixed-income analytics and FICC margin

Submit Treasury positions with both margin and analytics enabled.

payload = {
    "calculation_type": "margins,analytics",
    "stress_test_enabled": True,
    "risk_metrics": {"lookback": 250, "ci": 99, "method": "value-at-risk", "mpor": 1},
    "portfolio": [{
        "account_code": "UST_FICC_ACCOUNT",
        "contract_type": "UST",
        "currency": "USD",
        "maturity": "20331115",
        "coupon_rate": 4.5,
        "coupon_frequency": 2,
        "notional": 25000000,
    }],
}
account = requests.post(f"{C9_API_ENDPOINT}/portfolios", headers=HEADERS, json=payload).json()["data"][0]

Use value_at_risk, expected_shortfall, dv01, and stress_loss for portfolio analytics. FICC margin appears in margin_by_ccp with result_type: ficc. Configured scenario results appear in stress_tests.

{
  "value_at_risk": 70336.59,
  "stress_loss": 184936.57,
  "dv01": -7142.63,
  "margin_by_ccp": [{ "result_type": "ficc", "initial_margin": 148998.42 }]
}

Use GET /validation-reference/fi-reference to discover accepted fixed-income categories and currencies.

Open the complete Python example.

Was this page helpful?