Skip to main content

Fixed Income Examples

Price bonds, build yield curves, calculate duration.

Bond Pricing

response = requests.post(
    "https://finceptbackend.share.zrok.io/quantlib/instruments/fixed-bond",
    headers={"X-API-Key": API_KEY},
    json={
        "face_value": 1000,
        "coupon_rate": 0.05,
        "maturity_date": "2029-01-15",
        "settlement_date": "2024-01-15",
        "frequency": 2,
        "yield": 0.04
    }
)
Cost: 2 credits

Yield Curve Construction

response = requests.post(
    "https://finceptbackend.share.zrok.io/quantlib/curves/zero-curve",
    headers={"X-API-Key": API_KEY},
    json={
        "dates": ["2024-01-15", "2024-07-15", "2025-01-15", "2026-01-15"],
        "rates": [0.02, 0.025, 0.03, 0.035],
        "interpolation": "linear"
    }
)
Cost: 2 credits More examples →