| quantra_metaA | Engine metadata, verbatim from GET /meta. Call this first: it tells you the engine's API version, QuantLib
version, product list and endpoint list. The response field is the
engine body unchanged. |
| quantra_healthA | Engine liveness, verbatim from GET /health. |
| list_endpointsA | The engine's POST endpoints (24 at the pinned version) with one-line descriptions. Taken from the vendored OpenAPI spec, not from the live engine; compare
with quantra_meta to detect a version mismatch. |
| engine_schemaA | Request and response JSON schema for one engine endpoint. Args:
endpoint: one of the 24 POST paths, e.g. /price-ois-swap
(leading slash optional). Unknown names return an error that
lists the valid endpoints.
depth: how many levels of $ref to inline (0..8, default 3).
Deeper refs are left as {"$ref": "<Name>", "unresolved": true}. Returns the spec's top-level required list, the top-level field
names, and both schemas. Remember the engine's rule: a field the
product needs that is omitted is an error, never a default. |
| list_enumsA | Values of an engine enum from the vendored spec. Args:
name: e.g. Calendar, DayCounter, Frequency,
BusinessDayConvention, TimeUnit, Compounding,
Interpolator, BootstrapTrait. An unknown name returns
an error listing every available enum. |
| calendar_holidaysA | Holidays of a QuantLib calendar between two dates (POST /calendar-holidays). Args:
calendar: engine Calendar enum value, e.g. TARGET, UnitedStates.
start_date: YYYY-MM-DD (inclusive).
end_date: YYYY-MM-DD (inclusive).
include_weekends: also list Saturdays/Sundays (default False).
calendar_overrides: optional per-request holiday corrections
(added_holidays / removed_holidays per calendar). summary = {count, first, last} taken from the engine's response.
|
| calendar_business_daysA | Business days of a QuantLib calendar between two dates (POST /calendar-business-days). Args:
calendar: engine Calendar enum value.
start_date: YYYY-MM-DD.
end_date: YYYY-MM-DD.
include_start: whether start_date itself may be listed (default True).
include_end: whether end_date itself may be listed (default True).
calendar_overrides: optional per-request holiday corrections. summary = {count, first, last} taken from the engine's response.
|
| calendar_advanceA | Advance a date by a tenor on a QuantLib calendar (POST /calendar-advance). Args:
calendar: engine Calendar enum value.
date: YYYY-MM-DD start date.
tenor_number: number of units; negative shifts backwards.
tenor_unit: engine TimeUnit (Days, Weeks, Months, Years, ...).
convention: engine BusinessDayConvention (Following,
ModifiedFollowing, Preceding, Unadjusted, ...).
end_of_month: apply the end-of-month rule (default False).
calendar_overrides: optional per-request holiday corrections. summary = {input_date, advanced_date} taken from the engine's response.
|
| engine_requestA | POST a JSON body to any engine endpoint (the raw escape hatch). Args:
endpoint: one of the engine's POST paths (see list_endpoints),
e.g. /price-ois-swap.
body: the full request object exactly as the engine expects it
(engine_schema and the quantra://examples/* resources
show the shape). The engine does not default omitted fields.
validate: check body against the vendored OpenAPI schema first
(default True). On failure nothing is sent and problems
lists each JSON-pointer path with a message.
request_id: optional X-Request-Id to forward; one is generated
when absent and reported in engine.request_id. Returns {ok, endpoint, request, response, engine}; on an engine
error ok=false with the HTTP status and the engine's error
text verbatim (400 = request wrong, 422 = well-formed but unpriceable). |
| list_presetsA | Market-convention presets available to build_curve / build_value_curve. Each row: id, currency, index (the engine index id the
preset registers), helpers (quote types it supports: deposit, fra,
future, swap, ois), curve (day counter / interpolator / trait) and
the provenance of the conventions. get_preset returns the data. |
| get_presetB | One preset as data: index definition, curve settings, every helper
convention block and the provenance of each field. Args:
id: e.g. USD_SOFR_OIS, EUR_ESTR_OIS, GBP_SONIA_OIS,
GBP_SONIA_SWAP, EUR_EURIBOR_6M, EUR_EURIBOR_3M. |
| build_curveA | Turn a quote strip into an engine curve spec (no engine call). Args:
id: curve id to register, e.g. USD_SOFR_OIS.
preset: a preset id from list_presets; supplies the index
definition and every helper convention.
quotes: [{type: deposit|fra|future|swap|ois, tenor: "6M", rate: 0.052}, ...]
(fra: months_to_start/months_to_end; future:
future_start_date + price or rate). Sorted by
maturity; a duplicate (type, tenor) is rejected locally.
reference_date: YYYY-MM-DD curve date (normally the pricing as_of).
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.
trait: override the preset's bootstrap trait (Discount,
ZeroRate, FwdRate).
interpolator: override the preset's interpolator.
day_counter: override the preset's curve day counter. Returns {ok, curve, indices, preset, notes}: curve is the
TermStructure and indices the IndexDef list to pass to
bootstrap_curve (or to session_put); notes lists every
default applied with its source. Nothing is priced here. |
| build_value_curveA | An interpolated curve from explicit values (no engine call). Args:
id: curve id.
kind: zero (InterpolatedZero), discount (InterpolatedDiscount:
first point must be the reference date with value 1.0) or
forward (InterpolatedFwd: instantaneous continuously-compounded
forwards; Linear/BackwardFlat/ForwardFlat only).
points: [{date: "2026-01-15", value: 0.96}, {tenor: "2Y", value: ...}]
in order; the engine anchors the curve at the first point.
reference_date: YYYY-MM-DD.
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.
preset: take the curve day counter and point calendar/convention
from this preset; or give conventions explicitly.
conventions: {day_counter, calendar, business_day_convention}.
compounding, frequency: zero points only (default Continuous /
Annual; all points share them).
interpolator: default Linear (zero, forward) or LogLinear (discount). Returns {ok, curve, indices: [], preset, notes}. |
| curve_from_pasted_tableA | A curve from a table the user pasted (a vendor curve screen, a spreadsheet,
a ticket): parses it and calls build_value_curve (discount / zero) or
build_curve (par quotes). No engine call; no arithmetic on the values. Args:
text: the pasted rows. CSV / TSV / ';' / '|' / whitespace separated, header
optional. Each row: a date (2034-09-18, 18-Sep-2034,
09/18/2034 with date_format) or a tenor (10Y), then the
value. % values are divided by 100; 1,000.5 loses its commas.
An optional word per row (ois, swap, deposit) tags a par
quote's type.
id: curve id to register.
kind: discount (discount factors -> InterpolatedDiscount), zero
(zero rates -> InterpolatedZero) or par (market quotes -> bootstrap
helpers of the preset).
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.
preset: supplies the curve day counter and point calendar/convention
(USD_SOFR_OIS...); required for par; or give conventions.
reference_date: the curve / as-of date. For discount it may be omitted
when the first row is that date with value 1.0.
quote_type: par tables only: the helper type when the rows do not name one
and the preset offers several.
percent: true = every value is a percentage; default: only values
written with %.
date_format: mdy / dmy for slash dates; inferred when a field exceeds
12, otherwise required.
compounding, frequency: zero tables only (default Continuous / Annual).
interpolator: override the builder default. Returns the builder result ({ok, curve, indices, preset, notes}) plus
parsed_rows (line, label, value as read), unparsed (line, text,
reason) and header. For a discount table whose first row is not the
reference date, the anchor point {reference_date: 1.0} the engine
requires is added in front and said so in notes. |
| build_queryA | A CurveQuerySpec for bootstrap_curve (no engine call). Args:
curve_id: the curve to sample.
measures: any of DF, ZERO, FWD.
tenors: TenorGrid, e.g. ["1M", "6M", "1Y", "5Y", "10Y"]; needs
calendar + business_day_convention to roll each tenor.
range_grid: RangeGrid alternative {end_date, step_number, step_time_unit, start_date?, business_days_only?, calendar?, ...}.
zero: options for ZERO (default: continuous, annual, curve day counter).
fwd: required when FWD is requested (forward_type Period + tenor,
or Instantaneous + eps; compounding; frequency). Returns {ok, query, notes}. |
| bootstrap_curveA | Bootstrap curves on the engine and sample them (POST /bootstrap-curves). Args:
curves: items are TermStructure objects, build_curve results
({curve, indices}) or {"session": "<name>"} references
to a stored curve or market.
as_of: YYYY-MM-DD valuation date (pricing.as_of_date).
queries: CurveQuerySpec objects or build_query results.
indices: extra IndexDef objects or {"session": name} refs;
indices carried by build_curve results are added automatically.
Identical duplicates are sent once; conflicting ids are rejected.
calendar_overrides: per-request holiday corrections (engine >= 0.7.0).
request_id: optional X-Request-Id. The echoed request is the fully RESOLVED body. summary lists per
curve {id, pillars, first_grid_date, last_grid_date, measures}; the
sampled values are in response.results[].series. |
| bootstrap_inflation_curveB | POST /bootstrap-inflation-curves with a raw request body (validated first). Args:
body: the engine's BootstrapInflationCurvesRequest (see
engine_schema('/bootstrap-inflation-curves')); no preset
support yet, the body is sent as given once it validates.
request_id: optional X-Request-Id. |
| price_vanilla_swapA | Price a fixed-vs-IBOR swap (POST /price-vanilla-swap). 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.
market: {"session": name}, an engine pricing block (used verbatim)
or {curves: [...], indices: [...]} (build_curve results allowed).
preset: a preset with a vanilla_swap block (EUR_EURIBOR_6M,
EUR_EURIBOR_3M): schedule, fixed and floating leg conventions.
swap_type: Payer (pay fixed) or Receiver.
notional: constant notional (> 0).
fixed_rate: decimal, e.g. 0.032.
effective_date: YYYY-MM-DD or spot (as_of + the preset's settlement
days, resolved by the engine's /calendar-advance).
discounting_curve, forwarding_curve: curve ids in the market.
termination_date: YYYY-MM-DD; or give tenor (5Y, resolved by the
engine from the effective date, Unadjusted).
spread: floating-leg spread (decimal, default 0.0).
index_id: floating index id in the market (default: the preset's index id).
fixed_leg_overrides, floating_leg_overrides: replace conventions
(frequency, day_counter, payment_convention, notionals, schedule rules).
additional_trades: more swaps for the same request (same preset/market).
as_of: YYYY-MM-DD; required unless market is a pricing block.
include_flows: ask the engine for per-leg cash flows. Result: uniform shape + notes (every convention with its source),
date_resolution (the /calendar-advance calls) and summary.swaps
(npv, fair_rate, leg npvs selected from the response). |
| price_ois_swapA | Price an OIS (fixed vs compounded overnight) swap (POST /price-ois-swap). 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.
market: as in price_vanilla_swap.
preset: a preset with an ois_swap block (USD_SOFR_OIS: payment lag 2;
EUR_ESTR_OIS: payment lag 0).
swap_type, notional, fixed_rate, effective_date, termination_date | tenor,
spread, index_id, discounting_curve, forwarding_curve: as in
price_vanilla_swap (the overnight index id defaults to the preset's).
payment_lag, averaging_method, lookback_days, lockout_days,
apply_observation_shift, telescopic_value_dates: overnight-leg
parameters; each defaults to the preset's value (noted).
fixed_leg_overrides, overnight_leg_overrides, additional_trades, as_of,
include_flows: as in price_vanilla_swap. |
| price_fixed_rate_bondA | Price a fixed-rate bond (POST /price-fixed-rate-bond). 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.
market: as in price_vanilla_swap.
preset: a preset with a fixed_rate_bond block (EUR_FIXED_BOND).
face_amount: > 0. coupon_rate: annual decimal coupon.
issue_date: YYYY-MM-DD or spot (as_of + preset settlement days).
maturity_date: YYYY-MM-DD, or tenor (engine-resolved from the
effective date, Unadjusted).
effective_date: first accrual date (default: = issue_date).
discounting_curve: curve id in the market.
overrides: settlement_days, frequency, accrual_day_counter,
payment_convention, redemption, notionals, schedule rules.
yield_overrides: how the yield is quoted (day_counter/compounding/frequency).
include_details / include_flows: pricing.options.bond_pricing_details / _flows. summary.bonds: npv, clean/dirty price, accrued, yield, durations.
|
| price_floating_rate_bondA | Price a floating-rate note (POST /price-floating-rate-bond). 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.
preset: a preset with a floating_rate_bond block (EUR_EURIBOR_6M).
face_amount, issue_date, maturity_date | tenor, effective_date, overrides,
include_details, include_flows: as in price_fixed_rate_bond.
spread: coupon spread over the index (decimal). index_id: default preset's.
fixing_days, in_arrears: default from the preset (noted).
coupon_pricer: id of a coupon pricer in the market; when omitted the tool
adds the preset's zero-vol BlackIborCouponPricer (an Ibor coupon needs one). |
| price_zero_coupon_bondA | Price a zero-coupon bond (POST /price-zero-coupon-bond). 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.
preset: a preset with a zero_coupon_bond block (EUR_FIXED_BOND,
settlement T+3 on TARGET).
maturity_date: YYYY-MM-DD, or tenor counted (by the engine, Unadjusted)
from issue_date when given else from as_of.
issue_date: YYYY-MM-DD, as_of or omitted (engine: null date).
settlement_days, redemption: default from the preset (noted).
include_details: pricing.options.bond_pricing_details (duration, convexity). |
| price_callable_fixed_rate_bondA | Price a callable / puttable fixed-rate bond on a Hull-White lattice
(POST /price-callable-fixed-rate-bond). 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.
preset: a preset with a callable_fixed_rate_bond block (EUR_FIXED_BOND).
call_schedule: [{date, price, type: Call|Put}] with increasing dates
(clean price per 100 of face).
model: {a, sigma, lattice_steps?, id?} (explicit Hull-White, lattice_steps
default from the preset) or the id of a SwaptionModelSpec in the market.
tree_steps: engine lattice steps for the bond (default from the preset).
Other arguments: as in price_fixed_rate_bond. |
| price_fraA | Price a forward rate agreement (POST /price-fra). 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.
preset: a preset with a fra block (EUR_EURIBOR_3M, EUR_EURIBOR_6M).
notional: > 0. strike: agreed forward rate (decimal).
side: Long (pay fixed) or Short.
months_to_start, months_to_end: e.g. 3, 6 for a 3x6; the engine resolves
spot = as_of + settlement days, then spot + 3M / 6M with the preset's
calendar and convention (three /calendar-advance calls, all echoed).
start_date, maturity_date: explicit alternative to the months.
index_id, day_counter, business_day_convention: default from the preset. summary.fras: npv, forward_rate, spot_value, settlement_date.
|
| price_cap_floorA | Price an interest-rate cap, floor or collar (POST /price-cap-floor). 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.
preset: a preset with a cap_floor block (EUR_EURIBOR_3M quarterly,
EUR_EURIBOR_6M semiannual).
cap_floor_type: Cap | Floor | Collar. strike: decimal.
effective_date, termination_date | tenor: as in price_vanilla_swap.
vol: {constant: 0.2, type: Lognormal|Normal|ShiftedLognormal, displacement?, id?} (an OptionletVolSpec the tool adds to the market, base conventions
from the preset) or the id of a surface already in the market.
model: Black | Bachelier | ShiftedBlack | HullWhiteLattice (a
CapFloorModelSpec the tool adds, id <type>_model) or a model id.
include_details: per-caplet breakdown.
frequency, day_counter, business_day_convention, schedule_overrides:
default from the preset (noted). summary.cap_floors: npv, atm_rate, implied_volatility.
|
| price_swaptionA | Price a swaption (POST /price-swaption). 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.
preset: a preset with swaption + vanilla_swap blocks (EUR_EURIBOR_6M).
underlying: the swap exercised into, as a VanillaSwapTrade (swap_type,
notional, fixed_rate, effective_date, termination_date | tenor, ...).
effective_date: "spot" = exercise_date + preset settlement days
(engine-resolved). For an OIS underlying set underlying_type OisSwap.
exercise_date: European / American. exercise_dates: Bermudan.
settlement_type: Physical (method default from the preset, PhysicalOTC) or
Cash (give settlement_method: CollateralizedCashPrice | ParYieldCurve).
vol: {constant, type, displacement?, id?}, {expiries, tenors, vols, type, id?} (ATM matrix), {payload_type, payload, id?} (SmileCube /
SabrParams / SabrCalibrate given raw) or a surface id in the market. Built
surfaces are SwaptionVolSpec with the preset's swap_index_id.
model: Black | ShiftedBlack | Bachelier (SwaptionModelSpec added,
id <type>_model), {a, sigma, lattice_steps, id?} (HullWhiteLattice
explicit) or a model id in the market.
include_details: pricing.options.swaption_pricing_details (delta/vega/...).
include_diagnostics: per-SABR-surface diagnostics in the response. summary.swaptions: npv, implied_volatility, atm_forward, annuity.
|
| price_cdsA | 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.
|
| price_equity_optionA | Price a vanilla equity option (POST /price-equity-option). 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.
spot: spot price (a Price quote the tool adds) or a quote id in the market.
strike, expiry (YYYY-MM-DD), option_type Call | Put.
vol: {constant: 0.2, id?} (constant BlackVolSpec added) or a surface id.
rate_curve: {rate, end_date, id?} (flat continuous zero curve from as_of to
end_date, added) or a curve id in the market.
dividend_yield: same shape ({rate: 0.0, end_date} for no dividends); the
engine requires a dividend curve id on every underlying.
preset: a preset with an equity_option block (default EUR_EQUITY).
exercise: European | American (window exercise_start..expiry;
start default = as_of) | Bermudan (exercise_dates, last = expiry).
model: {type: BlackScholesAnalytic|BinomialCRR, binomial_steps?, id?} or a
model id; default BlackScholesAnalytic (id bs_analytic).
discrete_dividends: [{ex_date, amount}] cash dividends on the underlying.
market: optional; a pricing block / market with curves, quotes or
surfaces to reference by id. as_of is required without it. summary.options: npv, delta, gamma, vega, theta, rho.
|
| price_zc_inflation_swapA | Price a zero-coupon inflation swap (POST /price-zero-coupon-inflation-swap). The market must carry the inflation index and a ZeroInflation curve
(pricing.inflation; see the inflation examples). fixings is
REQUIRED: the engine needs the CPI fixing at start minus the observation lag
(and the curve helpers need the recent history) and this server has no
market-data source; the tool sets them on the index and says so in notes. 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.
inflation_index_id: id in pricing.inflation.inflation_indices.
fixings: [{date: "2024-12-01", value: 126.16}, ...] monthly CPI levels.
swap_type: Payer pays fixed. notional, fixed_rate: decimal.
start_date: YYYY-MM-DD or as_of. maturity_date | tenor.
preset: a preset with a zc_inflation_swap block (default EUR_HICP). |
| price_yoy_inflation_swapB | Price a year-on-year inflation swap (POST /price-year-on-year-inflation-swap). The market must carry the YoY inflation index and a YoYInflation curve.
fixings (YoY rates) is REQUIRED for the same reason as in
price_zc_inflation_swap. Fixed and YoY legs share the preset's schedule
(annual by default); spread is added to the YoY rate. 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. |
| price_yoy_inflation_cap_floorA | Price a year-on-year inflation cap / floor / collar
(POST /price-year-on-year-inflation-cap-floor). fixings REQUIRED as in price_yoy_inflation_swap. vol:
{constant: 0.01, type: Black|Bachelier|UnitDisplacedBlack, id?} (a
YoYOptionletVolSpec the tool adds with the preset's conventions) or a surface
id. cap_rate for Cap/Collar, floor_rate for Floor/Collar.
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. |
| calibrate_swaption_volB | Calibrate a SABR swaption cube (POST /calibrate-swaption-vol) from a raw
CalibrateSwaptionVolRequest body (pricing with a SwaptionSabrCalibrateSpec
surface, vol_id, discounting_curve_id, forwarding_curve_id). Validated
against the vendored spec, then forwarded; see the vol examples
(sabrcal_*) for complete bodies. summary selects the calibration block. |
| calibrate_swaption_modelC | Calibrate a Hull-White model to swaption vols (POST /calibrate-swaption-model)
from a raw CalibrateSwaptionModelRequest body (pricing with a
SwaptionModelSpec in Calibrate mode and its hw_calibration block,
model_id). Validated, then forwarded; see the hwcal_* examples.
summary: hw_a, hw_sigma, rmse, num_helpers. |
| sample_vol_surfaceB | Sample volatility surfaces on a grid (POST /sample-vol-surfaces) from a raw
SampleVolSurfacesRequest body (pricing with the surfaces, queries).
Validated, then forwarded; see the volsample_* examples. summary: per
result vol_id, vol type, grid sizes. |
| swap_dv01A | Parallel DV01 of a swap: reprice with every quote of the selected curve(s) bumped. Args:
market: as in the pricing tools (session, engine pricing block or build_curve
results).
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.
trade: the swap: product (vanilla_swap | ois_swap), preset,
discounting_curve, forwarding_curve and the price_vanilla_swap /
price_ois_swap economics (swap_type, notional, fixed_rate, effective_date
'spot' | date, tenor | termination_date, spread, index_id, overrides).
bump_bp: size of the bump in basis points (default 1, positive; added to every
helper rate / spread; futures prices move by -bp/100; the method sets the sign).
method: centered (default) = (NPV(+bp) - NPV(-bp)) / 2, three engine calls;
up = NPV(+bp) - NPV(base); down = NPV(base) - NPV(-bp).
scope: all (discounting and forwarding curves together), discounting
or forwarding.
as_of: required unless market is a pricing block. Result: base_npv, npvs (every per-call NPV: base, up, down), dv01,
dv01_definition (the exact difference taken for the method), bumped_quotes
(every quote moved per side, from/to) and calls = the complete pricing results
(each with its echoed request). Nothing else is computed; the arithmetic is cited
at quantra://methodology/connector-analytics. |
| key_rate_ladderA | Key-rate DV01 ladder: one bump per pillar of a curve, plus a parallel bump. Args:
market, trade, bump_bp, method, as_of: as in swap_dv01.
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.
curve: id of the curve whose pillars are the buckets (default: the trade's
discounting curve). Buckets are that curve's ACTUAL points in wire order. Result: ladder = ordered [{pillar, quote_from, quote_up / quote_down, npv_up / npv_down, dv01}], parallel (all pillars bumped together),
sum_of_buckets (sum of the ladder dv01s), definitions (the exact difference
per method) and calls = base + parallel + one complete pricing result per pillar
and side (centered: 1 + 2 + 2 x pillars calls). Reprices run concurrently, bounded by
QUANTRA_MAX_CONCURRENCY. |
| scenarioA | Reprice a swap under named market variants and tabulate NPV vs base. Args:
market, trade, as_of: as in swap_dv01.
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.
scenarios: [{name, bumps: [{curve, bp, pillar?}], replace_quotes: [{curve, pillar, value}]}]. A bump without pillar moves every pillar
of that curve; pillar is a label ("5Y", "3x6") or a 0-based
index; replace_quotes sets a pillar's quote to an explicit value. Result: table = [{name, npv, change = npv - base_npv, edits}] starting with
base; calls = one complete pricing result per row with the quotes moved. |
| fair_rateA | The engine's fair (par) rate of a swap, read from the pricing response. Args:
market, trade, as_of: as in swap_dv01.
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. Result: fair_rate / fair_spread exactly as the engine returned them (plus
npv); when the response carries neither, provided_by_engine is false and
message says so (nothing is solved locally). calls[0] is the pricing. |
| list_examplesA | List the vendored engine example requests (no engine call). Args:
category: one of the fixture folders (ir_swaps, bonds, swaption,
cds, fra, cap_floor, equity, inflation,
inflation_cap_floor, curves, calendar, vol,
callable_bonds, zero_coupon_swap, misc, blog).
product: filter by endpoint product instead (vanilla_swap, ois_swap,
fixed_rate_bond, swaption, cds, equity_option, ...). Each row: name, category, endpoint, product, title,
reference_text (the QuantLib value the engine is asserted to match, when
cataloged) and the resource uri. get_example(name) returns the body. |
| get_exampleA | One vendored example: endpoint, catalog description, reference value and the
complete request body (no engine call). Use it as engine_request(endpoint, body); or pass body["pricing"] as the
market of a pricing tool and let the tool rebuild the trade from a preset. |
| explain_methodA | How the engine computes something, cited to its own docs and source at the
pinned tag; or how this server derives its analytics (no engine call). Args:
topic: one of npv, fair-rate, greeks-bump-and-reprice, theta,
curve-bootstrap, value-curves, settlement-and-cash-settlement,
volatility-types, calendars-and-overrides,
day-counters-and-compounding, schedules-and-stubs, error-codes
(engine pages), or connector-analytics (what swap_dv01, key_rate_ladder,
scenario, fair_rate and reprice_with compute on top of engine outputs, cited
into this server's own source). Returns the page as markdown (plain-language summary, the cited excerpts each
with a path@tag:Lstart-Lend citation and a GitHub permalink, the request
fields that control the behaviour, and what is NOT documented), plus
citations, links (the permalinks), repository and not_documented
as lists; repos gives the engine and connector repository URLs. Quote the
citations (or hand over the links) when you explain a number; never assert a
cause the page does not support. |
| compare_resultsA | Put the user's numbers next to the engine's (no engine call, no modelling). Args:
external: {label: number} as the user quoted them, e.g.
{"NPV": 10359.49, "DV01": 415.5, "fair rate": 0.0337}. Labels are
matched case- and punctuation-insensitively to response fields
(npv / premium / PV -> npv; DV01 / PV01 -> dv01;
fair rate -> fair_rate then atm_forward; vol ->
implied_volatility, ...). Give the external numbers in the engine's
units (currency amounts; rates and vols as decimals).
quantra: a pricing tool result (its response is used) or the engine
response object itself. The first priced item is compared. Returns rows = [{label, mapped_to, quantra_path, external, quantra, abs_diff, rel_diff, topic, topic_uri}] with abs_diff = quantra - external
and rel_diff = abs_diff / |external|; unmapped for labels with no field;
mapping shows the candidates tried. topic is the methodology page
(explain_method) to consult for that metric. |
| reprice_withA | Test a hypothesis: change one or more request fields and reprice. Args:
result_or_request: a previous pricing tool result (its endpoint and echoed
request are used; its response is the base unless
reprice_base), or an explicit {"endpoint": "/price-swaption", "body": {...}}.
market_data_source: where the market numbers in the request come from. A previous
tool result carries its own declaration and it is reused (the argument may be
omitted or must agree); for an explicit {endpoint, body} or a result without
one it is required: 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.
changes: [{path, value}] or [{path, bump_bp}]; path is dotted /
indexed into the request body (swaptions[0].swaption.settlement_method,
pricing.rates.curves[0].points[2].point.rate, pricing.as_of_date,
pricing.rates.curves[0].interpolator). bump_bp adds
bump_bp / 10000 to a numeric field.
reprice_base: also reprice the unchanged request now (default: reuse the
given result's response).
validate: check the changed body against the vendored schema before sending. Returns changes_applied (before / after per change), request_diff (every
leaf that differs between the two requests), base and changed (complete
uniform results, each replayable from its request) and differences: the
numeric top-level fields of the first priced item with difference = changed - base. Nothing else is computed. The engine's error, if any, is verbatim. |
| session_putA | Store a curve, index or market block under a name for later calls. Args:
name: free-form handle, e.g. sofr.
kind: curve (an engine TermStructure or a build_curve result,
whose indices are kept alongside), index (an IndexDef) or
market ({curves: [...], indices: [...]}).
value: the object; it is validated against the engine schema.
market_data_source: where the numbers in value 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. A
build_curve result already carries its declaration; the two must agree. In-memory only, per server process, least-recently-used eviction at
QUANTRA_SESSION_MAX_ITEMS (default 64). Reference it later as
{"session": "<name>"} in bootstrap_curve (and pricing tools); the stored
market_data_source is reported in their notes. |
| session_getB | Return a stored session item (value plus a summary). |
| session_listB | List stored session items (name, kind, stored_at, a short summary). |
| session_deleteB | Delete a stored session item; deleted is false if it did not exist. |