price_cds
Compute the NPV, fair spread, and upfront of a single-name CDS from user-provided market data and trade parameters.
Instructions
Price a single-name CDS (POST /price-cds).
Args:
market_data_source: where the market numbers in this call come from. user_pasted
(the user pasted or typed the numbers in this conversation), user_file (the
user attached a file/screenshot the numbers were read from), engine_example
(an engine example's pricing block, only when the user explicitly asked to run
an example), session (a market previously stored in this session, which
itself came from one of the above). There is no value for estimated, recalled or
placeholder data. If you would have to invent numbers, do not call this tool:
ask the user for the data.
side: Buyer (buy protection) or Seller. notional: > 0.
running_coupon: decimal (0.01 = 100bp).
credit_curve: {par_spreads: [{tenor, spread}], recovery_rate?, id?}
(bootstrapped by the engine with the preset's helper conventions),
{hazard_rate, recovery_rate?, id?} (flat) or a credit curve id in
the market.
preset: a preset with a cds block (default EUR_CDS: quarterly
TwentiethIMM, Following, Actual360, MidPoint).
start: effective date YYYY-MM-DD or as_of (default).
maturity: YYYY-MM-DD; or tenor (engine-resolved, Unadjusted).
recovery_rate: for a curve the tool builds (default: preset, 0.4).
model: MidPoint | ISDA (CdsModelSpec added, id cds_<type>) or a
model id in the market.
upfront / upfront_date, protection_start (default = start), trade_date
(default = as_of), frequency, day_counter, business_day_convention,
cash_settlement_days, schedule_overrides: optional; defaults noted.
summary.cds_list: npv, fair_spread, fair_upfront, leg npvs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | ||
| as_of | No | ||
| model | No | MidPoint | |
| start | No | as_of | |
| tenor | No | ||
| market | Yes | ||
| preset | No | EUR_CDS | |
| upfront | No | ||
| maturity | No | ||
| notional | Yes | ||
| frequency | No | ||
| request_id | No | ||
| trade_date | No | ||
| day_counter | No | ||
| credit_curve | Yes | ||
| upfront_date | No | ||
| recovery_rate | No | ||
| running_coupon | Yes | ||
| protection_start | No | ||
| additional_trades | No | ||
| discounting_curve | Yes | ||
| calendar_overrides | No | ||
| market_data_source | Yes | ||
| schedule_overrides | No | ||
| cash_settlement_days | No | ||
| business_day_convention | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||